Hi Chris,

Thanks for your reply. I am actually trying to use a combination
of mod_setenvif and mod_headers. mod_headers can do the job as long as an
appropriate environment variable is set. I am trying to achieve the desired
outcome using something like the following:

  SetEnvIf Cache-Control .+ cc_set=123
  Header set Cache-Control "max-age=1000" env=!cc_set

However, since SetEnvIf directive operates on request (not response)
headers, I am unable to set the right environment variable to be used by the
Header directive (a part of mod_headers).

In summary, to be able to use mod_headers to solve this problem, I need an
environment variable set conditionally based on the "response" header.
However, I have not been able to achieve this using SetEnvIf, as it operated
on request headers and not response headers.

Would be great if someone who knows of an alternate can his/her inputs.

Regards
Anurag


On Mon, Mar 15, 2010 at 4:05 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Anurag,
>
> On 3/15/2010 9:12 AM, Anurag Kapur wrote:
> > 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.
>
> [snip]
>
> > I have been trying to work with mod_setenvif module to start but have not
> > made any progress and thus seeking your help.
>
> Try looking at mod_headers.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkueWtAACgkQ9CaO5/Lv0PCLHgCfQXl6Jdpg1HCw6PiTElP+qB2l
> 6OoAn1oBY9uCejofCnUP8ko9Ypledp/1
> =nSoB
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to