Commit 39a4ade0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make sure we always close backend socket if the backend sends

"Connection: close" or if a HTTP/1.0 backend does not send "Connection: keep-alive".

Fixes	#495



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4543 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent fc2709fc
......@@ -497,6 +497,12 @@ FetchBody(struct sess *sp)
mklen = 1;
}
if (http_HdrIs(hp, H_Connection, "close"))
cls = 1;
if (hp->protover < 1.1 && !http_HdrIs(hp, H_Connection, "keep-alive"))
cls = 1;
if (cls < 0) {
sp->wrk->stats.fetch_failed++;
/* XXX: Wouldn't this store automatically be released ? */
......
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