SPUG: Re: Dumping HTTP headers

Richard Anderson Richard.Anderson at seaslug.org
Mon Apr 10 19:45:12 CDT 2000


Thanks for all the creative responses to my post.  Jeremy Mates' response
pointed me in the right direction.  The solution is to use the as_string
method from the HTTP::Headers module.

When run from the command line, the attached script sends an HTTP request to
a remote server.  The remote server's response goes to standard out; the
HTTP headers for the outgoing request to the remote server are written to
the file tmp in the current directory.

Richard.Anderson at seaslug.org
www.zipcon.net/~starfire/home (personal)
www.raycosoft.com (corporate)
----- Original Message -----
From: "Richard Anderson" <Richard.Anderson at seaslug.org>
To: <spug-list at pm.org>
Sent: Monday, April 10, 2000 1:45 PM
Subject: SPUG: Dumping HTTP headers


> Not necessarily a SPUG question, perhaps, but:  I need to debug an HTTP
> request I am generating using the LWP and HTTP::Request::Common modules.
> How can I send a request to my (Apache) webserver and get a dump of the
HTTP
> headers?
> Obviously, I could write a custom CGI script to do this, but is there an
> easier way?
>
> Richard.Anderson at seaslug.org
> www.zipcon.net/~starfire/home (personal)
> www.raycosoft.com (corporate)
>
>
>
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
>  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
>  SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe
>            Email to majordomo at pm.org: "action" spug-list your_address
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: purchase3.pl
Type: application/octet-stream
Size: 3238 bytes
Desc: not available
Url : http://mail.pm.org/archives/spug-list/attachments/20000410/d0f0b9bd/purchase3.obj


More information about the spug-list mailing list