--------------------- PatchSet 3929 Date: 2002/04/07 00:45:59 Author: hno Branch: vary-2_4 Tag: (none) Log: Fix for an assertion failure on Vary with odd headers Members: src/HttpHeader.c:1.3.4.2.2.3->1.3.4.2.2.3.2.1 Index: squid/src/HttpHeader.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpHeader.c,v retrieving revision 1.3.4.2.2.3 retrieving revision 1.3.4.2.2.3.2.1 diff -u -r1.3.4.2.2.3 -r1.3.4.2.2.3.2.1 --- squid/src/HttpHeader.c 1 Feb 2001 13:59:31 -0000 1.3.4.2.2.3 +++ squid/src/HttpHeader.c 7 Apr 2002 00:45:59 -0000 1.3.4.2.2.3.2.1 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.c,v 1.3.4.2.2.3 2001/02/01 13:59:31 hno Exp $ + * $Id: HttpHeader.c,v 1.3.4.2.2.3.2.1 2002/04/07 00:45:59 hno Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -620,16 +620,16 @@ 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; } /*