Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blobcode
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-blobcode
Commits
312e1f89
Commit
312e1f89
authored
Dec 04, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add an event function to check version compatibility with Varnish
parent
7cb06c72
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
configure.ac
configure.ac
+1
-1
vmod_blobcode.c
src/vmod_blobcode.c
+17
-0
vmod_blobcode.vcc
src/vmod_blobcode.vcc
+8
-0
No files found.
configure.ac
View file @
312e1f89
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2015-2016 UPLEX - Nils Goroll Systemoptimierung])
AC_INIT([libvmod-blobcode], [
0.1
])
AC_INIT([libvmod-blobcode], [
1.0
])
AC_CONFIG_MACRO_DIR([m4])
m4_ifndef([VARNISH_VMOD_INCLUDES], AC_MSG_ERROR([Need varnish.m4 -- see README.rst]))
AC_CONFIG_SRCDIR(src/vmod_blobcode.vcc)
...
...
src/vmod_blobcode.c
View file @
312e1f89
...
...
@@ -197,6 +197,23 @@ err_decode(VRT_CTX, const char *enc)
}
}
/* Event function */
int
__match_proto__
(
vmod_event_f
)
event
(
VRT_CTX
,
struct
vmod_priv
*
priv
,
enum
vcl_event_e
e
)
{
if
(
e
!=
VCL_EVENT_LOAD
)
return
0
;
if
(
VRT_MAJOR_VERSION
<
3
||
(
VRT_MAJOR_VERSION
==
3
&&
VRT_MINOR_VERSION
<
2
))
{
AN
(
ctx
->
msg
);
VSB_cat
(
ctx
->
msg
,
"vmod blobcode: not compatible with Varnish versions < 4.1.2"
);
return
1
;
}
return
0
;
}
/* Objects */
VCL_VOID
__match_proto__
(
td_blobcode_blob__init
)
...
...
src/vmod_blobcode.vcc
View file @
312e1f89
...
...
@@ -10,6 +10,8 @@
$Module blobcode 3 binary-to-text encodings and decodings for the VCL blob type
$Event event
::
sub vcl_init {
...
...
@@ -355,6 +357,10 @@ REQUIREMENTS
This VMOD requires at least Varnish version 4.1.2, and has been tested
with versions through 5.0.0.
Later versions of this VMOD are only compatible with Varnish versions
since 5.0.0, and permit the use of the ``encode``, ``decode`` and
``transcode`` functions in ``vcl_init``.
Perl 5 is required for the build.
INSTALLATION
...
...
@@ -441,6 +447,8 @@ HISTORY
* version 0.1: initial version
* version 1.0: compatible with Varnish versions since 4.1.2.
SEE ALSO
========
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment