httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [users@httpd] CAPTURING SERVER RESPONSE
Date Sun, 01 Feb 2009 09:46:54 GMT
Solutio at Gmail wrote:
> Hi Everybody,
> I wonder if there is a way to capture the entire Apache response, including its body,
on the server side, and store it in a file, so we could check what the user actually gets
by viewing the contents in a browser? We keep requests for audit purposes, but the data changes
quickly, and the same request can result in a different response over time. I looked for ideas
on Google and CPAN, but haven't been able to find any definite answer so far.
First, just a small item relating to "etiquette" (politeness etc..) in 
forums like this one : writing something in CAPITALS is generally 
considered as equivalent to shouting.  So it's not a very good idea to 
use that in the subject of your posting.

About your question :
There are may ways to capture the response of a HTTP server. The easiest 
ones consist of programs that can act as a "client" (like a browser), 
and save the answer from the server to a disk file.
If you have perl installed wherever, I suggest to have a look at the 
"lwp-request" command, which is very flexible and allows you to tailor 
what you send to the server as well as what you want to see (or save) at 
the client level.
In the simplest form :
lwp-request -m GET ""
lwp-request -m GET "" > saved_file.html

I suggest the above because it will run on whatever platform, as long as 
perl is inatalled on it.

There are a bunch of other programs that can do similar things, 
including saving a whole website if you wish.  Look at "curl", "wget" 
etc.. Their availability may depend on the platform.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message