]> err.no Git - varnish/commit
Change the logic that decides when we attempt EOF fetches from the
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 18 Dec 2008 11:30:02 +0000 (11:30 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 18 Dec 2008 11:30:02 +0000 (11:30 +0000)
commit32e049596c01cd42b07b00784908774c27930fb0
tree3e6dd39569d5e750caa0e9ee05f95a355ba5f7dd
parentefb0646484091b6658438641deff26a0c29407aa
Change the logic that decides when we attempt EOF fetches from the
backend.

The new logic is:
If (HEAD) /* happens only on pass */
do not fetch body.
else if (Content-Length)
fetch body according to length
else if (chunked)
fetch body as chunked
else if (other transfer-encoding)
fail
else if (Connection: keep-alive)
fetch no body, set Length = 0
else if (Connection: close)
fetch body until EOF
else if (HTTP < 1.1)
fetch body until EOF
else
fetch no body, set Length = 0

let me know if this breaks anything that should work.

Fixes #400

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3470 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/bin/varnishd/cache_http.c