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 19:12:57 GMT
Solutio at Gmail wrote:
> Thank you for the advice and introduction to the forum rules. I 
> "lowercased" the subject.
> As for the options available, we would like to avoid sending the same 
> request to the web server (Apache) if possible. Sure, LWP could emulate 
> a web client, but our goal is to fork the very same HTTP response that 
> Apache sends to the browser, into a file, rather than repeating the 
> request. One of the reasons being that as I mentioned, the data in the 
> response can already be different.
First, you could have a look at
but I don't think this is really what you want.

If you want to be more selective, and choose to which file you are 
dumping these responses, I think you're going to have to use (and 
probably create) your own output filter.

For me, the easiest way would be to do that using mod_perl.
Have a look here :
and here

Is that in your league ?

Basically, the idea would be that you have a first module that is 
inserted somewhere early in the request processing, and based on some 
request characteristic, decides if yes or no this request's output 
should be logged.  You probably do not want to do this permanently, not 
for all requests, because (a) it would have a major impact on server 
performance and (b) it would generate huge output volumes.
(That module could just be mod_setenvif, to set a variable if you want 

Second, you would have an output filter that actually does the logging 
work, if it has been turned on by the module above.
mod_perl allows you to dynamically insert an output filter just for the 
current request, or not, depending.
On the other hand, if your filter is configured to be there statically, 
then you would want to set some value whereby it can just return DECLINE 
to Apache, so that it will be bypassed for the current request.

Still with me ?

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