aboutsummaryrefslogtreecommitdiff
path: root/www/apache2/files/patch-secfix-CAN-2005-2088
blob: 36fe17ad303c635b415b56c71e7ecf281b603ee0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- server/protocol.c	2005/07/14 16:49:17	219060
+++ server/protocol.c	2005/07/14 16:51:55	219061
@@ -885,6 +885,15 @@
             apr_brigade_destroy(tmp_bb);
             return r;
         }
+
+        if (apr_table_get(r->headers_in, "Transfer-Encoding")
+            && apr_table_get(r->headers_in, "Content-Length")) {
+            /* 2616 section 4.4, point 3: "if both Transfer-Encoding
+             * and Content-Length are received, the latter MUST be
+             * ignored"; so unset it here to prevent any confusion
+             * later. */
+            apr_table_unset(r->headers_in, "Content-Length");
+        }
     }
     else {
         if (r->header_only) {