summaryrefslogtreecommitdiff
path: root/www/apache2/patches/patch-af
blob: fef7cf4b52981b0ea7598f2e0ea8eab5e799f961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-af,v 1.4 2005/08/08 18:30:26 tron Exp $

--- server/protocol.c.orig	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) {