]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
hno squid-2.4.DEVEL3-hno.devel.persistent_connections_and_request_timeout.patch
authorhno <>
Tue, 30 May 2000 15:35:50 +0000 (15:35 +0000)
committerhno <>
Tue, 30 May 2000 15:35:50 +0000 (15:35 +0000)
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.

ChangeLog
src/client_side.cc

index 123d54983c41a809d75ad9367c8f44ab85eae257..fbdc3cd5fd04c133487fed72cbb968013aa060dc 100644 (file)
--- 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 ():
 
index c1ec5d24858c7fceea3c7c239f2d8c53f6ab22bb..ea24835fcba0c07550e60fadf557950326914b7d 100644 (file)
@@ -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