[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Access to Request Body


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
suppressed
(831) 459-5354


-----Original Message-----
From: suppressed [mailto:suppressed 
Sent: Monday, April 28, 2008 1:47 PM
To: suppressed
Subject: Re: Access to Request Body

Quoting Tim Gustafson <suppressed>:

> 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


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.