/[apache]/trunk/dist/2.0/patches/08_all_CAN-2005-2088_-_REMOVE_AFTER_2_0_54.patch
Gentoo

Contents of /trunk/dist/2.0/patches/08_all_CAN-2005-2088_-_REMOVE_AFTER_2_0_54.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 42 - (show annotations) (download)
Sun Jul 10 09:20:43 2005 UTC (7 years, 10 months ago) by vericgar
File size: 2457 byte(s)
Patch that addresses CAN-2005-2088 - will probably need to be removed with next upstream release
1 diff -ur httpd-2.0.54.orig/modules/proxy/proxy_http.c httpd-2.0.54/modules/proxy/proxy_http.c
2 --- httpd-2.0.54.orig/modules/proxy/proxy_http.c 2005-02-04 12:21:18.000000000 -0800
3 +++ httpd-2.0.54/modules/proxy/proxy_http.c 2005-07-10 01:15:49.000000000 -0700
4 @@ -768,8 +768,24 @@
5 return r->status;
6
7 } else {
8 - /* strip connection listed hop-by-hop headers from response */
9 const char *buf;
10 +
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
17 + * later. */
18 + apr_table_unset(r->headers_out, "Content-Length");
19 + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
20 + r->server,
21 + "proxy: server %s returned Transfer-Encoding and Content-Length",
22 + p_conn->name);
23 + p_conn->close += 1;
24 + }
25 +
26 + /* strip connection listed hop-by-hop headers from response */
27 p_conn->close += ap_proxy_liststr(apr_table_get(r->headers_out,
28 "Connection"),
29 "close");
30 diff -ur httpd-2.0.54.orig/server/protocol.c httpd-2.0.54/server/protocol.c
31 --- httpd-2.0.54.orig/server/protocol.c 2005-02-04 12:21:18.000000000 -0800
32 +++ httpd-2.0.54/server/protocol.c 2005-07-10 01:15:49.000000000 -0700
33 @@ -885,6 +885,15 @@
34 apr_brigade_destroy(tmp_bb);
35 return r;
36 }
37 +
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
43 + * later. */
44 + apr_table_unset(r->headers_in, "Content-Length");
45 + }
46 }
47 else {
48 if (r->header_only) {

  ViewVC Help
Powered by ViewVC 1.1.13