--- httpd-2.0.52/modules/proxy/proxy_http.c.can2088 +++ httpd-2.0.52/modules/proxy/proxy_http.c @@ -390,6 +390,13 @@ int counter, seen_eos; apr_status_t status; + if (apr_table_get(r->headers_in, "Transfer-Encoding")) { + /* Reject chunked requests. */ + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "proxy_http: chunked requests not supported"); + return HTTP_LENGTH_REQUIRED; + } + /* * Send the HTTP/1.1 request to the remote server */ --- httpd-2.0.52/server/protocol.c.can2088 +++ httpd-2.0.52/server/protocol.c @@ -962,6 +962,15 @@ ap_run_log_transaction(r); 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"); + } } ap_add_input_filter_handle(ap_http_input_filter_handle,