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
32ef5dce
Commit
32ef5dce
authored
Apr 07, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cancel a request for a private (streaming) object from vcl_deliver
for anything but return (deliver) Fixes #2963
parent
4442c6d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
0 deletions
+50
-0
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+1
-0
r02964.vtc
bin/varnishtest/tests/r02964.vtc
+49
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
32ef5dce
...
...
@@ -160,6 +160,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
assert
(
req
->
restarts
<=
cache_param
->
max_restarts
);
if
(
wrk
->
handling
!=
VCL_RET_DELIVER
)
{
HSH_Cancel
(
wrk
,
req
->
objcore
,
NULL
);
(
void
)
HSH_DerefObjCore
(
wrk
,
&
req
->
objcore
,
HSH_RUSH_POLICY
);
http_Teardown
(
req
->
resp
);
...
...
bin/varnishtest/tests/r02964.vtc
0 → 100644
View file @
32ef5dce
varnishtest "Cancel private busy obj from vcl_deliver"
server s1 {
rxreq
expect req.url == "/hfm"
txresp -hdr "HFM: True" -bodylen 65530
rxreq
expect req.url == "/hfp"
txresp -hdr "HFP: True" -bodylen 65550
} -start
varnish v1 -arg "-s Transient=default" -vcl+backend {
sub vcl_recv {
if (req.restarts > 0) {
return (synth(200));
}
}
sub vcl_backend_response {
if (bereq.url == "/hfm") {
set beresp.uncacheable = true;
} else if (bereq.url == "/hfp") {
return (pass(1m));
}
}
sub vcl_deliver {
if (req.restarts == 0) {
return (restart);
}
}
} -start
logexpect l1 -v v1 -g raw {
expect * * Storage "Transient"
expect * * Storage "Transient"
} -start
client c1 {
txreq -url "/hfm"
rxresp
expect resp.status == 200
txreq -url "/hfp"
rxresp
expect resp.status == 200
} -run
logexpect l1 -wait
varnish v1 -expect SM?.Transient.c_bytes > 131072
varnish v1 -expect SM?.Transient.g_bytes < 2000
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