--------------------- PatchSet 4672 Date: 2002/08/14 12:23:45 Author: rbcollins Branch: esi Tag: (none) Log: Incremental commit of Error code conversion Members: src/client_side.c:1.65.2.5->1.65.2.6 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.65.2.5 retrieving revision 1.65.2.6 diff -u -r1.65.2.5 -r1.65.2.6 --- squid/src/client_side.c 14 Aug 2002 11:42:52 -0000 1.65.2.5 +++ squid/src/client_side.c 14 Aug 2002 12:23:45 -0000 1.65.2.6 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.65.2.5 2002/08/14 11:42:52 rbcollins Exp $ + * $Id: client_side.c,v 1.65.2.6 2002/08/14 12:23:45 rbcollins Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1020,7 +1020,6 @@ clientHttpRequest *http = NULL; clientHttpRequest **H = NULL; char *prefix = NULL; - ErrorState *err = NULL; fde *F = &fd_table[fd]; int len = conn->in.size - conn->in.offset - 1; debug(33, 4) ("clientReadRequest: FD %d: reading request...\n", fd); @@ -1219,13 +1218,6 @@ clientSetReplyToError (node->data,ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE,METHOD_NONE, NULL, &conn->peer.sin_addr, http->request, NULL); clientStreamRead (http->stream_head.tail->data, http, 0,HTTP_REQBUF_SZ,http->reqbuf); -#if 0 - err = clientBuildError(ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE, NULL, - &conn->peer.sin_addr, http->request); - http->entry = clientCreateStoreEntry(node->data, - METHOD_NONE, null_request_flags); - errorAppendEntry(http->entry, err); -#endif break; } } @@ -1237,12 +1229,21 @@ * is happy with the input */ if (conn->in.offset >= Config.maxRequestHeaderSize) { - clientStreamNode *node = http->stream_head.tail->prev->data; /* The request is too large to handle */ + clientStreamNode *node; + http = parseHttpRequestAbort(conn, "error:request-too-large"); + node = http->stream_head.tail->prev->data; debug(33, 1) ("Request header is too large (%d bytes)\n", (int) conn->in.offset); debug(33, 1) ("Config 'request_header_max_size'= %ld bytes.\n", (long int) Config.maxRequestHeaderSize); + clientSetReplyToError (node->data,ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE,METHOD_NONE, NULL, + &conn->peer.sin_addr, NULL, NULL); + /* add to the client request queue */ + for (H = &conn->chr; *H; H = &(*H)->next); + *H = http; + clientStreamRead (http->stream_head.tail->data, http, 0,HTTP_REQBUF_SZ,http->reqbuf); +#if 0 err = clientBuildError(ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE, NULL, &conn->peer.sin_addr, NULL); http = parseHttpRequestAbort(conn, "error:request-too-large"); @@ -1251,6 +1252,7 @@ *H = http; http->entry = clientCreateStoreEntry(node->data, METHOD_NONE, null_request_flags); errorAppendEntry(http->entry, err); +#endif return; } break;