1
diff -ruN -x configure -x '*~' -x build-tree.orig -x '*.rej' build-tree.orig/apache2/modules/proxy/proxy_http.c build-tree/apache2/modules/proxy/proxy_http.c
2
--- build-tree.orig/apache2/modules/proxy/proxy_http.c 2005-02-04 20:21:18.000000000 +0000
3
+++ build-tree/apache2/modules/proxy/proxy_http.c 2005-08-02 09:25:21.000000000 +0000
8
- /* strip connection listed hop-by-hop headers from response */
11
+ /* can't have both Content-Length and Transfer-Encoding */
12
+ if (apr_table_get(r->headers_out, "Transfer-Encoding")
13
+ && apr_table_get(r->headers_out, "Content-Length")) {
14
+ /* 2616 section 4.4, point 3: "if both Transfer-Encoding
15
+ * and Content-Length are received, the latter MUST be
16
+ * ignored"; so unset it here to prevent any confusion
18
+ apr_table_unset(r->headers_out, "Content-Length");
19
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
21
+ "proxy: server %s returned Transfer-Encoding and Content-Length",
26
+ /* strip connection listed hop-by-hop headers from response */
27
p_conn->close += ap_proxy_liststr(apr_table_get(r->headers_out,
30
diff -ruN -x configure -x '*~' -x build-tree.orig -x '*.rej' build-tree.orig/apache2/server/protocol.c build-tree/apache2/server/protocol.c
31
--- build-tree.orig/apache2/server/protocol.c 2005-08-02 09:25:38.000000000 +0000
32
+++ build-tree/apache2/server/protocol.c 2005-08-02 09:25:12.000000000 +0000
34
apr_brigade_destroy(tmp_bb);
38
+ if (apr_table_get(r->headers_in, "Transfer-Encoding")
39
+ && apr_table_get(r->headers_in, "Content-Length")) {
40
+ /* 2616 section 4.4, point 3: "if both Transfer-Encoding
41
+ * and Content-Length are received, the latter MUST be
42
+ * ignored"; so unset it here to prevent any confusion
44
+ apr_table_unset(r->headers_in, "Content-Length");