]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE10-content_length.patch
- removed outdated squid patches, they're all in sources
[packages/squid.git] / squid-2.5.STABLE10-content_length.patch
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
5 ***************
6 *** 475,483 ****
7         }
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);
13             } else {
14                 debug(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2)
15                     ("NOTICE: found double content-length header\n");
16 --- 475,499 ----
17         }
18         if (e->id == HDR_CONTENT_LENGTH && (e2 = httpHeaderFindEntry(hdr, e->id)) != NULL) {
19             if (strCmp(e->value, strBuf(e2->value)) != 0) {
20 !               squid_off_t l1, l2;
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);
25 !               }
26 !               if (!httpHeaderParseSize(strBuf(e->value), &l1)) {
27 !                   debug(55, 1) ("WARNING: Unparseable content-length '%s'\n", strBuf(e->value));
28 !                   httpHeaderEntryDestroy(e);
29 !                   continue;
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);
35 !               } else {
36 !                   httpHeaderEntryDestroy(e);
37 !                   continue;
38 !               }
39             } else {
40                 debug(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2)
41                     ("NOTICE: found double content-length header\n");
This page took 0.030739 seconds and 3 git commands to generate.