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
2c5dfd8d
Commit
2c5dfd8d
authored
Jun 05, 2018
by
Dag Haavi Finstad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear bo->was_304 on return(retry)
Fixes: #2700
parent
66a61835
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+1
-0
r02700.vtc
bin/varnishtest/tests/r02700.vtc
+47
-0
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
2c5dfd8d
...
...
@@ -240,6 +240,7 @@ vbf_stp_retry(struct worker *wrk, struct busyobj *bo)
bo
->
do_esi
=
0
;
bo
->
do_stream
=
1
;
bo
->
filter_list
=
NULL
;
bo
->
was_304
=
0
;
// XXX: BereqEnd + BereqAcct ?
VSL_ChgId
(
bo
->
vsl
,
"bereq"
,
"retry"
,
VXID_Get
(
wrk
,
VSL_BACKENDMARKER
));
...
...
bin/varnishtest/tests/r02700.vtc
0 → 100644
View file @
2c5dfd8d
varnishtest "#2700: IMS and return (retry)"
server s1 {
rxreq
txresp -hdr {Etag: "foo"} -body "1"
rxreq
expect req.http.If-None-Match == {"foo"}
expect req.http.retries == "0"
txresp -status 304
rxreq
expect req.http.retries == "1"
expect req.http.If-None-Match == {"foo"}
txresp -status 304
} -start
varnish v1 -vcl+backend {
sub vcl_backend_fetch {
set bereq.http.retries = bereq.retries;
}
sub vcl_backend_response {
set beresp.ttl = 1ms;
set beresp.grace = 0s;
set beresp.keep = 1h;
if (beresp.was_304 && bereq.retries == 0) {
return (retry);
}
set beresp.http.was-304 = beresp.was_304;
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.http.was-304 == "false"
delay 0.1
txreq
rxresp
expect resp.http.was-304 == "true"
} -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