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
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);
13 comm_write(fd, buf, size, clientWriteBodyComplete, http, NULL);
14 /* NULL because clientWriteBodyComplete frees it */
19 if (!http->request->range && http->request->method == METHOD_GET)
20 assert(check_size == size);
22 + { int tos=isTcpHit(http->log_type) ? 0 : 8;
23 + setsockopt(fd,SOL_IP,IP_TOS,&tos,4);
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
37 + #define SQUID_TCP_RCVBUF SQUID_TCP_SO_RCVBUF
39 #define ACL_NAME_SZ 32
40 #define BROWSERNAMELEN 128
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
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);
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);
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
69 httpReadReply(int fd, void *data)
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;
77 httpReadReply(int fd, void *data)
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;
87 /* check if we want to defer reading */
89 ! read_sz = SQUID_TCP_SO_RCVBUF;
91 read_sz = delayBytesWanted(delay_id, 1, read_sz);
95 /* check if we want to defer reading */
97 ! read_sz = (SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF);
99 read_sz = delayBytesWanted(delay_id, 1, read_sz);