Commit dd4c1ed0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't interpret \ escapes in ban strings from vcl::ban()

parent 896c923f
......@@ -467,7 +467,7 @@ VRT_ban_string(struct sess *sp, const char *str)
int i;
(void)sp;
av = ParseArgv(str, NULL, 0);
av = ParseArgv(str, NULL, ARGV_NOESC);
if (av[0] != NULL) {
/* XXX: report error how ? */
FreeArgv(av);
......
......@@ -93,7 +93,7 @@ client c1 {
# Ban: it
client c1 {
txreq -req PURGESTR -hdr "Ban: obj.http.foo == \"bar6\""
txreq -req PURGESTR -hdr "Ban: obj.http.foo == bar6"
rxresp
expect resp.status == 410
} -run
......@@ -110,10 +110,11 @@ client c1 {
# Ban: something else
client c1 {
txreq -req PURGESTR -hdr "Ban: obj.http.foo == \"bar6\""
txreq -req PURGESTR -hdr "Ban: obj.http.foo == bar6"
rxresp
expect resp.status == 410
} -run
varnish v1 -cliok "ban.list"
# Still there
......@@ -127,7 +128,7 @@ client c1 {
# Header match
client c1 {
txreq -req PURGESTR -hdr "Ban: req.http.foo == \"barcheck\""
txreq -req PURGESTR -hdr "Ban: req.http.foo == barcheck"
rxresp
expect resp.status == 410
} -run
......@@ -143,7 +144,7 @@ client c1 {
# Header match
client c1 {
txreq -req PURGESTR -hdr "Ban: obj.http.foo == \"barcheck\""
txreq -req PURGESTR -hdr "Ban: obj.http.foo == barcheck"
rxresp
expect resp.status == 410
} -run
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment