httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: input filtering.
Date Mon, 02 Oct 2000 17:05:59 GMT
rbb@covalent.net writes:

> I just want to issue a quick heads up.  I have input filtering working in
> smae cases.  I should have a patch committed either today or later this
> week.  Basically, the current problem is that it only works inside a
> debugger.

AFAICT, there is no input filtering at all now.  We just use a bucket
brigade API to read data from the network and on ASCII machines we are
able to pick out the header.  Bad stuff happens when we try to grab a
request body.  (We try to read it from BUFF, which has no data now.)

In order to have input filtering, we need to change the way
ap_get_client_block() is implemented.  It will need to get a bucket
brigade which has passed through the input filters.  It needs to lose
the notion that it knows where the body ends; that knowledge has to be
pushed down below the first content filter so that some sentinel (eos)
can pass through the content filters at the proper time.

If the client used chunked encoding for the request body, a dechunk
filter could know when to return EOS to the content filters.  It could
split the brigade at that point and set aside any remaining data for
the core input filter to use on the next pass.

If chunked encoding isn't used but we have a content length, core* will
have to insert an eos at the proper point so that filtering of the
request body stops and the handler knows it has all the data.

(*Yes, of course yet-another-filter could be used instead of logic in
core, but you get the idea.)

If no chunking and no content length, core will have to insert an eos
anyway at the proper point.

All this will need to work differently if chunks are passed through to
the handler, but let's ignore that for the time being.  Hopefully that
would work just by editing the input filter list, eliminating content
filters (and maybe replacing the dechunk filter with something that
leaves the chunks alone but reads the chunk headers to know when we're
done).

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message