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
6944fe82
Commit
6944fe82
authored
Mar 17, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
respect max_restarts and fix c00028.vtc
Fixes #2949
parent
31ec2bd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+4
-0
c00028.vtc
bin/varnishtest/tests/c00028.vtc
+5
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
6944fe82
...
...
@@ -272,6 +272,10 @@ cnt_synth(struct worker *wrk, struct req *req)
return
(
REQ_FSM_DONE
);
}
if
(
wrk
->
handling
==
VCL_RET_RESTART
&&
req
->
restarts
>
cache_param
->
max_restarts
)
wrk
->
handling
=
VCL_RET_DELIVER
;
if
(
wrk
->
handling
==
VCL_RET_RESTART
)
{
/*
* XXX: Should we reset req->doclose = SC_VCL_FAILURE
...
...
bin/varnishtest/tests/c00028.vtc
View file @
6944fe82
...
...
@@ -8,7 +8,11 @@ varnish v1 -vcl {
sub vcl_backend_fetch {
set bereq.backend = bad;
}
sub vcl_backend_error {
return (abandon);
}
sub vcl_synth {
set resp.http.restarts = req.restarts;
return (restart);
}
} -start
...
...
@@ -17,4 +21,5 @@ client c1 {
txreq -url "/"
rxresp
expect resp.status == 503
expect resp.http.restarts == 5
} -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