From: hno <> Date: Tue, 30 May 2000 15:35:50 +0000 (+0000) Subject: hno squid-2.4.DEVEL3-hno.devel.persistent_connections_and_request_timeout.patch X-Git-Tag: SQUID_3_0_PRE1~1948 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af57a2e335b3ac0c54c4a5977dc1cda2bf640068;p=thirdparty%2Fsquid.git hno squid-2.4.DEVEL3-hno.devel.persistent_connections_and_request_timeout.patch The error message Squid sent when the client did not send a initial request in a timely manner confused browsers using persistent connections. It is better to simply close the connection, forcing the user agent to retry any pending request. --- diff --git a/ChangeLog b/ChangeLog index 123d54983c..fbdc3cd5fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -62,6 +62,10 @@ Changes to Squid (): aufs or diskd stores - Added --enable-stacktraces configure option to set PRINT_STACK_TRACE, and extended support for this to Linux/GNU libc. + - Disabled the "request timeout" error message sent if the user agent + did not provide a request in a timely manner after opening the + connection. Now the connection is silently closed. The error message + was confusing user agents utilizing persistent connections. Changes to Squid-2.4.DEVEL3 (): diff --git a/src/client_side.cc b/src/client_side.cc index c1ec5d2485..ea24835fcb 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.487 2000/05/29 01:22:24 wessels Exp $ + * $Id: client_side.cc,v 1.488 2000/05/30 09:35:50 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2636,6 +2636,7 @@ requestTimeout(int fd, void *data) ConnStateData *conn = data; ErrorState *err; debug(33, 3) ("requestTimeout: FD %d: lifetime is expired.\n", fd); +#if THIS_CONFUSES_PERSISTENT_CONNECTION_AWARE_BROWSERS_AND_USERS if (fd_table[fd].rwstate) { /* * Some data has been sent to the client, just close the FD @@ -2669,6 +2670,17 @@ requestTimeout(int fd, void *data) */ commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); } +#else + /* + * Just close the connection to not confuse browsers + * using persistent connections. Some browsers opens + * an connection and then does not use it until much + * later (presumeably because the request triggering + * the open has already been completed on another + * connection) + */ + comm_close(fd); +#endif } static int