httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Toscano <>
Subject mod_rewrite, vary headers and internal redirects
Date Sun, 08 Oct 2017 09:59:05 GMT
Hi everybody,

in I am trying to
figure out how to make Vary headers works for RewriteCond in the directory
context. From the docs:

"If a HTTP header is used in a condition this header is added to the Vary
header of the response in case the condition evaluates to true for the
request. It is not added if the condition evaluates to false for the
request. Adding the HTTP header to the Vary header of the response is
needed for proper caching."

But this doesn't work yet in trunk within a Directory context, since IIUC
an internal redirect happens as consequence of a RewriteRule (following a
RewriteCond that evaluates to true) and all the response headers are
cleared out (including the Vary ones set). I added some attempts to fix the
issue to the bugzilla task, but the one that I like the most is having a
simple "keep-vary-header" note that is checked in

Does this approach make sense? Is there any smarter way to do it?

Thanks a lot!


View raw message