source:
trunk/server/common/patches/httpd-2.2.x-CVE-2010-0434.patch
@
1532
Last change on this file since 1532 was 1505, checked in by mitchb, 13 years ago | |
---|---|
File size: 1.8 KB |
-
httpd-2.2.x/server/protocol.c
1041 1041 return r; 1042 1042 } 1043 1043 1044 /* if a request with a body creates a subrequest, clone the original request's1045 * input headers minus any headers pertaining to the body which has already1046 * been read.out-of-line helper function for ap_set_sub_req_protocol.1044 /* if a request with a body creates a subrequest, remove original request's 1045 * input headers which pertain to the body which has already been read. 1046 * out-of-line helper function for ap_set_sub_req_protocol. 1047 1047 */ 1048 1048 1049 static void clone_headers_no_body(request_rec *rnew, 1050 const request_rec *r) 1049 static void strip_headers_request_body(request_rec *rnew) 1051 1050 { 1052 rnew->headers_in = apr_table_copy(rnew->pool, r->headers_in);1053 1051 apr_table_unset(rnew->headers_in, "Content-Encoding"); 1054 1052 apr_table_unset(rnew->headers_in, "Content-Language"); 1055 1053 apr_table_unset(rnew->headers_in, "Content-Length"); … … 1083 1081 1084 1082 rnew->status = HTTP_OK; 1085 1083 1084 rnew->headers_in = apr_table_copy(rnew->pool, r->headers_in); 1085 1086 1086 /* did the original request have a body? (e.g. POST w/SSI tags) 1087 1087 * if so, make sure the subrequest doesn't inherit body headers 1088 1088 */ 1089 1089 if (apr_table_get(r->headers_in, "Content-Length") 1090 1090 || apr_table_get(r->headers_in, "Transfer-Encoding")) { 1091 clone_headers_no_body(rnew, r); 1092 } else { 1093 /* no body (common case). clone headers the cheap way */ 1094 rnew->headers_in = r->headers_in; 1091 strip_headers_request_body(rnew); 1095 1092 } 1096 1093 rnew->subprocess_env = apr_table_copy(rnew->pool, r->subprocess_env); 1097 1094 rnew->headers_out = apr_table_make(rnew->pool, 5);
Note: See TracBrowser
for help on using the repository browser.