httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53420] Bug with ProxyErrorOverride / httpd-2.4.x
Date Fri, 01 Aug 2014 21:30:51 GMT

--- Comment #5 from Rainer Jung <> ---
The reason is broken header handling. Headers are read from the origin server
and then directly put into r->headers_out. In 2.2 those headers are copied to
the request struct (rp) used in ap_discard_request_body. therefore the http
infput filter can detect the end of the body using the Content-Length header
and sets EOS as soon as all the expected bytes are read. 

In 2.4 and trunk, copying the headers from r->headers_out to
backend->r-headers_in happens *after* the error_override handling. Thus the
http input filter must read until timeout.

Either we rearrange the original order of code, or we at least copy
Content-Length and Transfer-Encoding headers from r->headers_out to
backend->r_headers_in before doing ap_discard_request_body. Somethin like

                const char *tmp;
                if (tmp = apr_table_get(r->headers_out, "Content-Length")) {
                    apr_table_set(backend->r->headers_in, "Content-Length",
                else if (tmp = apr_table_get(r->headers_out,
"Transfer-Encoding")) {
                    apr_table_set(backend->r->headers_in, "Transfer-Encoding",
                else if (te) {
                    apr_table_set(backend->r->headers_in, "Transfer-Encoding",

I will check svn history to get an idea, why the code order was changed.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message