]> err.no Git - varnish/commit
Fix a bug in chunked fetching:
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Sep 2006 07:37:34 +0000 (07:37 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Sep 2006 07:37:34 +0000 (07:37 +0000)
commit96f4a5a6785f8f6e6452f1132b7f5231153d4a4c
treec48363e9345e0e7cb9b7a88b6004e2588d830ea8
parent62c887a3923f92d97dcf33dccf24c636caea3d57
Fix a bug in chunked fetching:

With very short chunks, in this case 3 characters, our buffer may
contain not only the chunk length and the chunk data, but also the
next chunk length.

If the short chunk is the last chunk before the zero length chunk
at the end, unconditionally trying to fill the buffer before parsing
the length may hang because we already have everything there is to
have in the buffer.

The fix is to always try to parse the buffer before adding to it.

While here, tighten up and improve error checks of the code.

Reported by: Xing Li <xing@litespeedtech.com>

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