]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1531: squid crashes short after starting
authorwessels <>
Tue, 9 May 2006 23:44:23 +0000 (23:44 +0000)
committerwessels <>
Tue, 9 May 2006 23:44:23 +0000 (23:44 +0000)
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.

src/HttpHeader.cc

index f8bf26c2bd483f68e2a204e4e33a4746b4107533..7a7296ba5e8871ecd52298f75ea5432096570bdf 100644 (file)
@@ -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);
 }