Re: wrong behaviour when icapReadTimeout occurs

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 21 Sep 2004 18:35:29 +0200 (CEST)

Applied to the CVS version by Olivier Girondel.

Regards
Henrik

On Tue, 21 Sep 2004, Dmitry Adamushko wrote:

> Hi,
>
> Here's a small patch concerning the icap client's implementation in
> squid-icap-2.5-200408092201.
>
> A problem with the current one is as described below:
>
> The problem occurs when a connection between the squid and a web server is
> lost during a period of time (e.g. some segment of a network between these
> two is broken), which is enough for the web server to close its side of the
> connection (when all send()'s retransmissions failed), but the Squid knows
> nothing about this.
> The Squid closes such a connection when the httpReadTimeout() timeout occurs,
> but at the same time the icapReadTimeout() timeout occurs too, and the icap
> service's state becomes unreachable.
> That's incorrectly. In that situation a icap server was just waiting for
> further data chunks to get a completed file before checking.
>
> I think, it's much more correctly to set an icap service to unreachable state
> only when all data has been sent (including a final zero chunk "0\r\n\r\n")
> or a preview request has been sent and, thus, the squid has been waiting for
> an answer before timeout occurs.
>
> This problem had place on a server of our client. And I could repeat it by
> the following steps on my machine:
> - begin to download a big file;
> - switch off the network cable on my machine for some minutes.
>
> It works well when this patch applyed.
>
> --
> Best regards,
> Dmitry Adamushko mailto: da@vba.com.by
>
Received on Tue Sep 21 2004 - 10:35:31 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Sep 30 2004 - 12:00:04 MDT