Bug 52523 - Headers from mod_expires are wrongly set for redirects too and can't be removed or changed
Summary: Headers from mod_expires are wrongly set for redirects too and can't be remov...
Status: RESOLVED DUPLICATE of bug 44518
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_expires (show other bugs)
Version: 2.2.21
Hardware: PC FreeBSD
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2012-01-25 14:50 UTC by Andrey Chernov
Modified: 2015-07-27 05:57 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Chernov 2012-01-25 14:50:34 UTC
mod_expires should honor "onsuccess" for its headers added or use some "early" equivalent. It gives wrong result for redirects otherwise.

F.e. there is a way to add or remove some headers just for redirect, like that:

Header always set Pragma no-cache env=redir
RewriteRule ^a\.html$ http://example.com/b.html [L,R=301,E=redir:1]

but combined with mod_expires such way not works. This example

<Files a.html>
ExpiresDefault "access plus 1 day"

Header unset Cache-Control env=redir
Header unset Expires env=redir
Header always unset Cache-Control env=redir
Header always unset Expires env=redir
RewriteRule ^a\.html$ http://example.com/b.html [L,R=301,E=redir:1]

still have Cache-Control and Expires headers. Please fix this bug.
Comment 1 Christophe JAILLET 2015-07-27 05:57:08 UTC

*** This bug has been marked as a duplicate of bug 44518 ***