Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
5ecae908
Commit
5ecae908
authored
Feb 13, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stop using "purge" in the context of bans
parent
f6abce43
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
c00022.vtc
bin/varnishtest/tests/c00022.vtc
+9
-9
v00011.vtc
bin/varnishtest/tests/v00011.vtc
+2
-2
No files found.
bin/varnishtest/tests/c00022.vtc
View file @
5ecae908
...
@@ -20,11 +20,11 @@ server s1 {
...
@@ -20,11 +20,11 @@ server s1 {
varnish v1 -vcl+backend {
varnish v1 -vcl+backend {
sub vcl_recv {
sub vcl_recv {
if (req.method == "
PURGE
") {
if (req.method == "
BAN
") {
ban ("req.url == " + req.url);
ban ("req.url == " + req.url);
return (synth(410));
return (synth(410));
}
}
if (req.method == "
PURGE
STR") {
if (req.method == "
BAN
STR") {
ban ("" + req.http.ban);
ban ("" + req.http.ban);
return (synth(410));
return (synth(410));
}
}
...
@@ -42,7 +42,7 @@ client c1 {
...
@@ -42,7 +42,7 @@ client c1 {
# Ban: something else
# Ban: something else
client c1 {
client c1 {
txreq -req
PURGE
-url /foox
txreq -req
BAN
-url /foox
rxresp
rxresp
expect resp.status == 410
expect resp.status == 410
} -run
} -run
...
@@ -59,7 +59,7 @@ client c1 {
...
@@ -59,7 +59,7 @@ client c1 {
# Ban: it
# Ban: it
client c1 {
client c1 {
txreq -req
PURGE
-url /foo
txreq -req
BAN
-url /foo
rxresp
rxresp
expect resp.status == 410
expect resp.status == 410
} -run
} -run
...
@@ -76,7 +76,7 @@ client c1 {
...
@@ -76,7 +76,7 @@ client c1 {
# Ban: everything else
# Ban: everything else
client c1 {
client c1 {
txreq -req
PURGE
STR -hdr "ban: req.url != /foo"
txreq -req
BAN
STR -hdr "ban: req.url != /foo"
rxresp
rxresp
expect resp.status == 410
expect resp.status == 410
} -run
} -run
...
@@ -93,7 +93,7 @@ client c1 {
...
@@ -93,7 +93,7 @@ client c1 {
# Ban: it
# Ban: it
client c1 {
client c1 {
txreq -req
PURGE
STR -hdr "Ban: obj.http.foo == bar6"
txreq -req
BAN
STR -hdr "Ban: obj.http.foo == bar6"
rxresp
rxresp
expect resp.status == 410
expect resp.status == 410
} -run
} -run
...
@@ -110,7 +110,7 @@ client c1 {
...
@@ -110,7 +110,7 @@ client c1 {
# Ban: something else
# Ban: something else
client c1 {
client c1 {
txreq -req
PURGE
STR -hdr "Ban: obj.http.foo == bar6"
txreq -req
BAN
STR -hdr "Ban: obj.http.foo == bar6"
rxresp
rxresp
expect resp.status == 410
expect resp.status == 410
} -run
} -run
...
@@ -128,7 +128,7 @@ client c1 {
...
@@ -128,7 +128,7 @@ client c1 {
# Header match
# Header match
client c1 {
client c1 {
txreq -req
PURGE
STR -hdr "Ban: req.http.foo == barcheck"
txreq -req
BAN
STR -hdr "Ban: req.http.foo == barcheck"
rxresp
rxresp
expect resp.status == 410
expect resp.status == 410
} -run
} -run
...
@@ -144,7 +144,7 @@ client c1 {
...
@@ -144,7 +144,7 @@ client c1 {
# Header match
# Header match
client c1 {
client c1 {
txreq -req
PURGE
STR -hdr "Ban: obj.http.foo == barcheck"
txreq -req
BAN
STR -hdr "Ban: obj.http.foo == barcheck"
rxresp
rxresp
expect resp.status == 410
expect resp.status == 410
} -run
} -run
...
...
bin/varnishtest/tests/v00011.vtc
View file @
5ecae908
...
@@ -10,7 +10,7 @@ server s1 {
...
@@ -10,7 +10,7 @@ server s1 {
varnish v1 -vcl+backend {
varnish v1 -vcl+backend {
sub vcl_recv {
sub vcl_recv {
if (req.method == "
PURGE
") {
if (req.method == "
BAN
") {
ban(req.http.doesntexist);
ban(req.http.doesntexist);
ban("");
ban("");
ban("req.url");
ban("req.url");
...
@@ -43,7 +43,7 @@ logexpect l1 -v v1 -d 1 -g vxid {
...
@@ -43,7 +43,7 @@ logexpect l1 -v v1 -d 1 -g vxid {
} -start
} -start
client c1 {
client c1 {
txreq -req "
PURGE
"
txreq -req "
BAN
"
rxresp
rxresp
expect resp.http.X-Varnish == "1004"
expect resp.http.X-Varnish == "1004"
expect resp.status == 209
expect resp.status == 209
...
...
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