Hrmm, that doesn't seem to work.  In my code, I have:

print $fh $r->body . "\n";

And in my error log, I get:

Can't locate object method "body" via package "Apache2::RequestRec" at
/var/www/lib/Log.pm line 31. 

Tim Gustafson
SOE Webmaster
UC Santa Cruz
[EMAIL PROTECTED]
(831) 459-5354


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 28, 2008 1:47 PM
To: modperl@perl.apache.org
Subject: Re: Access to Request Body

Quoting Tim Gustafson <[EMAIL PROTECTED]>:

> Hello,
>
> I'm writing a mod_perl logging module, and I can't seem to find anywhere
in
> the documentation that talks about how I can access the request body
> (basically, the POST data) of a request during the logging phase.  Is this
> not possible?

do you want access to the unmodified post data, or do you want access  
to the content?  Apache2::Request parses the POST data, and makes it  
available though $r->body.  (and possibly $r->upload) If you want the  
unparsed body, i'm not sure what you'd have to do offhand.

Adam

Reply via email to