1 Index: squid/src/HttpHeader.c
2 diff -c squid/src/HttpHeader.c:1.74.2.28 squid/src/HttpHeader.c:1.74.2.29
3 *** squid/src/HttpHeader.c:1.74.2.28 Fri May 6 15:32:09 2005
4 --- squid/src/HttpHeader.c Wed May 25 16:57:33 2005
8 if (e->id == HDR_CONTENT_LENGTH && (e2 = httpHeaderFindEntry(hdr, e->id)) != NULL) {
9 if (strCmp(e->value, strBuf(e2->value)) != 0) {
10 ! debug(55, 1) ("WARNING: found two conflicting content-length headers in {%s}\n", getStringPrefix(header_start, header_end));
11 ! httpHeaderEntryDestroy(e);
12 ! return httpHeaderReset(hdr);
14 debug(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2)
15 ("NOTICE: found double content-length header\n");
18 if (e->id == HDR_CONTENT_LENGTH && (e2 = httpHeaderFindEntry(hdr, e->id)) != NULL) {
19 if (strCmp(e->value, strBuf(e2->value)) != 0) {
21 ! debug(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2) ("WARNING: found two conflicting content-length headers in {%s}\n", getStringPrefix(header_start, header_end));
22 ! if (!Config.onoff.relaxed_header_parser) {
23 ! httpHeaderEntryDestroy(e);
24 ! return httpHeaderReset(hdr);
26 ! if (!httpHeaderParseSize(strBuf(e->value), &l1)) {
27 ! debug(55, 1) ("WARNING: Unparseable content-length '%s'\n", strBuf(e->value));
28 ! httpHeaderEntryDestroy(e);
30 ! } else if (!httpHeaderParseSize(strBuf(e2->value), &l2)) {
31 ! debug(55, 1) ("WARNING: Unparseable content-length '%s'\n", strBuf(e2->value));
32 ! httpHeaderDelById(hdr, e2->id);
33 ! } else if (l1 > l2) {
34 ! httpHeaderDelById(hdr, e2->id);
36 ! httpHeaderEntryDestroy(e);
40 debug(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2)
41 ("NOTICE: found double content-length header\n");