httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dean gaudet <dgaudet-list-new-ht...@arctic.org>
Subject Re: HTTP/1.1 support for mod_proxy -> patch
Date Sun, 09 Apr 2000 14:46:36 GMT
On Sun, 9 Apr 2000, Graham Leggett wrote:

> dean gaudet wrote:
> 
> > on the response to the client, if you're using ap_send_http_header() or
> > otherwise invoking ap_set_keepalive() then BUFF will indeed handle
> > chunking the response object when it's required.
> 
> When sending and receiving data from a client or a server, the proxy
> needs to do chunking and dechunking. However, when reading or writing
> data to the cache, no chunking should be performed.
> 
> Is there a way to distinguish between these two in buff.c?

yeah -- buff.c won't start chunking unless you do a setopt(B_CHUNK)...
which you probably don't do when writing to the file, so you're ok.

btw, buff.c only handles *sending* chunked responses... reading has no
chunking support.  but probably should.

> > 13.5.1 says transfer-encoding is a hop-by-hop header -- so i'm thinking
> > you should just dechunk always, even if it means you'll be rechunking as
> > you write through BUFF.
> 
> That's the plan, I've just got to go through buff.c and figure out which
> functions to use.
> 
> As it stands now, the proxy strips the following request headers:
> 
> "Host", "Keep-Alive", "TE", "Trailer", "Transfer-Encoding", "Upgrade"
> 
> So - in theory as it stands the proxy will always work, because transfer
> encoding headers will never reach the server, and thus a chunked
> response will never happen. But - it will have to be fixed...

hrm, it's right to not pass those headers through from client to server,
and vice versa, but you still need to negotiate them on each side.  the
server is always free to send a "Transfer-Encoding: chunked" response if
it's an HTTP/1.1 request.

if you want a test case it should be as easy as making an HTTP/1.0 request
of the proxy for /cgi-bin/printenv on an apache server.  and if you modify
the printenv to set the right headers to allow caching (i.e. expires) then
you'll be able to test what happens when it's in cache.

-dean


Mime
View raw message