httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: filters (was: Re: [PATCH] mod_proxy Keepalives)
Date Mon, 02 Apr 2001 20:02:39 GMT
On Mon, 2 Apr 2001, Graham Leggett wrote:

> Greg Stein wrote:
> > Anyway... if those three references were removed from DECHUNK, then we'd be
> > able to dechunk any(!) stream. That would be kinda cool :-)
> Agreed :)

It would be cool, but it would also be incorrect IMO.  Filters are Apache
based things.  Chunking is an HTTP based thing.  To try to separate
filters from Apache will cause more problems than it solves.

> > Hmm. I just realized something. *Because* ap_getline only works on the top
> > of the connection filter stack, it means that DECHUNK will ignore filters
> > between itself at the connection filters. It should be using f->next, but it
> > doesn't... urg.
> >
> > Ryan: you mentioned that you recalled there may have been a reason why "read
> > one line" isn't part of ap_input_mode_t. Can you remember why?

Yes.  It doesn't logically make sense.  As soon as you say "read one line"
as a parameter, then it also makes sense to say "read 512 bytes" as a
parameter.  Then you need to return how many bytes were actually read.
You also need to deal with how many bytes are being returned, because a
filter could modify how much data is returned.

Once you start really looking at this, it becomes easier to just use a
field in the conn_rec.

> This might explain a problem I've had with the keepalive patch - after a
> request is proxied that involves a header only being returned (and no
> body) such as a HEAD request, the request directly after that fails with
> a an error that the first response line cannot be read (string length
> read is zero).

Make sure that you are resetting all of your fields correctly.

> What could be happening is that ap_getline() is reading directly from
> the CORE_IN filter after the HTTP_IN filter had swallowed up the lines -
> causing the "missing response"...

Can't happen.  CORE_IN doesn't actually do any reading from the socket.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message