Bug 23748 - "internal error: bad expires code" if expires criteria aren't met
Summary: "internal error: bad expires code" if expires criteria aren't met
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_expires (show other bugs)
Version: 2.0.47
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
: 21907 24459 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-11 20:19 UTC by Liam Quinn
Modified: 2006-01-13 13:39 UTC (History)
3 users (show)



Attachments
Patch to eliminate the error (428 bytes, patch)
2003-10-12 18:15 UTC, Liam Quinn
Details | Diff
Alternate patch that uses NULL for expiresdefault (669 bytes, patch)
2003-10-12 23:05 UTC, Liam Quinn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***