Bug 23748

Summary: "internal error: bad expires code" if expires criteria aren't met
Product: Apache httpd-2 Reporter: Liam Quinn <liam>
Component: mod_expiresAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: normal CC: dlr, info, Xuefer
Priority: P3 Keywords: PatchAvailable
Version: 2.0.47   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch to eliminate the error
Alternate patch that uses NULL for expiresdefault

Description Liam Quinn 2003-10-11 20:19:15 UTC
I had been using the following directives with Apache 1.3.27:

ExpiresActive On
ExpiresByType image/gif A5184000
ExpiresByType image/jpeg A5184000

When I upgraded to Apache 2.0.47, I began getting entries such as these in my
error_log:

[Sat Oct 11 16:02:54 2003] [error] [client w.x.y.z] internal error: bad expires
code: /foo/bar/index.html
[Sat Oct 11 16:10:44 2003] [error] [client w.x.y.z] internal error: bad expires
code: /foo/bar/all.txt

These errors occur whenever there should be no Expires header (since no
ExpiresByType matches and no ExpiresDefault is specified). With Apache 1.3.27,
no such errors occurred.

In case it's relevant, I'm using Linux x86, kernel 2.2.19.
Comment 1 Liam Quinn 2003-10-12 18:15:21 UTC
Created attachment 8538 [details]
Patch to eliminate the error
Comment 2 André Malo 2003-10-12 21:59:22 UTC
Hmm. I think, the right fix would be to set
new->expiresdefault = NULL
in create_dir_expires_config and to change the merger accordingly. Your fix 
seems to be just a work around.

Thanks for the report and thanks for using Apache!
Comment 3 Liam Quinn 2003-10-12 23:05:10 UTC
Created attachment 8544 [details]
Alternate patch that uses NULL for expiresdefault
Comment 4 Jeff Trawick 2003-11-21 22:36:10 UTC
enabling the PatchAvailable keyword
updated doc on submitting patches is at http://httpd.apache.org/dev/patches.html
Comment 5 Paul J. Reder 2003-11-21 23:05:41 UTC
*** Bug 24459 has been marked as a duplicate of this bug. ***
Comment 6 Paul J. Reder 2003-11-21 23:46:08 UTC
I have tested and committed this patch to the 2.1-dev branch of Apache and
submitted it for a vote for backporting into the 2.0 stable branch.

Thank you for using Apache and for taking the time to track down a fix and
submit a patch.
Comment 7 Paul J. Reder 2003-11-21 23:46:37 UTC
I have tested and committed this patch to the 2.1-dev branch of Apache and
submitted it for a vote for backporting into the 2.0 stable branch.

Thank you for using Apache and for taking the time to track down a fix and
submit a patch.
Comment 8 Allan Edwards 2005-06-22 20:32:09 UTC
*** Bug 21907 has been marked as a duplicate of this bug. ***