From: wessels <> Date: Wed, 12 May 1999 00:51:47 +0000 (+0000) Subject: Fixed a bug with the new ERR_TOO_BIG error message. Somtimes X-Git-Tag: SQUID_3_0_PRE1~2206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df4ba4bffa4a8f7ab87c3137b116e27c4e545a34;p=thirdparty%2Fsquid.git Fixed a bug with the new ERR_TOO_BIG error message. Somtimes we'll get non-GET requests that don't have content-length (like CONNECT, for example). Also tried to force closing of persistent connections after sending an "unsupported request" error message. Those mostly come from buggy browsers that send SSL requests down a persistent HTTP connection. --- diff --git a/src/client_side.cc b/src/client_side.cc index 1cfb84997d..bceb23e6ee 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.454 1999/05/10 19:45:55 wessels Exp $ + * $Id: client_side.cc,v 1.455 1999/05/11 18:51:47 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2386,6 +2386,7 @@ clientReadRequest(int fd, void *data) err = errorCon(ERR_UNSUP_REQ, HTTP_NOT_IMPLEMENTED); err->src_addr = conn->peer.sin_addr; err->request = requestLink(request); + request->flags.proxy_keepalive = 0; http->al.http.code = err->http_status; http->entry = clientCreateStoreEntry(http, request->method, null_request_flags); errorAppendEntry(http->entry, err); @@ -2431,7 +2432,9 @@ clientReadRequest(int fd, void *data) */ if (request->body_sz < cont_len) commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); - if (cont_len > Config.maxRequestBodySize) { + if (cont_len < 0) + (void) 0; + else if (cont_len > Config.maxRequestBodySize) { err = errorCon(ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE); err->request = requestLink(request); http->entry = clientCreateStoreEntry(http,