httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Earliest Hook to Inspect POST Params
Date Sat, 31 Jul 2004 17:09:12 GMT
Joe Schaefer wrote:
> Eli Marmor <marmor@netmask.it> writes:
[...]
>>I'm not creating any content (so a normal handler is not needed), and
>>I'm transparent and not modifying the request/response (so no filter is
>>needed), but just logging the information and want to know what is the
>>earliest phase that is already safe enough to parse the POST
>>parameters.
> 
> 
> Sounds to me like you really want to write a logging handler, which
> is sort of the opposite question.
> 
>   "What's the latest hook that can be used?"
> 
> Any hook that runs before the content handler does should be fine.
> If you're writing a log handler, all your pre-content-handler hook 
> needs to do is call
> 
>   req = apreq_request(r, NULL);
> 
> This will register mod_apreq's input filter.  By the time your logging 
> handler runs, the request body will be parsed, so the same call will 
> provide your log handler with the fully parsed data.

That's very risky, unless you have a full control over the modules that 
you use. Anybody can grab the POST data before the log phase is 
happening w/o using libapreq2 and you will be left with no POST when the 
logging phase will come.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message