Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 45834 invoked from network); 21 Nov 2008 17:01:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Nov 2008 17:01:33 -0000 Received: (qmail 69858 invoked by uid 500); 21 Nov 2008 17:01:35 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 69805 invoked by uid 500); 21 Nov 2008 17:01:35 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 69767 invoked by uid 99); 21 Nov 2008 17:01:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2008 09:01:35 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gvz@2scale.de designates 212.12.33.142 as permitted sender) Received: from [212.12.33.142] (HELO smile.2scale.net) (212.12.33.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2008 17:00:11 +0000 Received: from dslb-088-078-150-196.pools.arcor-ip.net ([88.78.150.196] helo=[192.168.1.101]) by smile.2scale.net with esmtpa (Exim 4.63) (envelope-from ) id 1L3ZNH-0008P5-0U for dev@httpd.apache.org; Fri, 21 Nov 2008 18:00:55 +0100 Message-Id: <3373933F-7669-40E3-B3A6-910F492C27E3@2scale.de> From: "Georg v. Zezschwitz" To: dev@httpd.apache.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: ResponseHeaders to Environment Date: Fri, 21 Nov 2008 18:00:54 +0100 X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am uncertain if I should write my own "private" module or extends an existing Apache module. I used to have in the past the situation that I wanted to log request headers, but did not want to pass them to the backend by mod_proxy. This is possible by first exporting the request header value to the environment, then dropping the request header and logging the environment variable. Now I need the other way round: The backend server (Tomcat) shall set several headers in the response for logging purposes in the Apache log, but these headers should not be sent to the (poor mobile) client. Using mod_headers intercepts too early: If "Header unset" is used, the response header will not be accessible in a LogFormat "%{my-output- header}o" form. So, I am looking for a method to transfer response header values to the environment and log them with a "%{my-output-header}e" directive. One approach would be to modify "mod_setenvif' by a "SetEnvIfLate" that also refers to response headers. Another approach would be to extend mod_env by a PassEnvRequestHeader PassEnvResponseHeader I consider both approaches not being really beautiful... Any better idea? Anyway, is my extension too exotic? For a better understanding: The backend application is a mobile rendering proxy. I want to log: - the actual URL that was fetched by the request - if the customer got an error message: The error message - the customer identity Best regards, Georg