httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurag Kapur <anuragka...@gmail.com>
Subject Re: [users@httpd] Conditionally Setting HTTP Response Header
Date Mon, 15 Mar 2010 14:59:17 GMT
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"

Note: I realized the problem with the syntax I was using after you pointed
it out and tried the above after fixing it (I think).

-Anurag

On Mon, Mar 15, 2010 at 2:26 PM, Eric Covener <covener@gmail.com> wrote:

> On Mon, Mar 15, 2010 at 10:19 AM, Anurag Kapur <anuragkapur@gmail.com>
> 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 away existing headers.
>
> I don't think the syntax is right on either one, was this verbatim
> from something you tested?  Shouldn't this just be:
>
> SetEnvIf Cache-Control .+ cc_set=1
> Header set Cache-Control ...  env=cc_set
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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