Re: poking into request content?
- Jan Algermissen wrote:
> Geoffrey Young wrote:Not really. You could subclass $r, but your other handlers need to be aware of
>>Jan Algermissen wrote:
>>>I want to write a Perl handler that pokes into the content
>>>of a request in order to see if a certain parameter is present and
>>>if so to change the request method.
>>>Ok, I am finally aware that content() may onle be called once on
>>>a request object so any further handlers won't be able to see the
>>>Is there a way to restore that data after calling content() or read()?
> thanks. I tried that but am I right in suspecting that subsequent handlers
> also need to work with Apache::Request? IOW: is there a way to use Apache::Request
> and later use the notrmal $r->content() call?
this. So it's not transparent.
> I want to impose abslolutely no constraint on subsequent handlers (as theyIn which case you probably need to look at input filters available only with
> might not even be related to my application).
mod_perl 2. Though remember that the body filter will be invoked only if some
handler is trying to consume the body.
In fact Apache::Request 2, does exactly that - it injects itself as a filter,
making the POSTed body available to any consumer that calls into libapreq's
instance method (perl, c, php, whatever)
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@... http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html