]>
Commit | Line | Data |
---|---|---|
952a633e | 1 | diff -r -c squid-2.4-200208212300/src/client_side.c squid-2.4-200208212300.fixed/src/client_side.c |
2 | *** squid-2.4-200208212300/src/client_side.c Mon Jun 24 08:10:51 2002 | |
3 | --- squid-2.4-200208212300.fixed/src/client_side.c Mon Sep 2 12:56:23 2002 | |
4 | *************** | |
5 | *** 1765,1770 **** | |
6 | --- 1765,1773 ---- | |
7 | /* Avoid copying to MemBuf for non-range requests */ | |
8 | /* Note, if we're here, then 'rep' is known to be NULL */ | |
9 | http->out.offset += body_size; | |
10 | + { int tos=isTcpHit(http->log_type) ? 0 : 8; | |
11 | + setsockopt(fd,SOL_IP,IP_TOS,&tos,4); | |
12 | + } | |
13 | comm_write(fd, buf, size, clientWriteBodyComplete, http, NULL); | |
14 | /* NULL because clientWriteBodyComplete frees it */ | |
15 | return; | |
16 | *************** | |
17 | *** 1817,1822 **** | |
18 | --- 1820,1828 ---- | |
19 | if (!http->request->range && http->request->method == METHOD_GET) | |
20 | assert(check_size == size); | |
21 | /* write */ | |
22 | + { int tos=isTcpHit(http->log_type) ? 0 : 8; | |
23 | + setsockopt(fd,SOL_IP,IP_TOS,&tos,4); | |
24 | + } | |
25 | comm_write_mbuf(fd, mb, clientWriteComplete, http); | |
26 | /* if we don't do it, who will? */ | |
27 | memFree(buf, MEM_CLIENT_SOCK_BUF); | |
28 | diff -r -c squid-2.4-200208212300/src/defines.h squid-2.4-200208212300.fixed/src/defines.h | |
29 | *** squid-2.4-200208212300/src/defines.h Fri Jan 12 01:51:46 2001 | |
30 | --- squid-2.4-200208212300.fixed/src/defines.h Mon Sep 2 13:15:36 2002 | |
31 | *************** | |
32 | *** 38,43 **** | |
33 | --- 38,45 ---- | |
34 | #define FALSE 0 | |
35 | #endif | |
36 | ||
37 | + #define SQUID_TCP_RCVBUF SQUID_TCP_SO_RCVBUF | |
38 | + | |
39 | #define ACL_NAME_SZ 32 | |
40 | #define BROWSERNAMELEN 128 | |
41 | ||
42 | diff -r -c squid-2.4-200208212300/src/ftp.c squid-2.4-200208212300.fixed/src/ftp.c | |
43 | *** squid-2.4-200208212300/src/ftp.c Sun Jun 23 22:18:58 2002 | |
44 | --- squid-2.4-200208212300.fixed/src/ftp.c Mon Sep 2 14:15:11 2002 | |
45 | *************** | |
46 | *** 1116,1123 **** | |
47 | ftpState->ctrl.freefunc = memFree4K; | |
48 | ftpState->ctrl.size = 4096; | |
49 | ftpState->ctrl.offset = 0; | |
50 | ! ftpState->data.buf = xmalloc(SQUID_TCP_SO_RCVBUF); | |
51 | ! ftpState->data.size = SQUID_TCP_SO_RCVBUF; | |
52 | ftpState->data.freefunc = xfree; | |
53 | ftpScheduleReadControlReply(ftpState, 0); | |
54 | } | |
55 | --- 1116,1123 ---- | |
56 | ftpState->ctrl.freefunc = memFree4K; | |
57 | ftpState->ctrl.size = 4096; | |
58 | ftpState->ctrl.offset = 0; | |
59 | ! ftpState->data.buf = xmalloc(SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF); | |
60 | ! ftpState->data.size = (SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF); | |
61 | ftpState->data.freefunc = xfree; | |
62 | ftpScheduleReadControlReply(ftpState, 0); | |
63 | } | |
64 | diff -r -c squid-2.4-200208212300/src/http.c squid-2.4-200208212300.fixed/src/http.c | |
65 | *** squid-2.4-200208212300/src/http.c Fri Jun 28 01:32:46 2002 | |
66 | --- squid-2.4-200208212300.fixed/src/http.c Mon Sep 2 14:15:11 2002 | |
67 | *************** | |
68 | *** 456,462 **** | |
69 | httpReadReply(int fd, void *data) | |
70 | { | |
71 | HttpStateData *httpState = data; | |
72 | ! LOCAL_ARRAY(char, buf, SQUID_TCP_SO_RCVBUF); | |
73 | StoreEntry *entry = httpState->entry; | |
74 | const request_t *request = httpState->request; | |
75 | int len; | |
76 | --- 456,462 ---- | |
77 | httpReadReply(int fd, void *data) | |
78 | { | |
79 | HttpStateData *httpState = data; | |
80 | ! LOCAL_ARRAY(char, buf, SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF); | |
81 | StoreEntry *entry = httpState->entry; | |
82 | const request_t *request = httpState->request; | |
83 | int len; | |
84 | *************** | |
85 | *** 478,484 **** | |
86 | } | |
87 | /* check if we want to defer reading */ | |
88 | errno = 0; | |
89 | ! read_sz = SQUID_TCP_SO_RCVBUF; | |
90 | #if DELAY_POOLS | |
91 | read_sz = delayBytesWanted(delay_id, 1, read_sz); | |
92 | #endif | |
93 | --- 478,484 ---- | |
94 | } | |
95 | /* check if we want to defer reading */ | |
96 | errno = 0; | |
97 | ! read_sz = (SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF); | |
98 | #if DELAY_POOLS | |
99 | read_sz = delayBytesWanted(delay_id, 1, read_sz); | |
100 | #endif |