Lines 20-27
Link Here
|
20 |
See http://devel.squid-cache.org/icap/ for further information |
20 |
See http://devel.squid-cache.org/icap/ for further information |
21 |
about the ICAP client project. |
21 |
about the ICAP client project. |
22 |
|
22 |
|
23 |
Patch last updated: 2005-12-17 |
23 |
Patch last updated: 2006-03-17 |
24 |
|
24 |
|
|
|
25 |
Index: errors/Azerbaijani/ERR_ICAP_FAILURE |
26 |
=================================================================== |
27 |
RCS file: errors/Azerbaijani/ERR_ICAP_FAILURE |
28 |
diff -N errors/Azerbaijani/ERR_ICAP_FAILURE |
29 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
30 |
+++ errors/Azerbaijani/ERR_ICAP_FAILURE 8 Dec 2003 12:30:56 -0000 1.1.2.1 |
31 |
@@ -0,0 +1,31 @@ |
32 |
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
33 |
+<HTML><HEAD> |
34 |
+<TITLE>ERROR: The requested URL could not be retrieved</TITLE> |
35 |
+<STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE> |
36 |
+</HEAD><BODY> |
37 |
+<H1>ERROR</H1> |
38 |
+<H2>The requested URL could not be retrieved</H2> |
39 |
+<HR noshade size="1px"> |
40 |
+<P> |
41 |
+While attempting to retrieve the URL: |
42 |
+<A HREF="%U">%U</A> |
43 |
+<P> |
44 |
+the following error was encountered: |
45 |
+<UL> |
46 |
+<LI> |
47 |
+<STRONG> |
48 |
+ICAP protocol error. |
49 |
+</STRONG> |
50 |
+</UL> |
51 |
+ |
52 |
+<P> |
53 |
+<P> |
54 |
+Some aspect of the ICAP communication failed. Possible problems: |
55 |
+<UL> |
56 |
+<LI>ICAP server is not reachable. |
57 |
+<LI>Illegal response from ICAP server. |
58 |
+</UL> |
59 |
+</P> |
60 |
+ |
61 |
+<P>Your cache administrator is <A HREF="mailto:%w">%w</A>. |
62 |
+ |
25 |
Index: errors/Bulgarian/ERR_ICAP_FAILURE |
63 |
Index: errors/Bulgarian/ERR_ICAP_FAILURE |
26 |
=================================================================== |
64 |
=================================================================== |
27 |
RCS file: errors/Bulgarian/ERR_ICAP_FAILURE |
65 |
RCS file: errors/Bulgarian/ERR_ICAP_FAILURE |
Lines 1981-1991
Link Here
|
1981 |
Index: src/cf.data.pre |
2019 |
Index: src/cf.data.pre |
1982 |
=================================================================== |
2020 |
=================================================================== |
1983 |
RCS file: /cvsroot/squid/squid/src/cf.data.pre,v |
2021 |
RCS file: /cvsroot/squid/squid/src/cf.data.pre,v |
1984 |
retrieving revision 1.49.2.84 |
2022 |
retrieving revision 1.49.2.86 |
1985 |
retrieving revision 1.49.2.33.2.32 |
2023 |
retrieving revision 1.49.2.33.2.33 |
1986 |
diff -p -u -b -r1.49.2.84 -r1.49.2.33.2.32 |
2024 |
diff -p -u -b -r1.49.2.86 -r1.49.2.33.2.33 |
1987 |
--- src/cf.data.pre 21 Oct 2005 02:13:47 -0000 1.49.2.84 |
2025 |
--- src/cf.data.pre 26 Feb 2006 03:13:57 -0000 1.49.2.86 |
1988 |
+++ src/cf.data.pre 24 Oct 2005 17:07:42 -0000 1.49.2.33.2.32 |
2026 |
+++ src/cf.data.pre 16 Feb 2006 17:21:45 -0000 1.49.2.33.2.33 |
1989 |
@@ -2397,7 +2397,6 @@ DOC_START |
2027 |
@@ -2397,7 +2397,6 @@ DOC_START |
1990 |
ensure correct results it is best to set server_persisten_connections |
2028 |
ensure correct results it is best to set server_persisten_connections |
1991 |
to off when using this directive in such configurations. |
2029 |
to off when using this directive in such configurations. |
Lines 1994-2000
Link Here
|
1994 |
NAME: reply_header_max_size |
2032 |
NAME: reply_header_max_size |
1995 |
COMMENT: (KB) |
2033 |
COMMENT: (KB) |
1996 |
TYPE: b_size_t |
2034 |
TYPE: b_size_t |
1997 |
@@ -2716,6 +2715,177 @@ DOC_START |
2035 |
@@ -2716,6 +2715,187 @@ DOC_START |
1998 |
DOC_END |
2036 |
DOC_END |
1999 |
|
2037 |
|
2000 |
COMMENT_START |
2038 |
COMMENT_START |
Lines 2051-2060
Link Here
|
2051 |
+LOC: Config.icapcfg.send_client_ip |
2089 |
+LOC: Config.icapcfg.send_client_ip |
2052 |
+DEFAULT: off |
2090 |
+DEFAULT: off |
2053 |
+DOC_START |
2091 |
+DOC_START |
2054 |
+ This adds the header "X-Client-IP" to ICAP requests. Can also be |
2092 |
+ Allows Squid to add the "X-Client-IP" header if requested by |
2055 |
+ set from the server's response to OPTIONS. |
2093 |
+ an ICAP service in it's response to OPTIONS. |
2056 |
+DOC_END |
2094 |
+DOC_END |
2057 |
+ |
2095 |
+ |
|
|
2096 |
+NAME: icap_send_server_ip |
2097 |
+TYPE: onoff |
2098 |
+IFDEF: HS_FEAT_ICAP |
2099 |
+COMMENT: on|off |
2100 |
+LOC: Config.icapcfg.send_server_ip |
2101 |
+DEFAULT: off |
2102 |
+DOC_START |
2103 |
+ Allows Squid to add the "X-Server-IP" header if requested by |
2104 |
+ an ICAP service in it's response to OPTIONS. |
2105 |
+DOC_END |
2106 |
+ |
2058 |
+NAME: icap_send_auth_user |
2107 |
+NAME: icap_send_auth_user |
2059 |
+TYPE: onoff |
2108 |
+TYPE: onoff |
2060 |
+IFDEF: HS_FEAT_ICAP |
2109 |
+IFDEF: HS_FEAT_ICAP |
Lines 2062-2070
Link Here
|
2062 |
+LOC: Config.icapcfg.send_auth_user |
2111 |
+LOC: Config.icapcfg.send_auth_user |
2063 |
+DEFAULT: off |
2112 |
+DEFAULT: off |
2064 |
+DOC_START |
2113 |
+DOC_START |
2065 |
+ This adds the header "X-Authenticated-User" to ICAP requests |
2114 |
+ Allows Squid to add the "X-Authenticated-User" header if requested |
2066 |
+ if proxy access is authentified. Can also be set from the server's |
2115 |
+ by an ICAP service in it's response to OPTIONS. |
2067 |
+ response to OPTIONS. |
|
|
2068 |
+DOC_END |
2116 |
+DOC_END |
2069 |
+ |
2117 |
+ |
2070 |
+NAME: icap_auth_scheme |
2118 |
+NAME: icap_auth_scheme |
Lines 2199-2208
Link Here
|
2199 |
Index: src/client_side.c |
2247 |
Index: src/client_side.c |
2200 |
=================================================================== |
2248 |
=================================================================== |
2201 |
RCS file: /cvsroot/squid/squid/src/client_side.c,v |
2249 |
RCS file: /cvsroot/squid/squid/src/client_side.c,v |
2202 |
retrieving revision 1.47.2.71 |
2250 |
retrieving revision 1.47.2.76 |
2203 |
retrieving revision 1.47.2.28.2.40 |
2251 |
retrieving revision 1.47.2.28.2.40 |
2204 |
diff -p -u -b -r1.47.2.71 -r1.47.2.28.2.40 |
2252 |
diff -p -u -b -r1.47.2.76 -r1.47.2.28.2.40 |
2205 |
--- src/client_side.c 19 Oct 2005 02:13:20 -0000 1.47.2.71 |
2253 |
--- src/client_side.c 11 Mar 2006 03:16:31 -0000 1.47.2.76 |
2206 |
+++ src/client_side.c 6 Dec 2005 21:53:44 -0000 1.47.2.28.2.40 |
2254 |
+++ src/client_side.c 6 Dec 2005 21:53:44 -0000 1.47.2.28.2.40 |
2207 |
@@ -109,7 +109,7 @@ static const char *const crlf = "\r\n"; |
2255 |
@@ -109,7 +109,7 @@ static const char *const crlf = "\r\n"; |
2208 |
static CWCB clientWriteComplete; |
2256 |
static CWCB clientWriteComplete; |
Lines 2277-2283
Link Here
|
2277 |
connStateFree(int fd, void *data) |
2325 |
connStateFree(int fd, void *data) |
2278 |
{ |
2326 |
{ |
2279 |
ConnStateData *connState = data; |
2327 |
ConnStateData *connState = data; |
2280 |
@@ -958,7 +976,6 @@ connStateFree(int fd, void *data) |
2328 |
@@ -963,7 +976,6 @@ connStateFree(int fd, void *data) |
2281 |
} else |
2329 |
} else |
2282 |
safe_free(connState->in.buf); |
2330 |
safe_free(connState->in.buf); |
2283 |
/* XXX account connState->in.buf */ |
2331 |
/* XXX account connState->in.buf */ |
Lines 2285-2291
Link Here
|
2285 |
cbdataFree(connState); |
2333 |
cbdataFree(connState); |
2286 |
#ifdef _SQUID_LINUX_ |
2334 |
#ifdef _SQUID_LINUX_ |
2287 |
/* prevent those nasty RST packets */ |
2335 |
/* prevent those nasty RST packets */ |
2288 |
@@ -1103,7 +1120,7 @@ clientSetKeepaliveFlag(clientHttpRequest |
2336 |
@@ -1108,7 +1120,7 @@ clientSetKeepaliveFlag(clientHttpRequest |
2289 |
} |
2337 |
} |
2290 |
} |
2338 |
} |
2291 |
|
2339 |
|
Lines 2294-2300
Link Here
|
2294 |
clientCheckContentLength(request_t * r) |
2342 |
clientCheckContentLength(request_t * r) |
2295 |
{ |
2343 |
{ |
2296 |
switch (r->method) { |
2344 |
switch (r->method) { |
2297 |
@@ -1122,7 +1139,7 @@ clientCheckContentLength(request_t * r) |
2345 |
@@ -1127,7 +1139,7 @@ clientCheckContentLength(request_t * r) |
2298 |
/* NOT REACHED */ |
2346 |
/* NOT REACHED */ |
2299 |
} |
2347 |
} |
2300 |
|
2348 |
|
Lines 2303-2309
Link Here
|
2303 |
clientCachable(clientHttpRequest * http) |
2351 |
clientCachable(clientHttpRequest * http) |
2304 |
{ |
2352 |
{ |
2305 |
request_t *req = http->request; |
2353 |
request_t *req = http->request; |
2306 |
@@ -1148,7 +1165,7 @@ clientCachable(clientHttpRequest * http) |
2354 |
@@ -1153,7 +1165,7 @@ clientCachable(clientHttpRequest * http) |
2307 |
} |
2355 |
} |
2308 |
|
2356 |
|
2309 |
/* Return true if we can query our neighbors for this object */ |
2357 |
/* Return true if we can query our neighbors for this object */ |
Lines 2321-2327
Link Here
|
2321 |
clientProcessRequest(clientHttpRequest * http) |
2369 |
clientProcessRequest(clientHttpRequest * http) |
2322 |
{ |
2370 |
{ |
2323 |
char *url = http->uri; |
2371 |
char *url = http->uri; |
2324 |
@@ -2449,6 +2466,11 @@ clientProcessRequest(clientHttpRequest * |
2372 |
@@ -2457,6 +2466,11 @@ clientProcessRequest(clientHttpRequest * |
2325 |
debug(33, 4) ("clientProcessRequest: %s '%s'\n", |
2373 |
debug(33, 4) ("clientProcessRequest: %s '%s'\n", |
2326 |
RequestMethodStr[r->method], |
2374 |
RequestMethodStr[r->method], |
2327 |
url); |
2375 |
url); |
Lines 2333-2339
Link Here
|
2333 |
if (r->method == METHOD_CONNECT && !http->redirect.status) { |
2381 |
if (r->method == METHOD_CONNECT && !http->redirect.status) { |
2334 |
http->log_type = LOG_TCP_MISS; |
2382 |
http->log_type = LOG_TCP_MISS; |
2335 |
sslStart(http, &http->out.size, &http->al.http.code); |
2383 |
sslStart(http, &http->out.size, &http->al.http.code); |
2336 |
@@ -2993,6 +3015,20 @@ clientReadRequest(int fd, void *data) |
2384 |
@@ -3001,6 +3015,20 @@ clientReadRequest(int fd, void *data) |
2337 |
(long) conn->in.offset, (long) conn->in.size); |
2385 |
(long) conn->in.offset, (long) conn->in.size); |
2338 |
len = conn->in.size - conn->in.offset - 1; |
2386 |
len = conn->in.size - conn->in.offset - 1; |
2339 |
} |
2387 |
} |
Lines 2354-2360
Link Here
|
2354 |
statCounter.syscalls.sock.reads++; |
2402 |
statCounter.syscalls.sock.reads++; |
2355 |
size = FD_READ_METHOD(fd, conn->in.buf + conn->in.offset, len); |
2403 |
size = FD_READ_METHOD(fd, conn->in.buf + conn->in.offset, len); |
2356 |
if (size > 0) { |
2404 |
if (size > 0) { |
2357 |
@@ -3096,7 +3132,8 @@ clientReadRequest(int fd, void *data) |
2405 |
@@ -3104,7 +3132,8 @@ clientReadRequest(int fd, void *data) |
2358 |
/* add to the client request queue */ |
2406 |
/* add to the client request queue */ |
2359 |
for (H = &conn->chr; *H; H = &(*H)->next); |
2407 |
for (H = &conn->chr; *H; H = &(*H)->next); |
2360 |
*H = http; |
2408 |
*H = http; |
Lines 2364-2370
Link Here
|
2364 |
/* |
2412 |
/* |
2365 |
* I wanted to lock 'http' here since its callback data for |
2413 |
* I wanted to lock 'http' here since its callback data for |
2366 |
* clientLifetimeTimeout(), but there's no logical place to |
2414 |
* clientLifetimeTimeout(), but there's no logical place to |
2367 |
@@ -3266,7 +3303,7 @@ clientReadRequest(int fd, void *data) |
2415 |
@@ -3274,7 +3303,7 @@ clientReadRequest(int fd, void *data) |
2368 |
} |
2416 |
} |
2369 |
|
2417 |
|
2370 |
/* file_read like function, for reading body content */ |
2418 |
/* file_read like function, for reading body content */ |
Lines 2373-2379
Link Here
|
2373 |
clientReadBody(request_t * request, char *buf, size_t size, CBCB * callback, void *cbdata) |
2421 |
clientReadBody(request_t * request, char *buf, size_t size, CBCB * callback, void *cbdata) |
2374 |
{ |
2422 |
{ |
2375 |
ConnStateData *conn = request->body_reader_data; |
2423 |
ConnStateData *conn = request->body_reader_data; |
2376 |
@@ -3390,7 +3427,7 @@ clientProcessBody(ConnStateData * conn) |
2424 |
@@ -3398,7 +3427,7 @@ clientProcessBody(ConnStateData * conn) |
2377 |
} |
2425 |
} |
2378 |
|
2426 |
|
2379 |
/* Abort a body request */ |
2427 |
/* Abort a body request */ |
Lines 2391-2397
Link Here
|
2391 |
/* |
2439 |
/* |
2392 |
* assume its a persistent connection; just close it |
2440 |
* assume its a persistent connection; just close it |
2393 |
*/ |
2441 |
*/ |
2394 |
@@ -3948,3 +3985,49 @@ varyEvaluateMatch(StoreEntry * entry, re |
2442 |
@@ -3956,3 +3985,49 @@ varyEvaluateMatch(StoreEntry * entry, re |
2395 |
} |
2443 |
} |
2396 |
} |
2444 |
} |
2397 |
} |
2445 |
} |
Lines 2586-2595
Link Here
|
2586 |
Index: src/forward.c |
2634 |
Index: src/forward.c |
2587 |
=================================================================== |
2635 |
=================================================================== |
2588 |
RCS file: /cvsroot/squid/squid/src/forward.c,v |
2636 |
RCS file: /cvsroot/squid/squid/src/forward.c,v |
2589 |
retrieving revision 1.13.6.15 |
2637 |
retrieving revision 1.13.6.16 |
2590 |
retrieving revision 1.13.6.3.2.15 |
2638 |
retrieving revision 1.13.6.3.2.15 |
2591 |
diff -p -u -b -r1.13.6.15 -r1.13.6.3.2.15 |
2639 |
diff -p -u -b -r1.13.6.16 -r1.13.6.3.2.15 |
2592 |
--- src/forward.c 2 Sep 2005 02:13:43 -0000 1.13.6.15 |
2640 |
--- src/forward.c 11 Mar 2006 03:16:31 -0000 1.13.6.16 |
2593 |
+++ src/forward.c 30 Nov 2005 21:52:15 -0000 1.13.6.3.2.15 |
2641 |
+++ src/forward.c 30 Nov 2005 21:52:15 -0000 1.13.6.3.2.15 |
2594 |
@@ -262,7 +262,8 @@ fwdConnectDone(int server_fd, int status |
2642 |
@@ -262,7 +262,8 @@ fwdConnectDone(int server_fd, int status |
2595 |
else |
2643 |
else |
Lines 2653-2662
Link Here
|
2653 |
=================================================================== |
2701 |
=================================================================== |
2654 |
RCS file: /cvsroot/squid/squid/src/http.c,v |
2702 |
RCS file: /cvsroot/squid/squid/src/http.c,v |
2655 |
retrieving revision 1.17.6.32 |
2703 |
retrieving revision 1.17.6.32 |
2656 |
retrieving revision 1.17.6.3.6.39 |
2704 |
retrieving revision 1.17.6.3.6.40 |
2657 |
diff -p -u -b -r1.17.6.32 -r1.17.6.3.6.39 |
2705 |
diff -p -u -b -r1.17.6.32 -r1.17.6.3.6.40 |
2658 |
--- src/http.c 19 Oct 2005 02:13:21 -0000 1.17.6.32 |
2706 |
--- src/http.c 19 Oct 2005 02:13:21 -0000 1.17.6.32 |
2659 |
+++ src/http.c 23 Nov 2005 20:33:07 -0000 1.17.6.3.6.39 |
2707 |
+++ src/http.c 17 Feb 2006 12:45:21 -0000 1.17.6.3.6.40 |
2660 |
@@ -47,7 +47,7 @@ static CWCB httpSendRequestEntry; |
2708 |
@@ -47,7 +47,7 @@ static CWCB httpSendRequestEntry; |
2661 |
|
2709 |
|
2662 |
static PF httpReadReply; |
2710 |
static PF httpReadReply; |
Lines 2756-2762
Link Here
|
2756 |
if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { |
2804 |
if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { |
2757 |
comm_close(fd); |
2805 |
comm_close(fd); |
2758 |
return; |
2806 |
return; |
2759 |
@@ -579,6 +605,33 @@ httpReadReply(int fd, void *data) |
2807 |
@@ -579,6 +605,37 @@ httpReadReply(int fd, void *data) |
2760 |
else |
2808 |
else |
2761 |
delay_id = delayMostBytesAllowed(entry->mem_obj, &read_sz); |
2809 |
delay_id = delayMostBytesAllowed(entry->mem_obj, &read_sz); |
2762 |
#endif |
2810 |
#endif |
Lines 2784-2796
Link Here
|
2784 |
+ commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0); |
2832 |
+ commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0); |
2785 |
+ return; |
2833 |
+ return; |
2786 |
+ } |
2834 |
+ } |
|
|
2835 |
+ |
2836 |
+ if(icap->flags.no_content == 1) { |
2837 |
+ commSetDefer(fd, fwdCheckDeferRead, icap->respmod.entry); |
2838 |
+ } |
2787 |
+ } |
2839 |
+ } |
2788 |
+#endif |
2840 |
+#endif |
2789 |
+ |
2841 |
+ |
2790 |
errno = 0; |
2842 |
errno = 0; |
2791 |
statCounter.syscalls.sock.reads++; |
2843 |
statCounter.syscalls.sock.reads++; |
2792 |
len = FD_READ_METHOD(fd, buf, read_sz); |
2844 |
len = FD_READ_METHOD(fd, buf, read_sz); |
2793 |
@@ -595,7 +648,13 @@ httpReadReply(int fd, void *data) |
2845 |
@@ -595,7 +652,13 @@ httpReadReply(int fd, void *data) |
2794 |
clen >>= 1; |
2846 |
clen >>= 1; |
2795 |
IOStats.Http.read_hist[bin]++; |
2847 |
IOStats.Http.read_hist[bin]++; |
2796 |
} |
2848 |
} |
Lines 2805-2811
Link Here
|
2805 |
/* Skip whitespace */ |
2857 |
/* Skip whitespace */ |
2806 |
while (len > 0 && xisspace(*buf)) |
2858 |
while (len > 0 && xisspace(*buf)) |
2807 |
xmemmove(buf, buf + 1, len--); |
2859 |
xmemmove(buf, buf + 1, len--); |
2808 |
@@ -625,6 +684,12 @@ httpReadReply(int fd, void *data) |
2860 |
@@ -625,6 +688,12 @@ httpReadReply(int fd, void *data) |
2809 |
} else if (len == 0) { |
2861 |
} else if (len == 0) { |
2810 |
/* Connection closed; retrieval done. */ |
2862 |
/* Connection closed; retrieval done. */ |
2811 |
httpState->eof = 1; |
2863 |
httpState->eof = 1; |
Lines 2818-2824
Link Here
|
2818 |
if (httpState->reply_hdr_state < 2) |
2870 |
if (httpState->reply_hdr_state < 2) |
2819 |
/* |
2871 |
/* |
2820 |
* Yes Henrik, there is a point to doing this. When we |
2872 |
* Yes Henrik, there is a point to doing this. When we |
2821 |
@@ -677,7 +742,28 @@ httpReadReply(int fd, void *data) |
2873 |
@@ -677,7 +746,28 @@ httpReadReply(int fd, void *data) |
2822 |
EBIT_CLR(entry->flags, ENTRY_FWD_HDR_WAIT); |
2874 |
EBIT_CLR(entry->flags, ENTRY_FWD_HDR_WAIT); |
2823 |
} |
2875 |
} |
2824 |
} |
2876 |
} |
Lines 2847-2853
Link Here
|
2847 |
if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { |
2899 |
if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { |
2848 |
/* |
2900 |
/* |
2849 |
* the above storeAppend() call could ABORT this entry, |
2901 |
* the above storeAppend() call could ABORT this entry, |
2850 |
@@ -724,10 +810,21 @@ httpReadReply(int fd, void *data) |
2902 |
@@ -724,10 +814,21 @@ httpReadReply(int fd, void *data) |
2851 |
("httpReadReply: Excess data from \"%s %s\"\n", |
2903 |
("httpReadReply: Excess data from \"%s %s\"\n", |
2852 |
RequestMethodStr[httpState->orig_request->method], |
2904 |
RequestMethodStr[httpState->orig_request->method], |
2853 |
storeUrl(entry)); |
2905 |
storeUrl(entry)); |
Lines 2869-2875
Link Here
|
2869 |
if (keep_alive) { |
2921 |
if (keep_alive) { |
2870 |
/* yes we have to clear all these! */ |
2922 |
/* yes we have to clear all these! */ |
2871 |
commSetDefer(fd, NULL, NULL); |
2923 |
commSetDefer(fd, NULL, NULL); |
2872 |
@@ -766,6 +863,10 @@ httpReadReply(int fd, void *data) |
2924 |
@@ -766,6 +867,10 @@ httpReadReply(int fd, void *data) |
2873 |
("httpReadReply: Excess data from \"%s %s\"\n", |
2925 |
("httpReadReply: Excess data from \"%s %s\"\n", |
2874 |
RequestMethodStr[httpState->orig_request->method], |
2926 |
RequestMethodStr[httpState->orig_request->method], |
2875 |
storeUrl(entry)); |
2927 |
storeUrl(entry)); |
Lines 2880-2886
Link Here
|
2880 |
fwdComplete(httpState->fwd); |
2932 |
fwdComplete(httpState->fwd); |
2881 |
comm_close(fd); |
2933 |
comm_close(fd); |
2882 |
return; |
2934 |
return; |
2883 |
@@ -776,6 +877,34 @@ httpReadReply(int fd, void *data) |
2935 |
@@ -776,6 +881,34 @@ httpReadReply(int fd, void *data) |
2884 |
} |
2936 |
} |
2885 |
} |
2937 |
} |
2886 |
|
2938 |
|
Lines 2915-2921
Link Here
|
2915 |
/* This will be called when request write is complete. Schedule read of |
2967 |
/* This will be called when request write is complete. Schedule read of |
2916 |
* reply. */ |
2968 |
* reply. */ |
2917 |
static void |
2969 |
static void |
2918 |
@@ -803,6 +932,63 @@ httpSendComplete(int fd, char *bufnotuse |
2970 |
@@ -803,6 +936,63 @@ httpSendComplete(int fd, char *bufnotuse |
2919 |
comm_close(fd); |
2971 |
comm_close(fd); |
2920 |
return; |
2972 |
return; |
2921 |
} else { |
2973 |
} else { |
Lines 2979-2985
Link Here
|
2979 |
/* |
3031 |
/* |
2980 |
* Set the read timeout here because it hasn't been set yet. |
3032 |
* Set the read timeout here because it hasn't been set yet. |
2981 |
* We only set the read timeout after the request has been |
3033 |
* We only set the read timeout after the request has been |
2982 |
@@ -811,8 +997,18 @@ httpSendComplete(int fd, char *bufnotuse |
3034 |
@@ -811,8 +1001,18 @@ httpSendComplete(int fd, char *bufnotuse |
2983 |
* the timeout for POST/PUT requests that have very large |
3035 |
* the timeout for POST/PUT requests that have very large |
2984 |
* request bodies. |
3036 |
* request bodies. |
2985 |
*/ |
3037 |
*/ |
Lines 2999-3005
Link Here
|
2999 |
} |
3051 |
} |
3000 |
httpState->flags.request_sent = 1; |
3052 |
httpState->flags.request_sent = 1; |
3001 |
} |
3053 |
} |
3002 |
@@ -1010,8 +1206,11 @@ httpBuildRequestHeader(request_t * reque |
3054 |
@@ -1010,8 +1210,11 @@ httpBuildRequestHeader(request_t * reque |
3003 |
if (!EBIT_TEST(cc->mask, CC_MAX_AGE)) { |
3055 |
if (!EBIT_TEST(cc->mask, CC_MAX_AGE)) { |
3004 |
const char *url = entry ? storeUrl(entry) : urlCanonical(orig_request); |
3056 |
const char *url = entry ? storeUrl(entry) : urlCanonical(orig_request); |
3005 |
httpHdrCcSetMaxAge(cc, getMaxAge(url)); |
3057 |
httpHdrCcSetMaxAge(cc, getMaxAge(url)); |
Lines 3011-3017
Link Here
|
3011 |
} |
3063 |
} |
3012 |
/* Set no-cache if determined needed but not found */ |
3064 |
/* Set no-cache if determined needed but not found */ |
3013 |
if (orig_request->flags.nocache && !httpHeaderHas(hdr_in, HDR_PRAGMA)) |
3065 |
if (orig_request->flags.nocache && !httpHeaderHas(hdr_in, HDR_PRAGMA)) |
3014 |
@@ -1119,6 +1318,7 @@ httpStart(FwdState * fwd) |
3066 |
@@ -1119,6 +1322,7 @@ httpStart(FwdState * fwd) |
3015 |
int fd = fwd->server_fd; |
3067 |
int fd = fwd->server_fd; |
3016 |
HttpStateData *httpState; |
3068 |
HttpStateData *httpState; |
3017 |
request_t *proxy_req; |
3069 |
request_t *proxy_req; |
Lines 3019-3025
Link Here
|
3019 |
request_t *orig_req = fwd->request; |
3071 |
request_t *orig_req = fwd->request; |
3020 |
debug(11, 3) ("httpStart: \"%s %s\"\n", |
3072 |
debug(11, 3) ("httpStart: \"%s %s\"\n", |
3021 |
RequestMethodStr[orig_req->method], |
3073 |
RequestMethodStr[orig_req->method], |
3022 |
@@ -1156,12 +1356,22 @@ httpStart(FwdState * fwd) |
3074 |
@@ -1156,12 +1360,22 @@ httpStart(FwdState * fwd) |
3023 |
httpState->request = requestLink(orig_req); |
3075 |
httpState->request = requestLink(orig_req); |
3024 |
httpState->orig_request = requestLink(orig_req); |
3076 |
httpState->orig_request = requestLink(orig_req); |
3025 |
} |
3077 |
} |
Lines 3047-3054
Link Here
|
3047 |
RCS file: src/icap_common.c |
3099 |
RCS file: src/icap_common.c |
3048 |
diff -N src/icap_common.c |
3100 |
diff -N src/icap_common.c |
3049 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
3101 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
3050 |
+++ src/icap_common.c 22 Nov 2005 22:41:48 -0000 1.1.2.39 |
3102 |
+++ src/icap_common.c 16 Feb 2006 17:21:45 -0000 1.1.2.40 |
3051 |
@@ -0,0 +1,785 @@ |
3103 |
@@ -0,0 +1,817 @@ |
3052 |
+/* |
3104 |
+/* |
3053 |
+ * $Id$ |
3105 |
+ * $Id$ |
3054 |
+ * |
3106 |
+ * |
Lines 3834-3846
Link Here
|
3834 |
+ memBufPrintf(mb, "X-Authenticated-User: %s\r\n", base64_encode(authuser)); |
3886 |
+ memBufPrintf(mb, "X-Authenticated-User: %s\r\n", base64_encode(authuser)); |
3835 |
+ xfree(authuser); |
3887 |
+ xfree(authuser); |
3836 |
+} |
3888 |
+} |
|
|
3889 |
+ |
3890 |
+/* |
3891 |
+ * icapAddOriginIP |
3892 |
+ * |
3893 |
+ * Builds and adds the X-Server-IP header to an ICAP request headers. |
3894 |
+ */ |
3895 |
+void |
3896 |
+icapAddOriginIP(MemBuf *mb, const char *host) |
3897 |
+{ |
3898 |
+ const ipcache_addrs *addrs; |
3899 |
+ struct in_addr s; |
3900 |
+ |
3901 |
+ if (host == NULL) { |
3902 |
+ debug(81, 5)("icapAddOriginIP: NULL host\n"); |
3903 |
+ return; |
3904 |
+ } |
3905 |
+ |
3906 |
+ addrs = ipcache_gethostbyname(host, IP_LOOKUP_IF_MISS); |
3907 |
+ if (addrs == NULL) { |
3908 |
+ /* |
3909 |
+ * http://www.i-cap.org/spec/draft-stecher-icap-subid-00.txt : |
3910 |
+ * |
3911 |
+ * [...] If the meta information for some header is not available, |
3912 |
+ * the header field MUST be omitted. |
3913 |
+ */ |
3914 |
+ debug(81, 5)("icapAddOriginIP: can't tell IP address\n"); |
3915 |
+ return; |
3916 |
+ } |
3917 |
+ |
3918 |
+ s = addrs->in_addrs[0]; |
3919 |
+ memBufPrintf(mb, "X-Server-IP: %s\r\n", inet_ntoa(s)); |
3920 |
+} |
3837 |
Index: src/icap_opt.c |
3921 |
Index: src/icap_opt.c |
3838 |
=================================================================== |
3922 |
=================================================================== |
3839 |
RCS file: src/icap_opt.c |
3923 |
RCS file: src/icap_opt.c |
3840 |
diff -N src/icap_opt.c |
3924 |
diff -N src/icap_opt.c |
3841 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
3925 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
3842 |
+++ src/icap_opt.c 22 Nov 2005 22:41:48 -0000 1.1.2.17 |
3926 |
+++ src/icap_opt.c 16 Feb 2006 17:21:45 -0000 1.1.2.18 |
3843 |
@@ -0,0 +1,519 @@ |
3927 |
@@ -0,0 +1,523 @@ |
3844 |
+ |
3928 |
+ |
3845 |
+/* |
3929 |
+/* |
3846 |
+ * $Id$ |
3930 |
+ * $Id$ |
Lines 4278-4283
Link Here
|
4278 |
+ debug(81, 5) ("icapOptParseEntry: X-Include: found X-Client-IP\n"); |
4362 |
+ debug(81, 5) ("icapOptParseEntry: X-Include: found X-Client-IP\n"); |
4279 |
+ s->flags.need_x_client_ip = 1; |
4363 |
+ s->flags.need_x_client_ip = 1; |
4280 |
+ } |
4364 |
+ } |
|
|
4365 |
+ if (strstr(value_start, "X-Server-IP")) { |
4366 |
+ debug(81, 5) ("icapOptParseEntry: X-Include: found X-Server-IP\n"); |
4367 |
+ s->flags.need_x_server_ip = 1; |
4368 |
+ } |
4281 |
+ if (strstr(value_start, "X-Authenticated-User")) { |
4369 |
+ if (strstr(value_start, "X-Authenticated-User")) { |
4282 |
+ debug(81, 5) ("icapOptParseEntry: X-Include: found X-Authenticated-User\n"); |
4370 |
+ debug(81, 5) ("icapOptParseEntry: X-Include: found X-Authenticated-User\n"); |
4283 |
+ s->flags.need_x_authenticated_user = 1; |
4371 |
+ s->flags.need_x_authenticated_user = 1; |
Lines 4365-4372
Link Here
|
4365 |
RCS file: src/icap_reqmod.c |
4453 |
RCS file: src/icap_reqmod.c |
4366 |
diff -N src/icap_reqmod.c |
4454 |
diff -N src/icap_reqmod.c |
4367 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
4455 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
4368 |
+++ src/icap_reqmod.c 6 Dec 2005 21:53:44 -0000 1.1.2.58 |
4456 |
+++ src/icap_reqmod.c 17 Feb 2006 12:50:52 -0000 1.1.2.60 |
4369 |
@@ -0,0 +1,976 @@ |
4457 |
@@ -0,0 +1,981 @@ |
4370 |
+ |
4458 |
+ |
4371 |
+/* |
4459 |
+/* |
4372 |
+ * $Id$ |
4460 |
+ * $Id$ |
Lines 5066-5075
Link Here
|
5066 |
+ else |
5154 |
+ else |
5067 |
+ memBufPrintf(&mb, ", null-body=%d", mb_hdr.size); |
5155 |
+ memBufPrintf(&mb, ", null-body=%d", mb_hdr.size); |
5068 |
+ memBufAppend(&mb, crlf, 2); |
5156 |
+ memBufAppend(&mb, crlf, 2); |
5069 |
+ if (Config.icapcfg.send_client_ip || service->flags.need_x_client_ip) |
5157 |
+ |
|
|
5158 |
+ if (service->flags.need_x_client_ip && Config.icapcfg.send_client_ip) |
5070 |
+ memBufPrintf(&mb, "X-Client-IP: %s\r\n", client_addr); |
5159 |
+ memBufPrintf(&mb, "X-Client-IP: %s\r\n", client_addr); |
5071 |
+ if ((Config.icapcfg.send_auth_user |
5160 |
+ |
5072 |
+ || service->flags.need_x_authenticated_user) |
5161 |
+ if (service->flags.need_x_server_ip && Config.icapcfg.send_server_ip) |
|
|
5162 |
+ icapAddOriginIP(&mb, icap->request->host); |
5163 |
+ |
5164 |
+ if ((service->flags.need_x_authenticated_user |
5165 |
+ && Config.icapcfg.send_auth_user) |
5073 |
+ && (icap->request->auth_user_request != NULL)) |
5166 |
+ && (icap->request->auth_user_request != NULL)) |
5074 |
+ icapAddAuthUserHeader(&mb, icap->request->auth_user_request); |
5167 |
+ icapAddAuthUserHeader(&mb, icap->request->auth_user_request); |
5075 |
+ if (service->keep_alive) { |
5168 |
+ if (service->keep_alive) { |
Lines 5348-5355
Link Here
|
5348 |
RCS file: src/icap_respmod.c |
5441 |
RCS file: src/icap_respmod.c |
5349 |
diff -N src/icap_respmod.c |
5442 |
diff -N src/icap_respmod.c |
5350 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
5443 |
--- /dev/null 1 Jan 1970 00:00:00 -0000 |
5351 |
+++ src/icap_respmod.c 23 Nov 2005 20:34:34 -0000 1.1.2.60 |
5444 |
+++ src/icap_respmod.c 17 Feb 2006 12:45:23 -0000 1.1.2.64 |
5352 |
@@ -0,0 +1,1039 @@ |
5445 |
@@ -0,0 +1,1057 @@ |
5353 |
+ |
5446 |
+ |
5354 |
+/* |
5447 |
+/* |
5355 |
+ * $Id$ |
5448 |
+ * $Id$ |
Lines 5410-5422
Link Here
|
5410 |
+ memBufPrintf(mb, ", res-body=%1d", o3); |
5503 |
+ memBufPrintf(mb, ", res-body=%1d", o3); |
5411 |
+ else |
5504 |
+ else |
5412 |
+ memBufPrintf(mb, ", null-body=%1d", -o3); |
5505 |
+ memBufPrintf(mb, ", null-body=%1d", -o3); |
|
|
5506 |
+ memBufPrintf(mb, crlf); |
5413 |
+ |
5507 |
+ |
5414 |
+ memBufPrintf(mb, crlf); |
5508 |
+ if (service->flags.need_x_client_ip && Config.icapcfg.send_client_ip) { |
5415 |
+ if (Config.icapcfg.send_client_ip || service->flags.need_x_client_ip) { |
|
|
5416 |
+ memBufPrintf(mb, "X-Client-IP: %s\r\n", client_addr); |
5509 |
+ memBufPrintf(mb, "X-Client-IP: %s\r\n", client_addr); |
5417 |
+ } |
5510 |
+ } |
5418 |
+ if ((Config.icapcfg.send_auth_user |
5511 |
+ |
5419 |
+ || service->flags.need_x_authenticated_user) |
5512 |
+ if (service->flags.need_x_server_ip && Config.icapcfg.send_server_ip) |
|
|
5513 |
+ icapAddOriginIP(mb, icap->request->host); |
5514 |
+ |
5515 |
+ if ((service->flags.need_x_authenticated_user |
5516 |
+ && Config.icapcfg.send_auth_user) |
5420 |
+ && (icap->request->auth_user_request != NULL)) { |
5517 |
+ && (icap->request->auth_user_request != NULL)) { |
5421 |
+ icapAddAuthUserHeader(mb, icap->request->auth_user_request); |
5518 |
+ icapAddAuthUserHeader(mb, icap->request->auth_user_request); |
5422 |
+ } |
5519 |
+ } |
Lines 5456-5461
Link Here
|
5456 |
+ consumed = -1; |
5553 |
+ consumed = -1; |
5457 |
+ o2 = -1; |
5554 |
+ o2 = -1; |
5458 |
+ memBufDefInit(&mb_hdr); |
5555 |
+ memBufDefInit(&mb_hdr); |
|
|
5556 |
+ httpBuildRequestPrefix(icap->request, icap->request, |
5557 |
+ icap->respmod.entry, &mb_hdr, icap->http_flags); |
5558 |
+ o3 = mb_hdr.size; |
5459 |
+ } else { |
5559 |
+ } else { |
5460 |
+ |
5560 |
+ |
5461 |
+ hlen = headersEnd(icap->respmod.req_hdr_copy.buf, |
5561 |
+ hlen = headersEnd(icap->respmod.req_hdr_copy.buf, |
Lines 5484-5496
Link Here
|
5484 |
+ httpBuildRequestPrefix(icap->request, icap->request, |
5584 |
+ httpBuildRequestPrefix(icap->request, icap->request, |
5485 |
+ icap->respmod.entry, &mb_hdr, icap->http_flags); |
5585 |
+ icap->respmod.entry, &mb_hdr, icap->http_flags); |
5486 |
+ o2 = mb_hdr.size; |
5586 |
+ o2 = mb_hdr.size; |
|
|
5587 |
+ |
5588 |
+ /* Copy response header - Append to request header mbuffer */ |
5589 |
+ memBufAppend(&mb_hdr, |
5590 |
+ icap->respmod.req_hdr_copy.buf, icap->respmod.req_hdr_copy.size); |
5591 |
+ o3 = mb_hdr.size; |
5487 |
+ } |
5592 |
+ } |
5488 |
+ |
5593 |
+ |
5489 |
+ /* Copy response header - Append to request header mbuffer */ |
|
|
5490 |
+ memBufAppend(&mb_hdr, |
5491 |
+ icap->respmod.req_hdr_copy.buf, icap->respmod.req_hdr_copy.size); |
5492 |
+ o3 = mb_hdr.size; |
5493 |
+ |
5494 |
+ service = icap->current_service; |
5594 |
+ service = icap->current_service; |
5495 |
+ assert(service); |
5595 |
+ assert(service); |
5496 |
+ client_addr = inet_ntoa(icap->request->client_addr); |
5596 |
+ client_addr = inet_ntoa(icap->request->client_addr); |
Lines 5604-5609
Link Here
|
5604 |
+#endif |
5704 |
+#endif |
5605 |
+ |
5705 |
+ |
5606 |
+ if (icap->sc == 0) { |
5706 |
+ if (icap->sc == 0) { |
|
|
5707 |
+ // http connection has been closed without sending us anything |
5708 |
+ if(len == 0 && theEnd == 1) { |
5709 |
+ ErrorState *err; |
5710 |
+ err = errorCon(ERR_INVALID_RESP, HTTP_BAD_GATEWAY); |
5711 |
+ err->request = requestLink(icap->request); |
5712 |
+ errorAppendEntry(icap->respmod.entry, err); |
5713 |
+ comm_close(icap->icap_fd); |
5714 |
+ return; |
5715 |
+ } |
5716 |
+ |
5607 |
+ /* No data sent yet. Start with headers */ |
5717 |
+ /* No data sent yet. Start with headers */ |
5608 |
+ if ((icap->sc = buildRespModHeader(&mb, icap, buf, len, theEnd)) > 0) { |
5718 |
+ if ((icap->sc = buildRespModHeader(&mb, icap, buf, len, theEnd)) > 0) { |
5609 |
+ buf += icap->sc; |
5719 |
+ buf += icap->sc; |
Lines 5979-5984
Link Here
|
5979 |
+ commSetSelect(fd, COMM_SELECT_READ, icapRespModReadReply, icap, 0); |
6089 |
+ commSetSelect(fd, COMM_SELECT_READ, icapRespModReadReply, icap, 0); |
5980 |
+#if 1 |
6090 |
+#if 1 |
5981 |
+ commSetTimeout(fd, Config.Timeout.read, icapReadTimeout, icap); |
6091 |
+ commSetTimeout(fd, Config.Timeout.read, icapReadTimeout, icap); |
|
|
6092 |
+ commSetDefer(fd, fwdCheckDeferRead, icap->respmod.entry); |
5982 |
+#else |
6093 |
+#else |
5983 |
+ if (icap->flags.wait_for_preview_reply || icap->flags.http_server_eof) { |
6094 |
+ if (icap->flags.wait_for_preview_reply || icap->flags.http_server_eof) { |
5984 |
+ /* |
6095 |
+ /* |
Lines 6534-6544
Link Here
|
6534 |
Index: src/protos.h |
6645 |
Index: src/protos.h |
6535 |
=================================================================== |
6646 |
=================================================================== |
6536 |
RCS file: /cvsroot/squid/squid/src/protos.h,v |
6647 |
RCS file: /cvsroot/squid/squid/src/protos.h,v |
6537 |
retrieving revision 1.41.6.33 |
6648 |
retrieving revision 1.41.6.34 |
6538 |
retrieving revision 1.41.6.13.2.37 |
6649 |
retrieving revision 1.41.6.13.2.38 |
6539 |
diff -p -u -b -r1.41.6.33 -r1.41.6.13.2.37 |
6650 |
diff -p -u -b -r1.41.6.34 -r1.41.6.13.2.38 |
6540 |
--- src/protos.h 16 Sep 2005 02:13:25 -0000 1.41.6.33 |
6651 |
--- src/protos.h 26 Feb 2006 03:13:57 -0000 1.41.6.34 |
6541 |
+++ src/protos.h 6 Dec 2005 21:53:44 -0000 1.41.6.13.2.37 |
6652 |
+++ src/protos.h 16 Feb 2006 17:21:45 -0000 1.41.6.13.2.38 |
6542 |
@@ -292,6 +292,8 @@ extern void whoisStart(FwdState *); |
6653 |
@@ -292,6 +292,8 @@ extern void whoisStart(FwdState *); |
6543 |
/* http.c */ |
6654 |
/* http.c */ |
6544 |
extern int httpCachable(method_t); |
6655 |
extern int httpCachable(method_t); |
Lines 6556-6562
Link Here
|
6556 |
|
6667 |
|
6557 |
extern char *mime_get_header(const char *mime, const char *header); |
6668 |
extern char *mime_get_header(const char *mime, const char *header); |
6558 |
extern char *mime_get_header_field(const char *mime, const char *name, const char *prefix); |
6669 |
extern char *mime_get_header_field(const char *mime, const char *name, const char *prefix); |
6559 |
@@ -1341,4 +1344,49 @@ extern void externalAclShutdown(void); |
6670 |
@@ -1341,4 +1344,53 @@ extern void externalAclShutdown(void); |
6560 |
extern int externalAclRequiresAuth(void *acl_data); |
6671 |
extern int externalAclRequiresAuth(void *acl_data); |
6561 |
extern char *strtokFile(void); |
6672 |
extern char *strtokFile(void); |
6562 |
|
6673 |
|
Lines 6601-6606
Link Here
|
6601 |
+void icapOptInit(void); |
6712 |
+void icapOptInit(void); |
6602 |
+void icapOptShutdown(void); |
6713 |
+void icapOptShutdown(void); |
6603 |
+void icapOptSetUnreachable(icap_service * s); |
6714 |
+void icapOptSetUnreachable(icap_service * s); |
|
|
6715 |
+ |
6716 |
+/* X-Server-IP support */ |
6717 |
+void icapAddOriginIP(MemBuf *, const char *); |
6718 |
+ |
6604 |
+/* for debugging purposes only */ |
6719 |
+/* for debugging purposes only */ |
6605 |
+void dump_icap_config(IcapConfig * cfg); |
6720 |
+void dump_icap_config(IcapConfig * cfg); |
6606 |
+#endif |
6721 |
+#endif |
Lines 6609-6618
Link Here
|
6609 |
Index: src/squid.h |
6724 |
Index: src/squid.h |
6610 |
=================================================================== |
6725 |
=================================================================== |
6611 |
RCS file: /cvsroot/squid/squid/src/squid.h,v |
6726 |
RCS file: /cvsroot/squid/squid/src/squid.h,v |
6612 |
retrieving revision 1.13.6.8 |
6727 |
retrieving revision 1.13.6.9 |
6613 |
retrieving revision 1.13.6.6.2.11 |
6728 |
retrieving revision 1.13.6.6.2.11 |
6614 |
diff -p -u -b -r1.13.6.8 -r1.13.6.6.2.11 |
6729 |
diff -p -u -b -r1.13.6.9 -r1.13.6.6.2.11 |
6615 |
--- src/squid.h 26 Mar 2005 03:15:58 -0000 1.13.6.8 |
6730 |
--- src/squid.h 11 Mar 2006 03:16:31 -0000 1.13.6.9 |
6616 |
+++ src/squid.h 15 May 2005 20:10:33 -0000 1.13.6.6.2.11 |
6731 |
+++ src/squid.h 15 May 2005 20:10:33 -0000 1.13.6.6.2.11 |
6617 |
@@ -38,6 +38,14 @@ |
6732 |
@@ -38,6 +38,14 @@ |
6618 |
#include "config.h" |
6733 |
#include "config.h" |
Lines 6711-6722
Link Here
|
6711 |
Index: src/structs.h |
6826 |
Index: src/structs.h |
6712 |
=================================================================== |
6827 |
=================================================================== |
6713 |
RCS file: /cvsroot/squid/squid/src/structs.h,v |
6828 |
RCS file: /cvsroot/squid/squid/src/structs.h,v |
6714 |
retrieving revision 1.48.2.43 |
6829 |
retrieving revision 1.48.2.46 |
6715 |
retrieving revision 1.48.2.9.2.48 |
6830 |
retrieving revision 1.48.2.9.2.49 |
6716 |
diff -p -u -b -r1.48.2.43 -r1.48.2.9.2.48 |
6831 |
diff -p -u -b -r1.48.2.46 -r1.48.2.9.2.49 |
6717 |
--- src/structs.h 4 Sep 2005 02:13:28 -0000 1.48.2.43 |
6832 |
--- src/structs.h 11 Mar 2006 03:16:31 -0000 1.48.2.46 |
6718 |
+++ src/structs.h 30 Nov 2005 21:52:15 -0000 1.48.2.9.2.48 |
6833 |
+++ src/structs.h 16 Feb 2006 17:21:45 -0000 1.48.2.9.2.49 |
6719 |
@@ -384,6 +384,22 @@ struct _RemovalPolicySettings { |
6834 |
@@ -384,6 +384,23 @@ struct _RemovalPolicySettings { |
6720 |
wordlist *args; |
6835 |
wordlist *args; |
6721 |
}; |
6836 |
}; |
6722 |
|
6837 |
|
Lines 6730-6735
Link Here
|
6730 |
+ int preview_size; |
6845 |
+ int preview_size; |
6731 |
+ int check_interval; |
6846 |
+ int check_interval; |
6732 |
+ int send_client_ip; |
6847 |
+ int send_client_ip; |
|
|
6848 |
+ int send_server_ip; |
6733 |
+ int send_auth_user; |
6849 |
+ int send_auth_user; |
6734 |
+ char *auth_scheme; |
6850 |
+ char *auth_scheme; |
6735 |
+}; |
6851 |
+}; |
Lines 6749-6755
Link Here
|
6749 |
}; |
6865 |
}; |
6750 |
|
6866 |
|
6751 |
struct _SquidConfig2 { |
6867 |
struct _SquidConfig2 { |
6752 |
@@ -787,7 +806,10 @@ struct _fde { |
6868 |
@@ -788,7 +807,10 @@ struct _fde { |
6753 |
} flags; |
6869 |
} flags; |
6754 |
squid_off_t bytes_read; |
6870 |
squid_off_t bytes_read; |
6755 |
squid_off_t bytes_written; |
6871 |
squid_off_t bytes_written; |
Lines 6761-6767
Link Here
|
6761 |
struct _fde_disk { |
6877 |
struct _fde_disk { |
6762 |
DWCB *wrt_handle; |
6878 |
DWCB *wrt_handle; |
6763 |
void *wrt_handle_data; |
6879 |
void *wrt_handle_data; |
6764 |
@@ -982,6 +1004,130 @@ struct _http_state_flags { |
6880 |
@@ -983,6 +1005,131 @@ struct _http_state_flags { |
6765 |
unsigned int request_sent:1; |
6881 |
unsigned int request_sent:1; |
6766 |
}; |
6882 |
}; |
6767 |
|
6883 |
|
Lines 6846-6851
Link Here
|
6846 |
+ struct { |
6962 |
+ struct { |
6847 |
+ unsigned int allow_204:1; |
6963 |
+ unsigned int allow_204:1; |
6848 |
+ unsigned int need_x_client_ip:1; |
6964 |
+ unsigned int need_x_client_ip:1; |
|
|
6965 |
+ unsigned int need_x_server_ip:1; |
6849 |
+ unsigned int need_x_authenticated_user:1; |
6966 |
+ unsigned int need_x_authenticated_user:1; |
6850 |
+ } flags; |
6967 |
+ } flags; |
6851 |
+ int preview; |
6968 |
+ int preview; |
Lines 6892-6898
Link Here
|
6892 |
struct _HttpStateData { |
7009 |
struct _HttpStateData { |
6893 |
StoreEntry *entry; |
7010 |
StoreEntry *entry; |
6894 |
request_t *request; |
7011 |
request_t *request; |
6895 |
@@ -993,10 +1139,14 @@ struct _HttpStateData { |
7012 |
@@ -994,10 +1141,14 @@ struct _HttpStateData { |
6896 |
int fd; |
7013 |
int fd; |
6897 |
http_state_flags flags; |
7014 |
http_state_flags flags; |
6898 |
FwdState *fwd; |
7015 |
FwdState *fwd; |
Lines 6915-6921
Link Here
|
6915 |
unsigned int hit:1; |
7032 |
unsigned int hit:1; |
6916 |
} flags; |
7033 |
} flags; |
6917 |
struct { |
7034 |
struct { |
6918 |
@@ -1100,6 +1251,9 @@ struct _clientHttpRequest { |
7035 |
@@ -1107,6 +1253,9 @@ struct _clientHttpRequest { |
6919 |
} redirect; |
7036 |
} redirect; |
6920 |
dlink_node active; |
7037 |
dlink_node active; |
6921 |
squid_off_t maxBodySize; |
7038 |
squid_off_t maxBodySize; |
Lines 6925-6931
Link Here
|
6925 |
}; |
7042 |
}; |
6926 |
|
7043 |
|
6927 |
struct _ConnStateData { |
7044 |
struct _ConnStateData { |
6928 |
@@ -1127,7 +1281,6 @@ struct _ConnStateData { |
7045 |
@@ -1134,7 +1283,6 @@ struct _ConnStateData { |
6929 |
struct sockaddr_in me; |
7046 |
struct sockaddr_in me; |
6930 |
struct in_addr log_addr; |
7047 |
struct in_addr log_addr; |
6931 |
char rfc931[USER_IDENT_SZ]; |
7048 |
char rfc931[USER_IDENT_SZ]; |
Lines 6933-6939
Link Here
|
6933 |
struct { |
7050 |
struct { |
6934 |
int n; |
7051 |
int n; |
6935 |
time_t until; |
7052 |
time_t until; |
6936 |
@@ -1678,6 +1831,9 @@ struct _request_t { |
7053 |
@@ -1685,6 +1833,9 @@ struct _request_t { |
6937 |
char *peer_login; /* Configured peer login:password */ |
7054 |
char *peer_login; /* Configured peer login:password */ |
6938 |
time_t lastmod; /* Used on refreshes */ |
7055 |
time_t lastmod; /* Used on refreshes */ |
6939 |
const char *vary_headers; /* Used when varying entities are detected. Changes how the store key is calculated */ |
7056 |
const char *vary_headers; /* Used when varying entities are detected. Changes how the store key is calculated */ |
Lines 6983-6992
Link Here
|
6983 |
Index: src/url.c |
7100 |
Index: src/url.c |
6984 |
=================================================================== |
7101 |
=================================================================== |
6985 |
RCS file: /cvsroot/squid/squid/src/url.c,v |
7102 |
RCS file: /cvsroot/squid/squid/src/url.c,v |
6986 |
retrieving revision 1.7.6.6 |
7103 |
retrieving revision 1.7.6.7 |
6987 |
retrieving revision 1.7.6.5.2.2 |
7104 |
retrieving revision 1.7.6.5.2.2 |
6988 |
diff -p -u -b -r1.7.6.6 -r1.7.6.5.2.2 |
7105 |
diff -p -u -b -r1.7.6.7 -r1.7.6.5.2.2 |
6989 |
--- src/url.c 12 Nov 2005 03:13:48 -0000 1.7.6.6 |
7106 |
--- src/url.c 11 Mar 2006 03:16:31 -0000 1.7.6.7 |
6990 |
+++ src/url.c 23 Nov 2005 20:38:56 -0000 1.7.6.5.2.2 |
7107 |
+++ src/url.c 23 Nov 2005 20:38:56 -0000 1.7.6.5.2.2 |
6991 |
@@ -103,6 +103,9 @@ const char *ProtocolStr[] = |
7108 |
@@ -103,6 +103,9 @@ const char *ProtocolStr[] = |
6992 |
"whois", |
7109 |
"whois", |