httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Solutio at Gmail" <solu...@gmail.com>
Subject Re: [users@httpd] Capturing server response
Date Sun, 01 Feb 2009 20:08:11 GMT
Gotcha. I haven't had to do that before, but I am sure I will figure that 
out. We will try this solution as well as setting up a proxy, to see which 
will have the least impact on the overall performance. Thanks heaps.

--------------------------------------------------
From: "André Warnier" <aw@ice-sa.com>
Sent: Sunday, February 01, 2009 1:12 PM
To: <users@httpd.apache.org>
Subject: Re: [users@httpd] Capturing server response

> 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.
>>
> Allright.
> First, you could have a look at 
> http://httpd.apache.org/docs/2.2/mod/mod_dumpio.html
> 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 :
> http://perl.apache.org/docs/2.0/api/Apache2/Filter.html
> and here
> http://perl.apache.org/docs/2.0/user/handlers/filters.html#Adding_OutputFilters_Dynamically
>
> 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 
> logging).
>
> 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:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message