Re: squid-2.HEAD: proposed patch for non-broken keep-alive case

From: Adrian Chadd <adrian@dont-contact.us>
Date: Sun, 27 Apr 2008 19:54:28 +0800

On Sun, Apr 27, 2008, Alexander V. Lukyanov wrote:
> Hello!
>
> It seems that squid currently considers broken the case of keep-alive when
> there is no Content-Length and the transfer encoding is chunked.
> I think it is not quite correct, as chunked encoding allows to determine
> reply body end.

Ok. That makes sense.

> Here is an example:
> 2008/04/27 08:48:51| httpProcessReplyHeader: Impossible keep-alive header from 'http://www.update.microsoft.com/v6/UpdateRegulationService/UpdateRegulation.asmx'
> 2008/04/27 08:48:51| GOT HTTP REPLY HDR:
> ---------
> HTTP/1.1 200 OK
> Cache-Control: private, max-age=0
> Connection: keep-alive
> Date: Sun, 27 Apr 2008 04:48:51 GMT
> Content-Type: text/xml; charset=utf-8
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> Content-Encoding: xpress
> Vary: Accept-Encoding
> Transfer-Encoding: chunked

What the hell is "Content-Encoding: xpress" ?

Adrian

>
>
> ----------
>
> Here is a patch.
>
> Index: http.c
> ===================================================================
> RCS file: /squid/squid/src/http.c,v
> retrieving revision 1.441
> diff -u -p -r1.441 http.c
> --- http.c 25 Apr 2008 20:39:36 -0000 1.441
> +++ http.c 27 Apr 2008 04:59:52 -0000
> @@ -574,7 +574,9 @@ httpProcessReplyHeader(HttpStateData * h
> if (reply->keep_alive) {
> if (httpState->peer)
> httpState->peer->stats.n_keepalives_recv++;
> - if (Config.onoff.detect_broken_server_pconns && httpReplyBodySize(httpState->request->method, reply) == -1) {
> + if (Config.onoff.detect_broken_server_pconns
> + && httpReplyBodySize(httpState->request->method, reply) == -1
> + && !httpState->flags.chunked) {
> debug(11, 1) ("httpProcessReplyHeader: Impossible keep-alive header from '%s'\n", storeUrl(entry));
> debug(11, 2) ("GOT HTTP REPLY HDR:\n---------\n%s\n----------\n",
> httpState->reply_hdr.buf);

-- 
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
- $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -
Received on Sun Apr 27 2008 - 11:54:41 MDT

This archive was generated by hypermail 2.2.0 : Wed Apr 30 2008 - 12:00:07 MDT