httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Proxy stripping Content-Length, Transfer-Encoding
Date Thu, 09 Jan 2003 07:25:23 GMT
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
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."


Mime
View raw message