]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE3-hostheader.patch
- updated to 2.5.STABLE13
[packages/squid.git] / squid-2.5.STABLE3-hostheader.patch
1 Index: squid/src/http.c
2 diff -c squid/src/http.c:1.384.2.5 squid/src/http.c:1.384.2.6
3 *** squid/src/http.c:1.384.2.5  Thu Jun 19 18:18:50 2003
4 --- squid/src/http.c    Fri Jul 11 16:40:34 2003
5 ***************
6 *** 795,809 ****
7             break;
8         case HDR_HOST:
9             /*
10 !            * Normally Squid does not copy the Host: header from
11 !            * a client request into the forwarded request headers.
12 !            * However, there is one case when we do: If the URL
13              * went through our redirector and the admin configured
14              * 'redir_rewrites_host' to be off.
15              */
16 !           if (request->flags.redirected)
17 !               if (!Config.onoff.redir_rewrites_host)
18 !                   httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e));
19             break;
20         case HDR_IF_MODIFIED_SINCE:
21             /* append unless we added our own;
22 --- 795,816 ----
23             break;
24         case HDR_HOST:
25             /*
26 !            * Normally Squid rewrites the Host: header.
27 !            * However, there is one case when we don't: If the URL
28              * went through our redirector and the admin configured
29              * 'redir_rewrites_host' to be off.
30              */
31 !           if (request->flags.redirected && !Config.onoff.redir_rewrites_host)
32 !               httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e));
33 !           else {
34 !               /* use port# only if not default */
35 !               if (orig_request->port == urlDefaultPort(orig_request->protocol)) {
36 !                   httpHeaderPutStr(hdr_out, HDR_HOST, orig_request->host);
37 !               } else {
38 !                   httpHeaderPutStrf(hdr_out, HDR_HOST, "%s:%d",
39 !                       orig_request->host, (int) orig_request->port);
40 !               }
41 !           }
42             break;
43         case HDR_IF_MODIFIED_SINCE:
44             /* append unless we added our own;
This page took 0.069224 seconds and 3 git commands to generate.