]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bugzilla #274: Assertion failure on ETag with odd headers
authorhno <>
Sun, 7 Apr 2002 07:41:54 +0000 (07:41 +0000)
committerhno <>
Sun, 7 Apr 2002 07:41:54 +0000 (07:41 +0000)
src/HttpHeader.cc

index fb8e7888689d03b886f737d2b6b6b9752ab7681c..01dcf432ac94ab9466a7ca5410d583a42b225e81 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeader.cc,v 1.74 2001/10/24 08:19:07 hno Exp $
+ * $Id: HttpHeader.cc,v 1.75 2002/04/07 00:41:54 hno Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -621,16 +621,16 @@ httpHeaderGetList(const HttpHeader * hdr, http_hdr_type id)
 String
 httpHeaderGetStrOrList(const HttpHeader * hdr, http_hdr_type id)
 {
-    const char *str;
-    String s;
+    HttpHeaderEntry *e;
 
     if (CBIT_TEST(ListHeadersMask, id))
-       s = httpHeaderGetList(hdr, id);
-    else {
-       str = httpHeaderGetStr(hdr, id);
-       stringInit(&s, str);
+       return httpHeaderGetList(hdr, id);
+    if ((e = httpHeaderFindEntry(hdr, id))) {
+       String s;
+       stringInit(&s, strBuf(e->value));
+       return s;
     }
-    return s;
+    return StringNull;
 }
 
 /*