1 --- squid-2.6.STABLE5.orig/src/client_side.c 2006-09-30 23:10:48.000000000 +0200
2 +++ squid-2.6.STABLE5/src/client_side.c 2006-11-14 18:26:59.459231147 +0100
4 if (!http->request->range) {
5 /* Avoid copying to MemBuf for non-range requests */
6 http->out.offset += size;
7 + { int tos=isTcpHit(http->log_type) ? 0 : 8;
8 + setsockopt(fd,SOL_IP,IP_TOS,&tos,4);
10 comm_write(fd, buf, size, clientWriteBodyComplete, http, NULL);
11 /* NULL because clientWriteBodyComplete frees it */
14 memBufAppend(&mb, buf, size);
17 + { int tos=isTcpHit(http->log_type) ? 0 : 8;
18 + setsockopt(fd,SOL_IP,IP_TOS,&tos,4);
20 comm_write_mbuf(fd, mb, clientWriteComplete, http);
21 /* if we don't do it, who will? */
22 memFree(buf, MEM_CLIENT_SOCK_BUF);
23 diff -urN squid-2.6.STABLE5.orig/src/defines.h squid-2.6.STABLE5/src/defines.h
24 --- squid-2.6.STABLE5.orig/src/defines.h 2006-08-19 14:40:31.000000000 +0200
25 +++ squid-2.6.STABLE5/src/defines.h 2006-11-13 21:15:47.563667677 +0100
30 +#define SQUID_TCP_RCVBUF SQUID_TCP_SO_RCVBUF
32 /* Define load weights for cache_dir types */
33 #define MAX_LOAD_VALUE 1000
35 diff -urN squid-2.6.STABLE5.orig/src/ftp.c squid-2.6.STABLE5/src/ftp.c
36 --- squid-2.6.STABLE5.orig/src/ftp.c 2006-09-19 01:03:36.000000000 +0200
37 +++ squid-2.6.STABLE5/src/ftp.c 2006-11-13 21:16:59.616675539 +0100
39 ftpState->ctrl.last_command = xstrdup("Connect to server");
40 ftpState->ctrl.buf = memAllocBuf(4096, &ftpState->ctrl.size);
41 ftpState->ctrl.offset = 0;
42 - ftpState->data.buf = memAllocBuf(SQUID_TCP_SO_RCVBUF, &ftpState->data.size);
43 + ftpState->data.buf = memAllocBuf(SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF, &ftpState->data.size);
44 ftpScheduleReadControlReply(ftpState, 0);
47 diff -urN squid-2.6.STABLE5.orig/src/http.c squid-2.6.STABLE5/src/http.c
48 --- squid-2.6.STABLE5.orig/src/http.c 2006-10-23 23:34:17.000000000 +0200
49 +++ squid-2.6.STABLE5/src/http.c 2006-11-13 21:19:13.214294384 +0100
51 httpReadReply(int fd, void *data)
53 HttpStateData *httpState = data;
54 - LOCAL_ARRAY(char, buf, SQUID_TCP_SO_RCVBUF);
55 + LOCAL_ARRAY(char, buf, SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF);
56 StoreEntry *entry = httpState->entry;
57 const request_t *request = httpState->request;
58 const request_t *orig_request = httpState->orig_request;
62 - size_t read_sz = SQUID_TCP_SO_RCVBUF;
63 + size_t read_sz = (SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF);
64 struct in_addr *client_addr = NULL;
65 u_short client_port = 0;