Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

HTTP Request Input Filter to dump post data

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


leo at strike

Oct 27, 2010, 1:08 PM

Post #1 of 1 (517 views)
Permalink
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
Attachments: DumpInputData.pm (1.64 KB)

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.