httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: Peek at POSTed data
Date Mon, 16 Jun 2003 20:37:45 GMT
You must implement a peek-ahead filter that sets aside the post body.
Once someone calls the filter stack later, you simply return your set aside
buckets.  Several modules do something similar today, either for incomplete
data (like charset_lite, which might not have a complete trailing character
code sequence) or ssl (which might decrypt more data than the caller
wished to have returned.)


At 02:19 PM 6/16/2003, you wrote:

>I'm wondering if there is a nice way in Apache 2.0 to peek at the incoming POSTed data
without removing the data from the view of other modules?  So, for example, in my modules
fixup stage I'd like to have a look at the POSTed data, but still be able to let a different
module actually handle the request.
>I don't think an input filter would do the trick because I would need to see the posted
data *before* another module has decided to actually handle the request.  This means that
I would need to initiate the reading of the data from the client myself - but that action
would effectively remove the data from the module that will actually be handling the request.
>I was able to do this in Apache 1.3 by manipulating some of the values to do with the
request_rec and conn_rec structures after I had run through the standard ap_get_client_block
routines.  It works well with Apache 1.3, but the same hack won't work in Apache 2.0.

View raw message