Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 85168 invoked from network); 1 Feb 2009 19:17:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Feb 2009 19:17:56 -0000 Received: (qmail 75041 invoked by uid 500); 1 Feb 2009 19:17:45 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 75023 invoked by uid 500); 1 Feb 2009 19:17:45 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 75013 invoked by uid 99); 1 Feb 2009 19:17:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Feb 2009 11:17:45 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.174 as permitted sender) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Feb 2009 19:17:36 +0000 Received: from [192.168.245.129] (p549E8798.dip0.t-ipconnect.de [84.158.135.152]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id n11JHFP1010833 for ; Sun, 1 Feb 2009 20:17:15 +0100 Message-ID: <4985F439.1050509@ice-sa.com> Date: Sun, 01 Feb 2009 20:12:57 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: users@httpd.apache.org References: <49856F8E.60504@ice-sa.com> <91A0A4334E244D1D962B6C44A46EC75A@ICAD820ASAIP> In-Reply-To: <91A0A4334E244D1D962B6C44A46EC75A@ICAD820ASAIP> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8933/Sun Feb 1 06:27:00 2009 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on 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 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