Summary: | Don't set expires header on HTTP redirect. | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Tai Lee <real.human> |
Component: | mod_expires | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | ache, jerome.renard, real.human |
Priority: | P2 | ||
Version: | 2.5-HEAD | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | patch attempt for issue 4451 |
Description
Tai Lee
2008-03-02 14:52:48 UTC
Marking as an enhancement request. An application such as yours that may return different HTTP statuses should traditionally be taking care of its own Expires headers. But you have a point: this could work as a configuration option. Created attachment 24271 [details]
patch attempt for issue 4451
Good evening.
Please find attached a patch which implement this enhancement request.
A new configuration directive has been added : ExpiresIgnoreRedirect
I tested with the following configuration :
<Directory /Users/jerome/work/www/perso/apache/issues/44518/>
<IfModule mod_expires.c>
ExpiresActive On
# When set to Yes an Expires header will be sent
# even if a Location header is present
# Posible values : 'Yes' or 'No'
# Default value : No
ExpiresIgnoreRedirect Yes
ExpiresDefault "access plus 1 year"
# ExpiresByType text/html M604800
</IfModule>
</Directory>
Tested with ExpiresDefault and ExpiresByType and it seems to work fine.
The patch has been generated against SVN trunk.
Any comment/feedback welcome.
Best Regards.
|