You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Alexander 'Leo' Bergolth <le...@strike.wu.ac.at> on 2010/10/27 22:08:07 UTC
HTTP Request Input Filter to dump post data
Hi!
I am trying to use a http request input filter to dump the post data of
certain requests into a file. (The filter is attached.)
Registering the input filter using
PerlInputFilterHandler +Leo::DumpInputData
works fine, the handler gets called on dump requests and the request
headers are written correctly.
However dumping the post data doesn't work, $f->read($buffer, BUFF_LEN)
gets called only once and returns 0 bytes read. (Even though the content
should be about 10k of data and the PerlResponseHandler that finally
consumes the data can correctly parse the whole request.)
What am I doing wrong?
Thanks,
--leo
P.S.: I am using mod_perl-2.0.4-6.el5 on RHEL5. The response handler is
set up by a PerlTransHandler that issues the following:
-------------------- 8< --------------------
$r->handler('perl-script');
$r->set_handlers(PerlResponseHandler => [
# set path_info for the CGI script
sub { $_[0]->path_info( $path_info ); DECLINED },
'ModPerl::Registry'
]);
-------------------- 8< --------------------
That shouldn't reset the input filter, should it?
--
e-mail ::: Leo.Bergolth (at) wu.ac.at
fax ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria