--------------------- PatchSet 11516 Date: 2007/06/26 22:17:01 Author: hno Branch: HEAD Tag: (none) Log: Kill some old unused & unmaintained code for sending an error response on timeout before seeing a request Members: src/client_side.c:1.724->1.725 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid/squid/src/client_side.c,v retrieving revision 1.724 retrieving revision 1.725 diff -u -r1.724 -r1.725 --- squid/src/client_side.c 23 Jun 2007 20:55:54 -0000 1.724 +++ squid/src/client_side.c 26 Jun 2007 22:17:01 -0000 1.725 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.724 2007/06/23 20:55:54 hno Exp $ + * $Id: client_side.c,v 1.725 2007/06/26 22:17:01 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -4155,45 +4155,6 @@ static void requestTimeout(int fd, void *data) { -#if THIS_CONFUSES_PERSISTENT_CONNECTION_AWARE_BROWSERS_AND_USERS - ConnStateData *conn = data; - ErrorState *err; - debug(33, 3) ("requestTimeout: FD %d: lifetime is expired.\n", fd); - if (fd_table[fd].rwstate.valid) { - /* - * Some data has been sent to the client, just close the FD - */ - comm_close(fd); - } else if (conn->nrequests) { - /* - * assume its a persistent connection; just close it - */ - comm_close(fd); - } else { - /* - * Generate an error - */ - err = errorCon(ERR_LIFETIME_EXP, HTTP_REQUEST_TIMEOUT, NULL); - err->src_addr = conn->peer.sin_addr; - err->url = xstrdup("N/A"); - /* - * Normally we shouldn't call errorSend() in client_side.c, but - * it should be okay in this case. Presumably if we get here - * this is the first request for the connection, and no data - * has been written yet - */ - assert(conn->chr == NULL); - errorSend(fd, err); - /* - * if we don't close() here, we still need a timeout handler! - */ - commSetTimeout(fd, 30, requestTimeout, conn); - /* - * Aha, but we don't want a read handler! - */ - commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); - } -#else /* * Just close the connection to not confuse browsers * using persistent connections. Some browsers opens @@ -4204,7 +4165,6 @@ */ debug(33, 3) ("requestTimeout: FD %d: lifetime is expired.\n", fd); comm_close(fd); -#endif } static void