Bug 21907

Summary: suggest that one can set ExpiresByType while other files do not set expires header
Product: Apache httpd-2 Reporter: oink <Xuefer>
Component: mod_expiresAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED DUPLICATE    
Severity: enhancement    
Priority: P3    
Version: 2.0.47   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description oink 2003-07-26 08:22:46 UTC
error:
[Sat Jul 26 16:06:39 2003] [error] [client 127.0.0.1] internal error: bad 
expires code: D:/Program Files/Apache 
Group/Apache2/manual/mod/mod_expires.html.en, referer: http://www.our-sky.com-
/manual/mod/

config:
ExpiresActive On
ExpiresByType image/gif "access plus 5 minutes"
ExpiresByType image/jpeg "access plus 5 minutes"

u may say i have to set ExpiresDefault 
however, it's not possible for us to "DeActive" those files which hadn't been 
set by "ExpiresByType"

we'd like to ExpiresByType while other file don't need Expires header

yes, i know one can use <Location> on files we need expres, and not on file we 
don't need, but it's more difficult
Comment 1 Morten Rønne 2003-10-06 16:59:24 UTC
The problem seems to be that expiresdefault is set to "" and not null as the 
default value when creating a new configuration block. That means that the test 
in line 514 of modules/metadata/mod_expires.c thinks expiry is set, when it is 
not.
Either expiresdefault should be set to NULL or the test should check for an 
empty expire (add "&& expiry[0]" to if statement).
Comment 2 Allan Edwards 2005-06-22 20:32:09 UTC

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