Project

General

Profile

Actions

Bug #1322

closed

etags checked in http-header-glue.c even when unconfigured

Added by Anonymous over 16 years ago. Updated over 16 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
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

backtrace.txt (747 Bytes) backtrace.txt Backtrace from crash -- ethan Anonymous, 2007-08-23 18:20
etag.patch (330 Bytes) etag.patch -- ethan Anonymous, 2007-08-24 22:56
Actions #1

Updated by Anonymous over 16 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

Actions #2

Updated by darix over 16 years ago

fixed in r1971

Actions #3

Updated by darix over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed
Actions

Also available in: Atom