]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed a bug with the new ERR_TOO_BIG error message. Somtimes
authorwessels <>
Wed, 12 May 1999 00:51:47 +0000 (00:51 +0000)
committerwessels <>
Wed, 12 May 1999 00:51:47 +0000 (00:51 +0000)
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.

src/client_side.cc

index 1cfb84997df52c3ff1f5556488132779009c95c6..bceb23e6ee44639d92d0ccf0fcd41a4e631cb69d 100644 (file)
@@ -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,