Re: [us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Eric Covener
On Mon, Mar 15, 2010 at 11:15 AM, Anurag Kapur wrote: > I saw it used > here http://mail-archives.apache.org/mod_mbox/httpd-dev/200609.mbox/%3c450543d6.80...@web.turner.com%3e > I thought it is needed to differentiate a field set in the response header > from that in the request header. But after

Re: [us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Anurag Kapur
I saw it used here http://mail-archives.apache.org/mod_mbox/httpd-dev/200609.mbox/%3c450543d6.80...@web.turner.com%3e I thought it is needed to differentiate a field set in the response header from that in the request header. But after reading the documentation again, I see it says: An HTTP reque

Re: [us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Eric Covener
On Mon, Mar 15, 2010 at 10:59 AM, Anurag Kapur wrote: > Below is exactly what I tried: >    SetEnvIfNoCase response Cache-Control .+ cc_set=123 >    Header append X-ws "test" env=cc_set > Expected output: If response does not have Cache-Control set, the X-ws field > should display the text "test".

Re: [us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Anurag Kapur
Below is exactly what I tried: SetEnvIfNoCase response Cache-Control .+ cc_set=123 Header append X-ws "test" env=cc_set Expected output: If response does not have Cache-Control set, the X-ws field should display the text "test". Actual output: X-ws field did not display the text "test" Not

Re: [us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Eric Covener
On Mon, Mar 15, 2010 at 10:19 AM, Anurag Kapur wrote: > I have been trying configurations like the following: > SetEnvIf response Cache-Control !"^max-age*$" > test=ThisShouldDisplayInXwsField > Header append X-ws test Re-reading OP, it sounds like you just want Expires. I don't think it blows aw

Re: [us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Anurag Kapur
I have been trying configurations like the following: SetEnvIf response Cache-Control !"^max-age*$" test=ThisShouldDisplayInXwsField Header append X-ws test With the above, as a first step I was trying to test if I can detect the presence of Cach-Control max-age field in the Response header. What

Re: [us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Eric Covener
> I have been trying to work with mod_setenvif module to start but have not > made any progress and thus seeking your help. Show us what you have, and what it does. -- Eric Covener cove...@gmail.com - The official User-To-User

Re: [us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Baljeet Nijjhar
Hi Anurag I have had the exact same problem and posted in http://www.gossamer-threads.com/lists/apache/users/382031?page=last You can use ExpiresDefault/ExpiresByType (this adds both an Expires and Cache-Control: max-age header to simultaneously support HTTP 1.0 and HTTP 1.1) or use LocationMatch.

[us...@httpd] Conditionally Setting HTTP Response Header

2010-03-15 Thread Anurag Kapur
Hello, I am looking for some help to set HTTP response headers conditionally. I have a setup where HTTPD sits in front of Tomcat and proxies requests to it. *Problem Statement* Set a Cache-Control max-age directive in the HTTP response header through HTTPD if it doesn't already exist. In addition