httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: Dechunking code in Apache 2.0.49
Date Thu, 03 Jun 2004 23:48:31 GMT
Mathias Herberts wrote:

> What is the position of the Apache community on the passing of 'hop by 
> hop' headers to origin servers by mod_proxy? The code in proxy_http.c 
> says 'RFC2616 13.5.1 says we should strip these headers', but RFC 2616 
> 13.5.1 defines 'Hop-by-hop headers, which are meaningful only for a 
> single transport-level connection, and are not stored by caches or
>  forwarded by proxies.' it never uses SHOULD or MUST as described in RFC 
> 2119 and therefore allowing mod_proxy to forward the 'Transfer-Encoding' 
> header would not, IMHO, violate RFC 2616 13.5.1.

The purpose of hop by hop headers are exactly that - they govern the 
connection between each hop. Passing chunked encoding from the origin 
server unchanged through the filter stack will break all the filters in 
the chain, which are expecting raw data.

The correct fix for this is to make sure that any traffic that apache 
passes through in either direction is _rechunked_ if a) the connection 
is HTTP/1.1 and b) there is no content length on the request.

It seems we're stripping the chunking on the way in (correctly) but then 
forgetting to put it back on the way out.

Regards,
Graham
--

Mime
View raw message