Actions
Bug #1322
closedetags checked in http-header-glue.c even when unconfigured
ASK QUESTIONS IN Forums:
Description
I have etags disabled via the new 1.4.16 feature, but when a if-none-match header is received it still tries to issue a etag_is_equal (etag.c) in http_response_handle_cachable (http-header-glue.c). This patch checks if con->physical.etag is defined before calling etag_is_equal. I believe this is somewhat rare, because I think it needs to come from a prior request where ETag was set, and now it's not configured.
--- http-header-glue.c.orig 2007-08-23 11:09:48.000000000 -0700 +++ http-header-glue.c 2007-08-23 11:08:44.000000000 -0700 @@ -241,7 +241,7 @@ */ /* last-modified handling */ - if (con->request.http_if_none_match) { + if (con->request.http_if_none_match && con->physical.etag) { if (etag_is_equal(con->physical.etag, con->request.http_if_none_match)) { if (con->request.http_method == HTTP_METHOD_GET || con->request.http_method == HTTP_METHOD_HEAD) {
-- ethan
Files
Updated by Anonymous about 17 years ago
The above patch doesn't catch the error actually, a new patch that check con->physical.etag->ptr has been attached, and the fix has been moved into etag.c, as it's probably cleaner.
-- ethan
Updated by darix about 17 years ago
- Status changed from New to Fixed
- Resolution set to fixed
Actions
Also available in: Atom