diff -u -r -N squid-3.0.STABLE17/ChangeLog squid-3.0.STABLE18/ChangeLog
--- squid-3.0.STABLE17/ChangeLog 2009-07-27 00:24:36.000000000 +1200
+++ squid-3.0.STABLE18/ChangeLog 2009-08-04 23:57:34.000000000 +1200
@@ -1,3 +1,14 @@
+Changes to squid-3.0.STABLE18 (04 Aug 2009):
+
+ - Bug 2728: regression: assertion failed: !eof
+ - Bug 2732: reply_body_max_size smaller than error page loops
+ infinitely until out of memory
+ - Bug 2725: pconn failure if domain or client_address are unset
+ - Bug 2648: reserved helpers not shut down after reconfigure/rotate
+ - Bug 2462: make check should tell when cppunit is missing
+ - Remove excess messages about headers < minimum size
+ - Support Libtool 2.2.6
+
Changes to squid-3.0.STABLE17 (27 Jul 2009):
- Bug 2680 regression: Crash after rotate with no helpers running
diff -u -r -N squid-3.0.STABLE17/configure squid-3.0.STABLE18/configure
--- squid-3.0.STABLE17/configure 2009-07-27 00:24:48.000000000 +1200
+++ squid-3.0.STABLE18/configure 2009-08-04 23:57:50.000000000 +1200
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in Revision.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for Squid Web Proxy 3.0.STABLE17.
+# Generated by GNU Autoconf 2.62 for Squid Web Proxy 3.0.STABLE18.
#
# Report bugs to
+
+
+
+
+
+
+
+
The Squid Team are pleased to announce the release of Squid-3.0.STABLE17.
+The Squid Team are pleased to announce the release of Squid-3.0.STABLE18.
This new release is available for download from http://www.squid-cache.org/Versions/v3/3.0/ or the mirrors.
@@ -23,19 +68,19 @@We welcome feedback and bug reports. If you find a bug, please see http://wiki.squid-cache.org/SquidFaq/TroubleShooting#head-7067fc0034ce967e67911becaabb8c95a34d576d for how to submit a report with a stack trace.
-Although this release is deemed good enough for use in many setups, please note the existence of open bugs against Squid-3.0.
-The 3.0 change history can be viewed here.
-Squid 3.0 represents a major rewrite of Squid and has a number of new features.
@@ -87,7 +132,7 @@More information about ESI can be found from the ESI website http://www.esi.org
-Some of the features found in Squid-2.6 is not available in Squid-3. @@ -107,7 +152,7 @@
-This Squid version can run on Windows as a system service using the Cygwin emulation environment,
or can be compiled in Windows native mode using the MinGW + MSYS development environment. Windows NT 4 SP4 and later are supported.
@@ -348,7 +393,7 @@
-
There have been many changes to Squid's configuration file since Squid-2.6.
@@ -365,7 +410,7 @@ -@@ -682,7 +727,7 @@
-@@ -878,7 +923,7 @@
-@@ -896,7 +941,7 @@
-There have been some changes to Squid's build configuration since Squid-2.6.
@@ -914,7 +959,7 @@ -@@ -1029,7 +1074,7 @@
-@@ -1073,7 +1118,7 @@
-The following configure options have been removed.
@@ -1098,13 +1143,13 @@ -Some squid.conf and ./configure options which were available in Squid-2.7 are not yet available in Squid-3.0
If you need something to do then porting one of these from Squid-2 to Squid-3 is most welcome.
-@@ -1248,7 +1293,7 @@
-diff -u -r -N squid-3.0.STABLE17/src/client_side_reply.cc squid-3.0.STABLE18/src/client_side_reply.cc --- squid-3.0.STABLE17/src/client_side_reply.cc 2009-07-27 00:24:47.000000000 +1200 +++ squid-3.0.STABLE18/src/client_side_reply.cc 2009-08-04 23:57:49.000000000 +1200 @@ -1682,6 +1682,7 @@ } if (http->isReplyBodyTooLarge(reply->content_length)) { + http->logType = LOG_TCP_DENIED_REPLY; ErrorState *err = clientBuildError(ERR_TOO_BIG, HTTP_FORBIDDEN, NULL, http->getConn() != NULL ? &http->getConn()->peer.sin_addr : &no_addr, diff -u -r -N squid-3.0.STABLE17/src/helper.cc squid-3.0.STABLE18/src/helper.cc --- squid-3.0.STABLE17/src/helper.cc 2009-07-27 00:24:47.000000000 +1200 +++ squid-3.0.STABLE18/src/helper.cc 2009-08-04 23:57:49.000000000 +1200 @@ -474,15 +474,14 @@ if (srv->queue.head) { srv->flags.reserved = S_HELPER_DEFERRED; - helperStatefulServerKickQueue(srv); } else { srv->flags.reserved = S_HELPER_FREE; if ((srv->parent->OnEmptyQueue != NULL) && (srv->data)) srv->parent->OnEmptyQueue(srv->data); - - helperStatefulKickQueue(hlp); } + + helperStatefulServerKickQueue(srv); } /* @@ -521,7 +520,9 @@ srv->flags.reserved = S_HELPER_FREE; if (srv->parent->OnEmptyQueue != NULL && srv->data) - srv->parent->OnEmptyQueue(srv->data); + srv->parent->OnEmptyQueue(srv->data); + + helperStatefulServerKickQueue(srv); } void * @@ -854,8 +855,6 @@ if (!concurrency) concurrency = 1; - assert(srv->rfd == fd); - if (srv->rbuf) { memFreeBuf(srv->rbuf_sz, srv->rbuf); srv->rbuf = NULL; @@ -922,7 +921,6 @@ helper_stateful_server *srv = (helper_stateful_server *)data; statefulhelper *hlp = srv->parent; helper_stateful_request *r; - assert(srv->rfd == fd); if (srv->rbuf) { memFreeBuf(srv->rbuf_sz, srv->rbuf); @@ -989,7 +987,6 @@ char *t = NULL; helper_server *srv = (helper_server *)data; helper *hlp = srv->parent; - assert(fd == srv->rfd); assert(cbdataReferenceValid(data)); /* Bail out early on COMM_ERR_CLOSING - close handlers will tidy up for us */ @@ -998,6 +995,8 @@ return; } + assert(fd == srv->rfd); + debugs(84, 5, "helperHandleRead: " << len << " bytes from " << hlp->id_name << " #" << srv->index + 1); if (flag != COMM_OK || len <= 0) { @@ -1079,17 +1078,21 @@ srv->roffset -= (t - srv->rbuf); memmove(srv->rbuf, t, srv->roffset + 1); - if (srv->flags.shutdown) { + if (!srv->flags.shutdown) { + helperKickQueue(hlp); + } else if (!srv->flags.closing && !srv->stats.pending) { int wfd = srv->wfd; srv->wfd = -1; + if (srv->rfd == wfd) + srv->rfd = -1; srv->flags.closing=1; comm_close(wfd); - return; - } else - helperKickQueue(hlp); + return; + } } - comm_read(fd, srv->rbuf + srv->roffset, srv->rbuf_sz - srv->roffset - 1, helperHandleRead, srv); + if (srv->rfd != -1) + comm_read(fd, srv->rbuf + srv->roffset, srv->rbuf_sz - srv->roffset - 1, helperHandleRead, srv); } static void @@ -1099,7 +1102,6 @@ helper_stateful_server *srv = (helper_stateful_server *)data; helper_stateful_request *r; statefulhelper *hlp = srv->parent; - assert(fd == srv->rfd); assert(cbdataReferenceValid(data)); /* Bail out early on COMM_ERR_CLOSING - close handlers will tidy up for us */ @@ -1108,6 +1110,8 @@ return; } + assert(fd == srv->rfd); + debugs(84, 5, "helperStatefulHandleRead: " << len << " bytes from " << hlp->id_name << " #" << srv->index + 1); @@ -1209,22 +1213,11 @@ tvSubMsec(srv->dispatch_time, current_time), hlp->stats.replies, REDIRECT_AV_FACTOR); - if (srv->flags.shutdown - && srv->flags.reserved == S_HELPER_FREE - && !srv->deferred_requests) { - int wfd = srv->wfd; - srv->wfd = -1; - srv->flags.closing=1; - comm_close(wfd); - } else { - if (srv->queue.head) - helperStatefulServerKickQueue(srv); - else - helperStatefulKickQueue(hlp); - } + helperStatefulServerKickQueue(srv); } - comm_read(srv->rfd, srv->rbuf + srv->roffset, srv->rbuf_sz - srv->roffset - 1, + if (srv->rfd != -1) + comm_read(srv->rfd, srv->rbuf + srv->roffset, srv->rbuf_sz - srv->roffset - 1, helperStatefulHandleRead, srv); } @@ -1542,21 +1535,8 @@ /* and push the queue. Note that the callback may have submitted a new * request to the helper which is why we test for the request*/ - if (srv->request == NULL) { - if (srv->flags.shutdown - && srv->flags.reserved == S_HELPER_FREE - && !srv->deferred_requests) { - int wfd = srv->wfd; - srv->wfd = -1; - srv->flags.closing=1; - comm_close(wfd); - } else { - if (srv->queue.head) - helperStatefulServerKickQueue(srv); - else - helperStatefulKickQueue(hlp); - } - } + if (srv->request == NULL) + helperStatefulServerKickQueue(srv); return; } @@ -1603,8 +1583,22 @@ { helper_stateful_request *r; - if ((r = StatefulServerDequeue(srv))) + if ((r = StatefulServerDequeue(srv))) { helperStatefulDispatch(srv, r); + return; + } + + if (!srv->flags.shutdown) { + helperStatefulKickQueue(srv->parent); + } else if (!srv->flags.closing && srv->flags.reserved == S_HELPER_FREE && !srv->flags.busy) { + int wfd = srv->wfd; + srv->wfd = -1; + if (srv->rfd == wfd) + srv->rfd = -1; + srv->flags.closing=1; + comm_close(wfd); + return; + } } static void diff -u -r -N squid-3.0.STABLE17/src/HttpMsg.cc squid-3.0.STABLE18/src/HttpMsg.cc --- squid-3.0.STABLE17/src/HttpMsg.cc 2009-07-27 00:24:46.000000000 +1200 +++ squid-3.0.STABLE18/src/HttpMsg.cc 2009-08-04 23:57:48.000000000 +1200 @@ -154,8 +154,11 @@ // sanity check the start line to see if this is in fact an HTTP message if (!sanityCheckStartLine(buf, hdr_len, error)) { - debugs(58,1, HERE << "first line of HTTP message is invalid"); - // NP: sanityCheck sets *error + // NP: sanityCheck sets *error and sends debug warnings on syntax errors. + // if we have seen the connection close, this is an error too + if (eof && *error==HTTP_STATUS_NONE) + *error = HTTP_INVALID_HEADER; + return false; } diff -u -r -N squid-3.0.STABLE17/src/HttpReply.cc squid-3.0.STABLE18/src/HttpReply.cc --- squid-3.0.STABLE17/src/HttpReply.cc 2009-07-27 00:24:46.000000000 +1200 +++ squid-3.0.STABLE18/src/HttpReply.cc 2009-08-04 23:57:48.000000000 +1200 @@ -446,8 +446,10 @@ // content is long enough to possibly hold a reply // 4 being magic size of a 3-digit number plus space delimiter if ( buf->contentSize() < (protoPrefix.size() + 4) ) { - if (hdr_len > 0) + if (hdr_len > 0) { + debugs(58, 3, HERE << "Too small reply header (" << hdr_len << " bytes)"); *error = HTTP_INVALID_HEADER; + } return false; } diff -u -r -N squid-3.0.STABLE17/src/HttpRequest.cc squid-3.0.STABLE18/src/HttpRequest.cc --- squid-3.0.STABLE17/src/HttpRequest.cc 2009-07-27 00:24:46.000000000 +1200 +++ squid-3.0.STABLE18/src/HttpRequest.cc 2009-08-04 23:57:48.000000000 +1200 @@ -156,6 +156,7 @@ if ( buf->contentSize() < 2 ) { // this is ony a real error if the headers apparently complete. if (hdr_len > 0) { + debugs(58, 3, HERE << "Too large request header (" << hdr_len << " bytes)"); *error = HTTP_INVALID_HEADER; } return false; diff -u -r -N squid-3.0.STABLE17/src/pconn.cc squid-3.0.STABLE18/src/pconn.cc --- squid-3.0.STABLE17/src/pconn.cc 2009-07-27 00:24:48.000000000 +1200 +++ squid-3.0.STABLE18/src/pconn.cc 2009-08-04 23:57:50.000000000 +1200 @@ -188,7 +188,7 @@ else snprintf(buf, SQUIDHOSTNAMELEN * 3 + 10, "%s:%d", host, (int) port); - debugs(48,6,"PconnPool::key(" << host << "," << port << "," << domain << "," << inet_ntoa(*client_address) << "is {" << buf << "}" ); + debugs(48,6,"PconnPool::key(" << (host?host:"(no host!)") << "," << port << "," << (domain?domain:"(no domain)") << "," << (client_address?inet_ntoa(*client_address):"(no client IP)") << "is {" << buf << "}" ); return buf; }