diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-02-13 14:42:26 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-02-13 14:49:44 +0200 |
commit | 49ab7b5fa7843a77605b91adf8a3689794fc091a (patch) | |
tree | a66112caaaf9fe883ce449c788df1a8480594db9 /tests/initdb.at | |
parent | 7eb61c964c74af1bafb948584c0404208c9467b8 (diff) | |
download | vmod-dbrw-49ab7b5fa7843a77605b91adf8a3689794fc091a.tar.gz vmod-dbrw-49ab7b5fa7843a77605b91adf8a3689794fc091a.tar.bz2 |
Implement two new flags and a special req.http header to indicate errors
* NEWS: Document changes.
* doc/vmod-dbrw.3: Likewise.
* doc/vmod-dbrw.texi: Likewise.
* configure.ac: Version 2.4.90
* src/dbrw.h (dbrw_config): New member: match_type
* src/vmod_dbrw.c (parse_flags): Handle "eq" and "regex" flags.
(findmatch): Handle the "eq" flag.
(do_rewrite): Return error code.
(vmod_rewrite): Set the X-VMOD-DBRW-Error header on errors.
* tests/atlocal.in (at_vcl_backend): Special handling for
X-VMOD-DBRW-Error.
* tests/initdb.at: Test the 'eq' flag.
* tests/rewrite07.at: New testcase.
* tests/Makefile.am: Add new testcase.
* tests/testsuite.at: Likewise.
Diffstat (limited to 'tests/initdb.at')
-rw-r--r-- | tests/initdb.at | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/initdb.at b/tests/initdb.at index 0355e3b..f7bfe0b 100644 --- a/tests/initdb.at +++ b/tests/initdb.at @@ -44,7 +44,7 @@ CREATE TABLE rewrite ( CREATE INDEX source ON rewrite(host,url); INSERT INTO rewrite VALUES -('en.example.net','/local','http://uno.example.com/remote',NULL,NULL,NULL), +('en.example.net','/local','http://uno.example.com/remote',NULL,NULL,'eq'), ('en.example.net','/local','http://dos.example.com/$[]1','$url','/local/(.*)',NULL), ('en.example.net','/local2','http://to.example.net/$[]1$[]2','$url','/local2/([[^\\?]]*)(\\?.*)?',NULL), ('to.example.net','/local','http://dos.example.net/$[]1','$url','/local/(.*)','QSA'), @@ -57,4 +57,4 @@ EOT [], [mv err $FAILFILE], [echo "OK" > $INITFILE]) -])
\ No newline at end of file +]) |