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
06f9176f
Commit
06f9176f
authored
Mar 09, 2017
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A hash_always_miss can override a hit-for-pass
parent
8cc11c1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
c00082.vtc
bin/varnishtest/tests/c00082.vtc
+39
-0
No files found.
bin/varnishtest/tests/c00082.vtc
0 → 100644
View file @
06f9176f
varnishtest "hash_always_miss overrides hit-for-pass"
server s1 {
rxreq
txresp -hdr "Hit-Pass: forever"
rxreq
txresp
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
set req.hash_always_miss = (req.http.Hash == "always-miss");
}
sub vcl_backend_response {
if (beresp.http.Hit-Pass == "forever") {
return (pass(1y));
}
}
sub vcl_deliver {
set resp.http.Obj-Hits = obj.hits;
}
} -start
client c1 {
txreq
rxresp
expect resp.http.Obj-Hits == 0
txreq -hdr "Hash: always-miss"
rxresp
expect resp.http.Obj-Hits == 0
txreq
rxresp
expect resp.http.Obj-Hits == 1
} -run
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