www-modproxy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@ebuilt.com>
Subject Re: RFC2616 question for proxy
Date Fri, 03 Aug 2001 23:09:14 GMT
> RFC2616 states that proxies must remove any transfer-coding (see end of 
> message for quoted section). The way I read this is that updating 
> Content-Length after dechunking an origin server response body is a hint 
> that it'll be needed for sending the body back as response to a non-HTTP 
> 1.1 client.

Content-length is only updated after the entire response is stored in
the cache -- the example in the spec is not a statement that the header
field needs to be updated, only that the value is not determined until
after chunking is removed.

> So, in this case, an HTTP 1.1 proxy will need to buffer the entire 
> chunked origin server response body before sending it to a non-HTTP 1.1 
> client with a Content-Length header.
> Is my interpretation correct? TIA.

Nope.  Just fork the response stream, send one to the client (closing the
connection to terminate the response) and store the other stream in the
cache (if any) with a content-length equal to the total received chunks.
Trailers are also discarded from the HTTP/1.0 stream.


View raw message