Hi everybody, in https://bz.apache.org/bugzilla/show_bug.cgi?id=58231 I am trying to figure out how to make Vary headers works for RewriteCond in the directory context. From the docs:
http://httpd.apache.org/docs/current/mod/mod_rewrite.html "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 internal_internal_redirect(). Does this approach make sense? Is there any smarter way to do it? Thanks a lot! Luca