httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Adding a Header to the httpd response
Date Mon, 21 Apr 2008 14:47:30 GMT
On Mon, Apr 21, 2008 at 10:34 AM, Joshua Slive <joshua@slive.ca> wrote:
> On Mon, Apr 21, 2008 at 9:38 AM, Mohammed Salih <linusali@gmail.com> wrote:
>  > Thank you all for your reply.
>  >
>  >  Yes I am using Header to set the Cache-Control header. and it is doing
>  >  it job. but some times the application might have already set this
>  >  header. So I want to avoid setting it again using the Header module.
>  >
>
>  See example #4:
>  http://httpd.apache.org/docs/2.2/mod/mod_headers.html#examples
>
>  SetEnvIf Cache-Control .+ got-cache-control=1
>  Header set Cache-Control blah env=!got-cache-control

Oh, wait a sec. That's not going to work because SetEnvIf matches
request headers, not response headers.

You could try "Header edit" using a negative-lookahead regex to
exclude requests already containing something in Cache-Control. Other
than that, I think this would require a simple custom module.

Joshua.

---------------------------------------------------------------------
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