Commit 62b5e3f4 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Close piped sessions in the absence of backends

Fixes #1815
parent bcdcdbf8
......@@ -113,6 +113,13 @@ PipeRequest(struct req *req, struct busyobj *bo)
acct_pipe.req = req->acct.req_hdrbytes;
req->acct.req_hdrbytes = 0;
if (bo->director == NULL) {
VSLb(bo->vsl, SLT_FetchError, "No backend");
pipecharge(req, &acct_pipe, NULL);
SES_Close(req->sp, SC_OVERLOAD);
return;
}
vc = VDI_GetFd(bo);
if (vc == NULL) {
VSLb(bo->vsl, SLT_FetchError, "no backend connection");
......
varnishtest "backend unreachable on piped request"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
import ${vmod_debug};
sub vcl_recv {
set req.backend_hint = debug.no_backend();
}
} -start
client c1 {
txreq -req PROPFIND
expect_close
} -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment