]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Deny any requests using transfer-encoding. This is needed in case a browser
authorhno <>
Mon, 24 Jun 2002 12:07:38 +0000 (12:07 +0000)
committerhno <>
Mon, 24 Jun 2002 12:07:38 +0000 (12:07 +0000)
gets confused and sends us a HTTP/1.1 request using transfer-encoding.

src/HttpHeader.cc
src/client_side.cc
src/enums.h

index b91b1bb6d47c820136e666a394dc38ee1d95b434..cc746fa9788d2765d41eb0ea86c5aa70bfc44da5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeader.cc,v 1.78 2002/06/16 20:10:29 hno Exp $
+ * $Id: HttpHeader.cc,v 1.79 2002/06/24 06:07:38 hno Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -112,6 +112,7 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] =
     {"Server", HDR_SERVER, ftStr},
     {"Set-Cookie", HDR_SET_COOKIE, ftStr},
     {"Title", HDR_TITLE, ftStr},
+    {"Transfer-Encoding", HDR_TRANSFER_ENCODING, ftStr},
     {"Upgrade", HDR_UPGRADE, ftStr},   /* for now */
     {"User-Agent", HDR_USER_AGENT, ftStr},
     {"Vary", HDR_VARY, ftStr}, /* for now */
@@ -149,7 +150,7 @@ static http_hdr_type ListHeadersArr[] =
     HDR_IF_MATCH, HDR_IF_NONE_MATCH,
     HDR_LINK, HDR_PRAGMA,
     HDR_PROXY_CONNECTION,
-    /* HDR_TRANSFER_ENCODING, */
+    HDR_TRANSFER_ENCODING,
     HDR_UPGRADE,
     HDR_VARY,
     HDR_VIA,
@@ -168,7 +169,7 @@ static http_hdr_type ListHeadersArr[] =
 static http_hdr_type GeneralHeadersArr[] =
 {
     HDR_CACHE_CONTROL, HDR_CONNECTION, HDR_DATE, HDR_PRAGMA,
-    /* HDR_TRANSFER_ENCODING, */
+    HDR_TRANSFER_ENCODING,
     HDR_UPGRADE,
     /* HDR_TRAILER, */
     HDR_VIA
index 0880368a6bb8906345241b6ab2c3cbffc3c09934..7f6e53cfab5caa3f275e93d87b83255d5c54cbad 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.580 2002/06/14 18:45:16 hno Exp $
+ * $Id: client_side.cc,v 1.581 2002/06/24 06:07:38 hno Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -2581,7 +2581,8 @@ clientReadRequest(int fd, void *data)
            request->my_addr = conn->me.sin_addr;
            request->my_port = ntohs(conn->me.sin_port);
            request->http_ver = http->http_ver;
-           if (!urlCheckRequest(request)) {
+           if (!urlCheckRequest(request) ||
+               httpHeaderHas(&request->header, HDR_TRANSFER_ENCODING)) {
                err = errorCon(ERR_UNSUP_REQ, HTTP_NOT_IMPLEMENTED);
                err->src_addr = conn->peer.sin_addr;
                err->request = requestLink(request);
index 76e56e5a8702606a23cceb74b30042203254d592..83666b80c01b106f134322e4bce0731fd3363664 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.208 2002/06/23 13:32:24 hno Exp $
+ * $Id: enums.h,v 1.209 2002/06/24 06:07:38 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -229,6 +229,7 @@ typedef enum {
     HDR_SERVER,
     HDR_SET_COOKIE,
     HDR_TITLE,
+    HDR_TRANSFER_ENCODING,
     HDR_UPGRADE,
     HDR_USER_AGENT,
     HDR_VARY,