perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander 'Leo' Bergolth <...@strike.wu.ac.at>
Subject HTTP Request Input Filter to dump post data
Date Wed, 27 Oct 2010 20:08:07 GMT
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



Mime
View raw message