Hi all,

In httpd v2.0 mod_proxy, both the Content-Length and Transfer-Encoding headers are stripped from the backend server response before passing it to the frontend:

/* We need to copy the output headers and treat them as input
* headers as well. BUT, we need to do this before we remove
* TE and C-L, so that they are preserved accordingly for
* ap_http_filter to know where to end.
*/
rp->headers_in = apr_table_copy(r->pool, r->headers_out);

/* In order for ap_set_keepalive to work properly, we can NOT
* have any length information stored in the output headers.
*/
apr_table_unset(r->headers_out,"Transfer-Encoding");
apr_table_unset(r->headers_out,"Content-Length");

After much discussion, the removal of the Content-Length was taken out in httpd-2.1. Can anyone confirm this didn't break anything? If it didn't I want to remove this in httpd v2.0 also.

What concerns me too is the removal of the transfer encoding - I assume this is because it is a hop-by-hop header - my question is why are we not removing all hop-by-hop headers, like we do for the initial request from the browser?

/* We need to copy the output headers and treat them as input
* headers as well. BUT, we need to do this before we remove
* TE, so that they are preserved accordingly for
* ap_http_filter to know where to end.
*/
rp->headers_in = apr_table_copy(r->pool, r->headers_out);

apr_table_unset(r->headers_out,"Transfer-Encoding");

Regards,
Graham
--
-----------------------------------------
[EMAIL PROTECTED] "There's a moon
over Bourbon Street
tonight..."

Reply via email to