diff options
-rw-r--r-- | NEWS | 6 | ||||
m--------- | acvmod | 0 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | doc/vmod-dbrw.3 | 8 | ||||
-rw-r--r-- | src/vmod_dbrw.c | 6 |
5 files changed, 17 insertions, 9 deletions
@@ -1,11 +1,15 @@ | |||
1 | vmod-dbrw -- history of user-visible changes. 2020-04-09 | 1 | vmod-dbrw -- history of user-visible changes. 2022-08-21 |
2 | See the end of file for copying conditions. | 2 | See the end of file for copying conditions. |
3 | 3 | ||
4 | Please send vmod-dbrw bug reports to <gray@gnu.org> | 4 | Please send vmod-dbrw bug reports to <gray@gnu.org> |
5 | 5 | ||
6 | Version 2.8, 2022-08-21 | ||
7 | |||
8 | * Support for Varnish 7.1 | ||
9 | |||
6 | Version 2.7, 2020-04-09 | 10 | Version 2.7, 2020-04-09 |
7 | 11 | ||
8 | * Drop support for Varnish versions prior to 6.0 | 12 | * Drop support for Varnish versions prior to 6.0 |
9 | 13 | ||
10 | 14 | ||
11 | Version 2.6, 2020-03-03 | 15 | Version 2.6, 2020-03-03 |
diff --git a/acvmod b/acvmod | |||
Subproject 99b8dd21c7d1a91021b0a63c0d846ac35c4b009 | Subproject 0516e2461e8f2e3b33a7fffa13705cdb1de77c5 | ||
diff --git a/configure.ac b/configure.ac index 944d934..470d09b 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,8 +1,8 @@ | |||
1 | # This file is part of vmod-dbrw -*- autoconf -*- | 1 | # This file is part of vmod-dbrw -*- autoconf -*- |
2 | # Copyright (C) 2013-2020 Sergey Poznyakoff | 2 | # Copyright (C) 2013-2022 Sergey Poznyakoff |
3 | # | 3 | # |
4 | # Vmod-dbrw is free software; you can redistribute it and/or modify | 4 | # Vmod-dbrw is free software; you can redistribute it and/or modify |
5 | # it under the terms of the GNU General Public License as published by | 5 | # it under the terms of the GNU General Public License as published by |
6 | # the Free Software Foundation; either version 3, or (at your option) | 6 | # the Free Software Foundation; either version 3, or (at your option) |
7 | # any later version. | 7 | # any later version. |
8 | # | 8 | # |
@@ -11,13 +11,13 @@ | |||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | # GNU General Public License for more details. | 12 | # GNU General Public License for more details. |
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with vmod-dbrw. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-dbrw. If not, see <http://www.gnu.org/licenses/>. |
16 | AC_PREREQ(2.69) | 16 | AC_PREREQ(2.69) |
17 | AC_INIT([vmod-dbrw], 2.7, [gray@gnu.org]) | 17 | AC_INIT([vmod-dbrw], 2.8, [gray@gnu.org]) |
18 | AC_CONFIG_AUX_DIR([build-aux]) | 18 | AC_CONFIG_AUX_DIR([build-aux]) |
19 | AC_CONFIG_MACRO_DIR([m4]) | 19 | AC_CONFIG_MACRO_DIR([m4]) |
20 | AC_CONFIG_SRCDIR(src/vmod_dbrw.vcc) | 20 | AC_CONFIG_SRCDIR(src/vmod_dbrw.vcc) |
21 | AM_CONFIG_HEADER(config.h) | 21 | AM_CONFIG_HEADER(config.h) |
22 | 22 | ||
23 | AC_SUBST([AC_VMOD_BASENAME],[dbrw]) | 23 | AC_SUBST([AC_VMOD_BASENAME],[dbrw]) |
@@ -40,13 +40,13 @@ AC_PROG_LIBTOOL | |||
40 | AC_PROG_MAKE_SET | 40 | AC_PROG_MAKE_SET |
41 | 41 | ||
42 | # Checks for header files. | 42 | # Checks for header files. |
43 | AC_HEADER_STDC | 43 | AC_HEADER_STDC |
44 | AC_CHECK_HEADERS([sys/stdlib.h]) | 44 | AC_CHECK_HEADERS([sys/stdlib.h]) |
45 | 45 | ||
46 | AM_VARNISHAPI([6.0],[6.4.0]) | 46 | AM_VARNISHAPI([6.0],[7.1.0]) |
47 | AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], | 47 | AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], |
48 | [Varnish API major version number]) | 48 | [Varnish API major version number]) |
49 | 49 | ||
50 | ########### | 50 | ########### |
51 | # Check for SQL support | 51 | # Check for SQL support |
52 | build_mysql=probe | 52 | build_mysql=probe |
diff --git a/doc/vmod-dbrw.3 b/doc/vmod-dbrw.3 index 26422f1..023e215 100644 --- a/doc/vmod-dbrw.3 +++ b/doc/vmod-dbrw.3 | |||
@@ -1,8 +1,8 @@ | |||
1 | .\" This file is part of Vmod-dbrw -*- nroff -*- | 1 | .\" This file is part of Vmod-dbrw -*- nroff -*- |
2 | .\" Copyright (C) 2013-2020 Sergey Poznyakoff | 2 | .\" Copyright (C) 2013-2022 Sergey Poznyakoff |
3 | .\" | 3 | .\" |
4 | .\" Vmod-dbrw is free software; you can redistribute it and/or modify | 4 | .\" Vmod-dbrw is free software; you can redistribute it and/or modify |
5 | .\" it under the terms of the GNU General Public License as published by | 5 | .\" it under the terms of the GNU General Public License as published by |
6 | .\" the Free Software Foundation; either version 3, or (at your option) | 6 | .\" the Free Software Foundation; either version 3, or (at your option) |
7 | .\" any later version. | 7 | .\" any later version. |
8 | .\" | 8 | .\" |
@@ -10,13 +10,13 @@ | |||
10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | .\" GNU General Public License for more details. | 12 | .\" GNU General Public License for more details. |
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with vmod-dbrw. If not, see <http://www.gnu.org/licenses/>. | 15 | .\" along with vmod-dbrw. If not, see <http://www.gnu.org/licenses/>. |
16 | .TH VMOD-DBRW 3 "April 9, 2020" "VMOD-DBRW" "User Reference" | 16 | .TH VMOD-DBRW 3 "August 21, 2022" "VMOD-DBRW" "User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | vmod-dbrw \- Database-driven rewrite rules for Varnish Cache | 18 | vmod-dbrw \- Database-driven rewrite rules for Varnish Cache |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
20 | .B import dbrw; | 20 | .B import dbrw; |
21 | .PP | 21 | .PP |
22 | .BI "VOID dbrw.config(STRING " dbtype ", STRING " params ", STRING " query ");" | 22 | .BI "VOID dbrw.config(STRING " dbtype ", STRING " params ", STRING " query ");" |
@@ -315,13 +315,13 @@ sub vcl_synth { | |||
315 | .EE | 315 | .EE |
316 | .\" The MANCGI variable is set by man.cgi script on Ulysses. | 316 | .\" The MANCGI variable is set by man.cgi script on Ulysses. |
317 | .\" The download.inc file contains the default DOWNLOAD section | 317 | .\" The download.inc file contains the default DOWNLOAD section |
318 | .\" for man-based doc pages. | 318 | .\" for man-based doc pages. |
319 | .if "\V[MANCGI]"WEBDOC" \{\ | 319 | .if "\V[MANCGI]"WEBDOC" \{\ |
320 | . ds package vmod-dbrw | 320 | . ds package vmod-dbrw |
321 | . ds version 2.7 | 321 | . ds version 2.8 |
322 | . so download.inc | 322 | . so download.inc |
323 | \} | 323 | \} |
324 | .SH "SEE ALSO" | 324 | .SH "SEE ALSO" |
325 | .BR vcl (7), | 325 | .BR vcl (7), |
326 | .BR varnishd (1). | 326 | .BR varnishd (1). |
327 | .PP | 327 | .PP |
@@ -351,13 +351,13 @@ should give you access to the complete manual. | |||
351 | \} | 351 | \} |
352 | .SH AUTHORS | 352 | .SH AUTHORS |
353 | Sergey Poznyakoff | 353 | Sergey Poznyakoff |
354 | .SH "BUG REPORTS" | 354 | .SH "BUG REPORTS" |
355 | Report bugs to <gray@gnu.org>. | 355 | Report bugs to <gray@gnu.org>. |
356 | .SH COPYRIGHT | 356 | .SH COPYRIGHT |
357 | Copyright \(co 2013-2020 Sergey Poznyakoff | 357 | Copyright \(co 2013-2022 Sergey Poznyakoff |
358 | .br | 358 | .br |
359 | .na | 359 | .na |
360 | License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | 360 | License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> |
361 | .br | 361 | .br |
362 | .ad | 362 | .ad |
363 | This is free software: you are free to change and redistribute it. | 363 | This is free software: you are free to change and redistribute it. |
diff --git a/src/vmod_dbrw.c b/src/vmod_dbrw.c index 3509d04..f6b6446 100644 --- a/src/vmod_dbrw.c +++ b/src/vmod_dbrw.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* This file is part of vmod-dbrw | 1 | /* This file is part of vmod-dbrw |
2 | Copyright (C) 2013-2020 Sergey Poznyakoff | 2 | Copyright (C) 2013-2022 Sergey Poznyakoff |
3 | 3 | ||
4 | Vmod-dbrw is free software; you can redistribute it and/or modify | 4 | Vmod-dbrw is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; either version 3, or (at your option) | 6 | the Free Software Foundation; either version 3, or (at your option) |
7 | any later version. | 7 | any later version. |
8 | 8 | ||
@@ -377,12 +377,16 @@ expand_backref(VRT_CTX, const char *str, const char *val, | |||
377 | 377 | ||
378 | return b; | 378 | return b; |
379 | } | 379 | } |
380 | 380 | ||
381 | #define ISEMPTY(s) ((s) == NULL || (s)[0] == 0) | 381 | #define ISEMPTY(s) ((s) == NULL || (s)[0] == 0) |
382 | 382 | ||
383 | #if VARNISHAPI_MAJOR > 6 | ||
384 | # define vrt_magic_string_end 0 | ||
385 | #endif | ||
386 | |||
383 | static void | 387 | static void |
384 | dbrw_sethdr(VRT_CTX, int where, const char *what, const char *value) | 388 | dbrw_sethdr(VRT_CTX, int where, const char *what, const char *value) |
385 | { | 389 | { |
386 | struct gethdr_s s = { where, what }; | 390 | struct gethdr_s s = { where, what }; |
387 | VRT_SetHdr(ctx, &s, value, vrt_magic_string_end); | 391 | VRT_SetHdr(ctx, &s, value, vrt_magic_string_end); |
388 | } | 392 | } |