develooper Front page | perl.beginners | Postings from August 2009

mod_perl: access full request, log it, etc

Thread Next
From:
Dan
Date:
August 23, 2009 01:19
Subject:
mod_perl: access full request, log it, etc
Message ID:
1251051664.17434.5.camel@x2.entropy.homelinux.org
Hi all.

I'm setting up a mod_perl & soap server, and a friend is writing a java
client. As I commented to him, it's a bit like the blind leading the
blind at this point :)

His request is causing mod_perl to complain about not being able to
serialize the request, with an error in XML::Parser.

I would very much like to see what request has arrived.

I've tried in the dispatcher:

sub handler {

   my $request = shift;

   open( FH, ">>/tmp/soap.log" );
   print FH "\n\n\n" . $request->as_string . "\n\n\n";
   close FH;
   
}

Perhaps there is a better way to do this? I'd be surprised if there
weren't. Anyway, this isn't really working. I'm getting *some* things
logged, eg:

POST /something/ HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Accept: text/xml, multipart/*, application/soap
Host: entropy.homelinux.org
User-Agent: SOAP::Lite/Perl/0.710.08
Content-Length: 476
Content-Type: text/xml; charset=utf-8
SOAPAction: "/something_else"

 ... but the actual SOAP envelope is missing. How do I get hold of the
WHOLE request?

Thanks :)

Dan


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About