Ticket #1322 (closed defect: fixed)

Opened 13 months ago

Last modified 13 months ago

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

Reported by: ethan@… Owned by: jan
Priority: normal Milestone: 1.4.17
Component: core Version: 1.4.16
Severity: normal Keywords: etag
Cc: Blocked By:
Need User Feedback: no Blocking:

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) {

Attachments

backtrace.txt (0.7 kB) - added by ethan@… 13 months ago.
Backtrace from crash
etag.patch (330 bytes) - added by ethan@… 13 months ago.

Change History

Changed 13 months ago by ethan@…

Backtrace from crash

Changed 13 months ago by ethan@…

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.

Changed 13 months ago by ethan@…

Changed 13 months ago by darix

fixed in r1971

Changed 13 months ago by darix

  • status changed from new to closed
  • resolution set to fixed

Add/Change #1322 (etags checked in http-header-glue.c even when unconfigured)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.