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
4f2af500
Commit
4f2af500
authored
Feb 24, 2016
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hit-for-pass objects are not IMS candidates
Original test case by fgsch Fixes: #1858
parent
1f6e7cd4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
3 deletions
+42
-3
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+4
-3
r01858.vtc
bin/varnishtest/tests/r01858.vtc
+38
-0
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
4f2af500
...
...
@@ -644,7 +644,8 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
if
(
bo
->
do_gzip
||
bo
->
do_gunzip
)
ObjSetFlag
(
bo
->
wrk
,
bo
->
fetch_objcore
,
OF_CHGGZIP
,
1
);
if
(
http_IsStatus
(
bo
->
beresp
,
200
)
&&
(
if
(
!
(
bo
->
fetch_objcore
->
flags
&
OC_F_PASS
)
&&
http_IsStatus
(
bo
->
beresp
,
200
)
&&
(
http_GetHdr
(
bo
->
beresp
,
H_Last_Modified
,
&
p
)
||
http_GetHdr
(
bo
->
beresp
,
H_ETag
,
&
p
)))
ObjSetFlag
(
bo
->
wrk
,
bo
->
fetch_objcore
,
OF_IMSCAND
,
1
);
...
...
bin/varnishtest/tests/r01858.vtc
0 → 100644
View file @
4f2af500
varnishtest "Test a hit-for-pass does not issue an IMS request"
server s1 {
rxreq
txresp \
-hdr {Etag: "foo"} \
-body "foo"
rxreq
expect req.http.if-none-match == <undef>
txresp \
-hdr {Etag: "bar"} \
-body "bar"
} -start
varnish v1 -vcl+backend {
sub vcl_backend_response {
if (beresp.status == 200) {
set beresp.ttl = 1s;
set beresp.uncacheable = true;
return (deliver);
}
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.body == "foo"
delay 1.5
txreq
rxresp
expect resp.status == 200
expect resp.body == "bar"
} -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