From: wessels <> Date: Tue, 9 May 2006 23:44:23 +0000 (+0000) Subject: Bug #1531: squid crashes short after starting X-Git-Tag: SQUID_3_0_PRE4~167 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf3bf0cddb6b7626b8d111647f4bd3548dbec179;p=thirdparty%2Fsquid.git Bug #1531: squid crashes short after starting When HttpHeaderEntry was converted to a class with methods I added a constructor that took no arguments. It initialized id to HDR_BAD_HDR. If header parsing fails, HDR_BAD_HDR triggers an assertion in the destructor. As a workaround id is now initialized to HDR_OTHER. --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index f8bf26c2bd..7a7296ba5e 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.118 2006/05/08 20:59:28 wessels Exp $ + * $Id: HttpHeader.cc,v 1.119 2006/05/09 17:44:23 wessels Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -1312,7 +1312,7 @@ HttpHeaderEntry::HttpHeaderEntry(http_hdr_type anId, const char *aName, const ch * Construct a "blank" object. Should call parse() after creating one of these * */ -HttpHeaderEntry::HttpHeaderEntry() : id(HDR_BAD_HDR), name(NULL), value(NULL) +HttpHeaderEntry::HttpHeaderEntry() : id(HDR_OTHER), name(NULL), value(NULL) { debug(55, 9) ("created blank HttpHeaderEntry %p\n", this); }