Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Get the raw request sent to my script

by Roland684 (Novice)
on Oct 18, 2011 at 13:36 UTC ( #932154=perlquestion: print w/replies, xml ) Need Help??
Roland684 has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to debug a program which sends a (soap) request to a remote server. The server keeps responding with some weird message, so I started to wonder what I'm sending exactly to that server.

I thought I'd create a small script to which I direct the program's requests and this script should store the exact request in a file, so I can inspect what request was sent.

Getting the parsed parameters is dead simple, that's what we always do and luckily you do never have to do any parsing yourself. Unfortunately every piece of information seems to be about accessing the parsed data, never the unparsed bytes.
I'm not even sure the http-headers reacht perl or are stripped away by Apache.

Is there any way to access the original request data?
Preferably including the http header and all?

Replies are listed 'Best First'.
Re: Get the raw request sent to my script
by Anonymous Monk on Oct 18, 2011 at 13:52 UTC
Re: Get the raw request sent to my script
by mrstlee (Beadle) on Oct 19, 2011 at 14:45 UTC

    Can I find out a little more about the context?

    Your script pretends to be an HTTP server?
    Are you using SOAP::Lite or something similar to process the request?

    Any chance you could post the relevant code?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://932154]
Approved by Corion
Front-paged by Corion
and the daffodils sway...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-12-17 18:00 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (466 votes). Check out past polls.