diff -u -r -N squid-3.0.STABLE11/ChangeLog squid-3.0.STABLE12/ChangeLog
--- squid-3.0.STABLE11/ChangeLog 2008-12-23 17:19:20.000000000 +1300
+++ squid-3.0.STABLE12/ChangeLog 2009-01-21 14:59:00.000000000 +1300
@@ -1,9 +1,20 @@
+Changes to squid-3.0.STABLE12 (21 Jan 2009):
+
+ - Bug 2533: Solaris (sparc) 64-bit build breaks with gcc/g++
+ - Bug 2542: ICAP filters break download resume
+ - Bug 2556: HTCP fails without icp_port
+ - Bug 2564: logformat '%tl' field not working as advertised
+ - Port from 3.1: TestBed basic build consistency checks
+ - Policy: Change half_closed_clients default to off
+ - Policy: Removed -V command line option, deprecated by 2.6
+ - ... and several other minor code cleanups
+
Changes to squid-3.0.STABLE11 (24 Dec 2008):
- Bug 2424: filedescriptors being left unnecessary opened
- Bug 2545: fault passing ICAP filtered traffic to peers
- Bug 2227: Sefgaults in MemBuf::reset during idnsSendQuery
- - .. and some minor admin and debug cleanups.
+ - ... and some minor admin and debug cleanups.
Changes to squid-3.0.STABLE11-RC1 (3 Dec 2008):
diff -u -r -N squid-3.0.STABLE11/configure squid-3.0.STABLE12/configure
--- squid-3.0.STABLE11/configure 2008-12-23 17:19:34.000000000 +1300
+++ squid-3.0.STABLE12/configure 2009-01-21 14:59:10.000000000 +1300
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in Revision: 1.488.2.3 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for Squid Web Proxy 3.0.STABLE11.
+# Generated by GNU Autoconf 2.62 for Squid Web Proxy 3.0.STABLE12.
#
# Report bugs to .
#
@@ -751,8 +751,8 @@
# Identity of this package.
PACKAGE_NAME='Squid Web Proxy'
PACKAGE_TARNAME='squid'
-PACKAGE_VERSION='3.0.STABLE11'
-PACKAGE_STRING='Squid Web Proxy 3.0.STABLE11'
+PACKAGE_VERSION='3.0.STABLE12'
+PACKAGE_STRING='Squid Web Proxy 3.0.STABLE12'
PACKAGE_BUGREPORT='http://www.squid-cache.org/bugs/'
ac_unique_file="src/main.cc"
@@ -1661,7 +1661,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Squid Web Proxy 3.0.STABLE11 to adapt to many kinds of systems.
+\`configure' configures Squid Web Proxy 3.0.STABLE12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1731,7 +1731,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Squid Web Proxy 3.0.STABLE11:";;
+ short | recursive ) echo "Configuration of Squid Web Proxy 3.0.STABLE12:";;
esac
cat <<\_ACEOF
@@ -2043,7 +2043,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Squid Web Proxy configure 3.0.STABLE11
+Squid Web Proxy configure 3.0.STABLE12
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -2057,7 +2057,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Squid Web Proxy $as_me 3.0.STABLE11, which was
+It was created by Squid Web Proxy $as_me 3.0.STABLE12, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2755,7 +2755,7 @@
# Define the identity of the package.
PACKAGE='squid'
- VERSION='3.0.STABLE11'
+ VERSION='3.0.STABLE12'
cat >>confdefs.h <<_ACEOF
@@ -22850,11 +22850,12 @@
case "$host" in
*-solaris*)
if test "$GCC" = "yes"; then
- echo "Removing -Xa for gcc on $host"
+ echo "Removing -Xa for gcc/g++ on $host"
CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`"
CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`"
- echo "Replacing -xarch=generic64 with -m64 for gcc on $host"
+ echo "Replacing -xarch=generic64 with -m64 for gcc/g++ on $host"
CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
+ CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`"
fi
echo "Removing -Usun on $host"
@@ -23089,6 +23090,27 @@
+test -n "$AUTH_MODULE_basic" &&
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AUTH_MODULE_BASIC 1
+_ACEOF
+
+test -n "$AUTH_MODULE_digest" &&
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AUTH_MODULE_DIGEST 1
+_ACEOF
+
+test -n "$AUTH_MODULE_ntlm" &&
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AUTH_MODULE_NTLM 1
+_ACEOF
+
+test -n "$AUTH_MODULE_negotiate" &&
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AUTH_MODULE_NEGOTIATE 1
+_ACEOF
+
+
if test -n "$AUTH_MODULE_basic"; then
BASIC_AUTH_HELPERS="all"
fi
@@ -47844,7 +47866,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Squid Web Proxy $as_me 3.0.STABLE11, which was
+This file was extended by Squid Web Proxy $as_me 3.0.STABLE12, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -47897,7 +47919,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-Squid Web Proxy config.status 3.0.STABLE11
+Squid Web Proxy config.status 3.0.STABLE12
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -u -r -N squid-3.0.STABLE11/configure.in squid-3.0.STABLE12/configure.in
--- squid-3.0.STABLE11/configure.in 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/configure.in 2009-01-21 14:59:10.000000000 +1300
@@ -2,7 +2,7 @@
dnl Configuration input file for Squid
dnl
dnl
-AC_INIT(Squid Web Proxy, 3.0.STABLE11, http://www.squid-cache.org/bugs/, squid)
+AC_INIT(Squid Web Proxy, 3.0.STABLE12, http://www.squid-cache.org/bugs/, squid)
AC_PREREQ(2.52)
AM_CONFIG_HEADER(include/autoconf.h)
AC_CONFIG_AUX_DIR(cfgaux)
@@ -1210,11 +1210,12 @@
dnl The 'sun' define is needed by ipfilter includes, so we must remove "-Usun"
*-solaris*)
if test "$GCC" = "yes"; then
- echo "Removing -Xa for gcc on $host"
+ echo "Removing -Xa for gcc/g++ on $host"
CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`"
CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`"
- echo "Replacing -xarch=generic64 with -m64 for gcc on $host"
+ echo "Replacing -xarch=generic64 with -m64 for gcc/g++ on $host"
CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
+ CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`"
fi
echo "Removing -Usun on $host"
@@ -1385,6 +1386,12 @@
AC_SUBST(AUTH_LINKOBJS)
AC_SUBST(AUTH_OBJS)
+dnl bundled auth modules, in order to have handy defines for the cppunit testsuite
+test -n "$AUTH_MODULE_basic" && AC_DEFINE([HAVE_AUTH_MODULE_BASIC],1,[Basic auth module is built])
+test -n "$AUTH_MODULE_digest" && AC_DEFINE([HAVE_AUTH_MODULE_DIGEST],1,[Digest auth module is built])
+test -n "$AUTH_MODULE_ntlm" && AC_DEFINE([HAVE_AUTH_MODULE_NTLM],1,[NTLM auth module is built])
+test -n "$AUTH_MODULE_negotiate" && AC_DEFINE([HAVE_AUTH_MODULE_NEGOTIATE],1,[Negotiate auth module is built])
+
dnl Select basic auth scheme helpers to build
if test -n "$AUTH_MODULE_basic"; then
BASIC_AUTH_HELPERS="all"
diff -u -r -N squid-3.0.STABLE11/helpers/ntlm_auth/SMB/ntlm_auth.c squid-3.0.STABLE12/helpers/ntlm_auth/SMB/ntlm_auth.c
--- squid-3.0.STABLE11/helpers/ntlm_auth/SMB/ntlm_auth.c 2008-12-23 17:19:29.000000000 +1300
+++ squid-3.0.STABLE12/helpers/ntlm_auth/SMB/ntlm_auth.c 2009-01-21 14:59:07.000000000 +1300
@@ -317,8 +317,7 @@
return;
/* notreached */
case NTLM_CHALLENGE:
- SEND
- ("NA Got a challenge. We refuse to have our authority disputed");
+ SEND("NA Got a challenge. We refuse to have our authority disputed");
return;
/* notreached */
case NTLM_AUTHENTICATE:
@@ -416,8 +415,10 @@
(ntlm_authenticate *) decoded, plen);
return;
}
+ SEND("BH unknown internal error.");
+ return;
}
- assert(cred != NULL);
+
lc(cred); /* let's lowercase them for our convenience */
SEND2("AF %s", cred);
return;
diff -u -r -N squid-3.0.STABLE11/include/autoconf.h.in squid-3.0.STABLE12/include/autoconf.h.in
--- squid-3.0.STABLE11/include/autoconf.h.in 2008-12-23 17:19:29.000000000 +1300
+++ squid-3.0.STABLE12/include/autoconf.h.in 2009-01-21 14:59:07.000000000 +1300
@@ -61,6 +61,18 @@
/* Define to 1 if you have the header file. */
#undef HAVE_ASSERT_H
+/* Basic auth module is built */
+#undef HAVE_AUTH_MODULE_BASIC
+
+/* Digest auth module is built */
+#undef HAVE_AUTH_MODULE_DIGEST
+
+/* Negotiate auth module is built */
+#undef HAVE_AUTH_MODULE_NEGOTIATE
+
+/* NTLM auth module is built */
+#undef HAVE_AUTH_MODULE_NTLM
+
/* Define to 1 if you have the `backtrace_symbols_fd' function. */
#undef HAVE_BACKTRACE_SYMBOLS_FD
diff -u -r -N squid-3.0.STABLE11/include/version.h squid-3.0.STABLE12/include/version.h
--- squid-3.0.STABLE11/include/version.h 2008-12-23 17:19:34.000000000 +1300
+++ squid-3.0.STABLE12/include/version.h 2009-01-21 14:59:10.000000000 +1300
@@ -9,5 +9,5 @@
*/
#ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1230005959
+#define SQUID_RELEASE_TIME 1232503139
#endif
diff -u -r -N squid-3.0.STABLE11/Makefile.am squid-3.0.STABLE12/Makefile.am
--- squid-3.0.STABLE11/Makefile.am 2008-12-23 17:19:20.000000000 +1300
+++ squid-3.0.STABLE12/Makefile.am 2009-01-21 14:59:00.000000000 +1300
@@ -42,3 +42,6 @@
install-pinger:
chown root $(DEFAULT_PINGER)
chmod 4711 $(DEFAULT_PINGER)
+
+all-am:
+ @echo "Build Successful."
diff -u -r -N squid-3.0.STABLE11/Makefile.in squid-3.0.STABLE12/Makefile.in
--- squid-3.0.STABLE11/Makefile.in 2008-12-23 17:19:20.000000000 +1300
+++ squid-3.0.STABLE12/Makefile.in 2009-01-21 14:59:00.000000000 +1300
@@ -772,6 +772,9 @@
install-pinger:
chown root $(DEFAULT_PINGER)
chmod 4711 $(DEFAULT_PINGER)
+
+all-am:
+ @echo "Build Successful."
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -u -r -N squid-3.0.STABLE11/RELEASENOTES.html squid-3.0.STABLE12/RELEASENOTES.html
--- squid-3.0.STABLE11/RELEASENOTES.html 2008-12-23 17:20:28.000000000 +1300
+++ squid-3.0.STABLE12/RELEASENOTES.html 2009-01-21 15:00:19.000000000 +1300
@@ -1,11 +1,11 @@
-
- Squid 3.0.STABLE11 release notes
+
+ Squid 3.0.STABLE12 release notes
-Squid 3.0.STABLE11 release notes
+Squid 3.0.STABLE12 release notes
Squid Developers
@@ -15,7 +15,7 @@
-The Squid Team are pleased to announce the release of Squid-3.0.STABLE11.
+The Squid Team are pleased to announce the release of Squid-3.0.STABLE12.
This new release is available for download from
http://www.squid-cache.org/Versions/v3/3.0/ or the
mirrors.
@@ -846,6 +846,9 @@
fake_auth helper for NTLM now accepts the '-S' parameter to strip NTLM domain off the username string.
This is useful for class 4 Delay Pools in Squid 3.x
+half_closed_clients
+New defaut vaue of OFF
+
diff -u -r -N squid-3.0.STABLE11/src/access_log.cc squid-3.0.STABLE12/src/access_log.cc
--- squid-3.0.STABLE11/src/access_log.cc 2008-12-23 17:19:32.000000000 +1300
+++ squid-3.0.STABLE12/src/access_log.cc 2009-01-21 14:59:08.000000000 +1300
@@ -604,23 +604,22 @@
case LFT_TIME_GMT: {
const char *spec;
-
struct tm *t;
spec = fmt->data.timespec;
- if (!spec)
- spec = "%d/%b/%Y:%H:%M:%S";
-
- if (fmt->type == LFT_TIME_LOCALTIME)
+ if (fmt->type == LFT_TIME_LOCALTIME) {
+ if (!spec)
+ spec = "%d/%b/%Y:%H:%M:%S %z";
t = localtime(&squid_curtime);
- else
+ } else {
+ if (!spec)
+ spec = "%d/%b/%Y:%H:%M:%S";
t = gmtime(&squid_curtime);
+ }
strftime(tmp, sizeof(tmp), spec, t);
-
out = tmp;
}
-
break;
case LFT_TIME_TO_HANDLE_REQUEST:
diff -u -r -N squid-3.0.STABLE11/src/cf.data.pre squid-3.0.STABLE12/src/cf.data.pre
--- squid-3.0.STABLE11/src/cf.data.pre 2008-12-23 17:19:32.000000000 +1300
+++ squid-3.0.STABLE12/src/cf.data.pre 2009-01-21 14:59:09.000000000 +1300
@@ -3205,16 +3205,20 @@
NAME: half_closed_clients
TYPE: onoff
LOC: Config.onoff.half_closed_clients
-DEFAULT: on
+DEFAULT: off
DOC_START
Some clients may shutdown the sending side of their TCP
connections, while leaving their receiving sides open. Sometimes,
Squid can not tell the difference between a half-closed and a
- fully-closed TCP connection. By default, half-closed client
- connections are kept open until a read(2) or write(2) on the
- socket returns an error. Change this option to 'off' and Squid
- will immediately close client connections when read(2) returns
- "no more data to read."
+ fully-closed TCP connection.
+
+ By default, Squid will immediately close client connections when
+ read(2) returns "no more data to read."
+
+ Change this option to 'off' and Squid will keep open connections
+ until a read(2) or write(2) on the socket returns an error.
+ This may show some benefits for reverse proxies. But if not
+ it is recommended to leave OFF.
DOC_END
NAME: pconn_timeout
diff -u -r -N squid-3.0.STABLE11/src/client_side.cc squid-3.0.STABLE12/src/client_side.cc
--- squid-3.0.STABLE11/src/client_side.cc 2008-12-23 17:19:32.000000000 +1300
+++ squid-3.0.STABLE12/src/client_side.cc 2009-01-21 14:59:09.000000000 +1300
@@ -527,7 +527,8 @@
checklist->reply = HTTPMSGLOCK(al.reply);
if (!Config.accessList.log || checklist->fastCheck()) {
- al.request = HTTPMSGLOCK(request);
+ if(request)
+ al.request = HTTPMSGLOCK(request);
accessLogLog(&al, checklist);
updateCounters();
diff -u -r -N squid-3.0.STABLE11/src/Debug.h squid-3.0.STABLE12/src/Debug.h
--- squid-3.0.STABLE11/src/Debug.h 2008-12-23 17:19:31.000000000 +1300
+++ squid-3.0.STABLE12/src/Debug.h 2009-01-21 14:59:08.000000000 +1300
@@ -53,6 +53,15 @@
#define assert(EX) ((EX)?((void)0):xassert("EX", __FILE__, __LINE__))
#endif
+/* defined debug section limits */
+#define MAX_DEBUG_SECTIONS 100
+
+/* defined names for Debug Levels */
+#define DBG_CRITICAL 0 /**< critical messages always shown when they occur */
+#define DBG_IMPORTANT 1 /**< important messages always shown when their section is being checked */
+/* levels 2-8 are still being discussed amongst the developers */
+#define DBG_DATA 9 /**< output is a large data dump only necessary for advanced debugging */
+
class Debug
{
diff -u -r -N squid-3.0.STABLE11/src/defines.h squid-3.0.STABLE12/src/defines.h
--- squid-3.0.STABLE11/src/defines.h 2008-12-23 17:19:32.000000000 +1300
+++ squid-3.0.STABLE12/src/defines.h 2009-01-21 14:59:09.000000000 +1300
@@ -59,7 +59,6 @@
/* Select types. */
#define COMM_SELECT_READ (0x1)
#define COMM_SELECT_WRITE (0x2)
-#define MAX_DEBUG_SECTIONS 100
#define COMM_NONBLOCKING 0x01
#define COMM_NOCLOEXEC 0x02
diff -u -r -N squid-3.0.STABLE11/src/htcp.cc squid-3.0.STABLE12/src/htcp.cc
--- squid-3.0.STABLE11/src/htcp.cc 2008-12-23 17:19:32.000000000 +1300
+++ squid-3.0.STABLE12/src/htcp.cc 2009-01-21 14:59:09.000000000 +1300
@@ -1553,7 +1553,7 @@
}
}
-void
+int
htcpQuery(StoreEntry * e, HttpRequest * req, peer * p)
{
cache_key *save_key;
@@ -1567,7 +1567,7 @@
http_state_flags flags;
if (htcpInSocket < 0)
- return;
+ return 0;
old_squid_format = p->options.htcp_oldsquid;
@@ -1612,7 +1612,7 @@
if (!pktlen) {
debugs(31, 1, "htcpQuery: htcpBuildPacket() failed");
- return;
+ return -1;
}
htcpSend(pkt, (int) pktlen, &p->in_addr);
@@ -1621,6 +1621,8 @@
storeKeyCopy(save_key, (const cache_key *)e->key);
queried_addr[stuff.msg_id % N_QUERIED_KEYS] = p->in_addr;
debugs(31, 3, "htcpQuery: key (" << save_key << ") " << storeKeyText(save_key));
+
+ return 1;
}
/*
diff -u -r -N squid-3.0.STABLE11/src/htcp.h squid-3.0.STABLE12/src/htcp.h
--- squid-3.0.STABLE11/src/htcp.h 2008-12-23 17:19:32.000000000 +1300
+++ squid-3.0.STABLE12/src/htcp.h 2009-01-21 14:59:09.000000000 +1300
@@ -62,7 +62,22 @@
SQUIDCEXTERN void neighborsHtcpReply(const cache_key *, htcpReplyData *, const struct sockaddr_in *);
SQUIDCEXTERN void htcpInit(void);
-SQUIDCEXTERN void htcpQuery(StoreEntry * e, HttpRequest * req, peer * p);
+
+/**
+ * \ingroup ServerProtocolHTCP
+ *
+ * Generate and Send an HTCP query to the specified peer.
+ *
+ * \param e
+ * \param req
+ * \param p
+ * \retval 1 Successfully sent request.
+ * \retval 0 Unable to send request at this time. HTCP may be shutting down or starting up.
+ * Don't wait for a reply or count in stats as sent.
+ * \retval -1 Error sending request.
+ */
+SQUIDCEXTERN int htcpQuery(StoreEntry * e, HttpRequest * req, peer * p);
+
SQUIDCEXTERN void htcpSocketShutdown(void);
SQUIDCEXTERN void htcpSocketClose(void);
diff -u -r -N squid-3.0.STABLE11/src/main.cc squid-3.0.STABLE12/src/main.cc
--- squid-3.0.STABLE11/src/main.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/main.cc 2009-01-21 14:59:09.000000000 +1300
@@ -230,7 +230,6 @@
#endif
" -R Do not set REUSEADDR on port.\n"
" -S Double-check swap during rebuild.\n"
- " -V Virtual host httpd-accelerator.\n"
" -X Force full debugging.\n"
" -Y Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.\n",
appname, CACHE_HTTP_PORT, DefaultConfigFile, CACHE_ICP_PORT);
diff -u -r -N squid-3.0.STABLE11/src/Mem.h squid-3.0.STABLE12/src/Mem.h
--- squid-3.0.STABLE11/src/Mem.h 2008-12-23 17:19:32.000000000 +1300
+++ squid-3.0.STABLE12/src/Mem.h 2009-01-21 14:59:08.000000000 +1300
@@ -1,6 +1,5 @@
-
/*
- * $Id: Mem.h,v 1.4.4.1 2008/02/26 00:15:55 amosjeffries Exp $
+ * $Id$
*
* DEBUG: section 13 High Level Memory Pool Management
* AUTHOR: Harvest Derived
@@ -39,8 +38,11 @@
/* forward decls */
class CacheManager;
+class StoreEntry;
+class MemPoolStats;
+class MemPoolMeter;
-#include
+#include
class Mem
{
diff -u -r -N squid-3.0.STABLE11/src/neighbors.cc squid-3.0.STABLE12/src/neighbors.cc
--- squid-3.0.STABLE11/src/neighbors.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/neighbors.cc 2009-01-21 14:59:09.000000000 +1300
@@ -647,9 +647,6 @@
if (Config.peers == NULL)
return 0;
- if (theOutIcpConnection < 0)
- fatal("neighborsUdpPing: There is no ICP socket!");
-
assert(entry->swap_status == SWAPOUT_NONE);
mem->start_ping = current_time;
@@ -673,9 +670,6 @@
debugs(15, 4, "neighborsUdpPing: pinging peer " << p->host << " for '" << url << "'");
- if (p->type == PEER_MULTICAST)
- mcastSetTtl(theOutIcpConnection, p->mcast.ttl);
-
debugs(15, 3, "neighborsUdpPing: key = '" << entry->getMD5Text() << "'");
debugs(15, 3, "neighborsUdpPing: reqnum = " << reqnum);
@@ -683,34 +677,42 @@
#if USE_HTCP
if (p->options.htcp) {
+ if (Config.Port.htcp <= 0) {
+ debugs(15, DBG_CRITICAL, "HTCP is disabled! Cannot send HTCP request to peer.");
+ continue;
+ }
+
debugs(15, 3, "neighborsUdpPing: sending HTCP query");
- htcpQuery(entry, request, p);
+ if (htcpQuery(entry, request, p) <= 0) continue; // unable to send.
} else
#endif
- if (p->icp.port == echo_port) {
- debugs(15, 4, "neighborsUdpPing: Looks like a dumb cache, send DECHO ping");
- echo_hdr.reqnum = reqnum;
- query = _icp_common_t::createMessage(ICP_DECHO, 0, url, reqnum, 0);
- icpUdpSend(theOutIcpConnection,
- &p->in_addr,
- query,
- LOG_ICP_QUERY,
- 0);
+ {
+ if (Config.Port.icp <= 0 || theOutIcpConnection <= 0) {
+ debugs(15, DBG_CRITICAL, "ICP is disabled! Cannot send ICP request to peer.");
+ continue;
} else {
- flags = 0;
- if (Config.onoff.query_icmp)
- if (p->icp.version == ICP_VERSION_2)
- flags |= ICP_FLAG_SRC_RTT;
+ if (p->type == PEER_MULTICAST)
+ mcastSetTtl(theOutIcpConnection, p->mcast.ttl);
- query = _icp_common_t::createMessage(ICP_QUERY, flags, url, reqnum, 0);
+ if (p->icp.port == echo_port) {
+ debugs(15, 4, "neighborsUdpPing: Looks like a dumb cache, send DECHO ping");
+ echo_hdr.reqnum = reqnum;
+ query = _icp_common_t::createMessage(ICP_DECHO, 0, url, reqnum, 0);
+ icpUdpSend(theOutIcpConnection, &p->in_addr, query, LOG_ICP_QUERY, 0);
+ } else {
+ flags = 0;
+
+ if (Config.onoff.query_icmp)
+ if (p->icp.version == ICP_VERSION_2)
+ flags |= ICP_FLAG_SRC_RTT;
- icpUdpSend(theOutIcpConnection,
- &p->in_addr,
- query,
- LOG_ICP_QUERY,
- 0);
+ query = _icp_common_t::createMessage(ICP_QUERY, flags, url, reqnum, 0);
+
+ icpUdpSend(theOutIcpConnection, &p->in_addr, query, LOG_ICP_QUERY, 0);
+ }
}
+ }
queries_sent++;
diff -u -r -N squid-3.0.STABLE11/src/Server.cc squid-3.0.STABLE12/src/Server.cc
--- squid-3.0.STABLE11/src/Server.cc 2008-12-23 17:19:32.000000000 +1300
+++ squid-3.0.STABLE12/src/Server.cc 2009-01-21 14:59:08.000000000 +1300
@@ -562,7 +562,8 @@
assert(entry);
BodyPipeCheckout bpc(*adaptedBodySource);
- const StoreIOBuffer ioBuf(&bpc.buf, bpc.offset);
+ const StoreIOBuffer ioBuf(&bpc.buf, currentOffset);
+ currentOffset += bpc.buf.size;
entry->write(ioBuf);
bpc.buf.consume(contentSize);
bpc.checkIn();
diff -u -r -N squid-3.0.STABLE11/src/tests/testAuth.cc squid-3.0.STABLE12/src/tests/testAuth.cc
--- squid-3.0.STABLE11/src/tests/testAuth.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/tests/testAuth.cc 2009-01-21 14:59:09.000000000 +1300
@@ -11,10 +11,18 @@
CPPUNIT_TEST_SUITE_REGISTRATION( testAuth );
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthConfig );
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthUserRequest );
+#ifdef HAVE_AUTH_MODULE_BASIC
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthBasicUserRequest );
+#endif
+#ifdef HAVE_AUTH_MODULE_DIGEST
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthDigestUserRequest );
+#endif
+#ifdef HAVE_AUTH_MODULE_NTLM
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthNTLMUserRequest );
+#endif
+#ifdef HAVE_AUTH_MODULE_NEGOTIATE
CPPUNIT_TEST_SUITE_REGISTRATION( testAuthNegotiateUserRequest );
+#endif
/* Instantiate all auth framework types */
void
@@ -60,7 +68,8 @@
AuthScheme *theScheme;
if ((theScheme = AuthScheme::Find(type_str)) == NULL) {
- fatalf("Unknown authentication scheme '%s'.\n", type_str);
+ return NULL;
+ //fatalf("Unknown authentication scheme '%s'.\n", type_str);
}
config.push_back(theScheme->createConfig());
@@ -120,8 +129,16 @@
{"ntlm", ntlm_parms, 1},
{"negotiate", negotiate_parms, 1}};
- for (unsigned scheme=0; scheme < 4; scheme++)
- setup_scheme(getConfig(params[scheme].name), params[scheme].params, params[scheme].paramlength);
+ for (unsigned scheme=0; scheme < 4; scheme++) {
+ AuthConfig *schemeConfig;
+ schemeConfig = getConfig(params[scheme].name);
+ if (schemeConfig != NULL)
+ setup_scheme (schemeConfig, params[scheme].params,
+ params[scheme].paramlength);
+ else
+ fprintf(stderr,"Skipping unknown authentication scheme '%s'.\n",
+ params[scheme].name);
+ }
authenticateInit(&config);
@@ -162,6 +179,7 @@
}
}
+#ifdef HAVE_AUTH_MODULE_BASIC
#include "auth/basic/auth_basic.h"
/* AuthBasicUserRequest::AuthBasicUserRequest works
*/
@@ -185,7 +203,9 @@
CPPUNIT_ASSERT_EQUAL(0, strcmp("John", temp->username()));
delete temp;
}
+#endif /* HAVE_AUTH_MODULE_BASIC */
+#ifdef HAVE_AUTH_MODULE_DIGEST
#include "auth/digest/auth_digest.h"
/* AuthDigestUserRequest::AuthDigestUserRequest works
*/
@@ -209,7 +229,9 @@
CPPUNIT_ASSERT_EQUAL(0, strcmp("John", temp->username()));
delete temp;
}
+#endif /* HAVE_AUTH_MODULE_DIGEST */
+#ifdef HAVE_AUTH_MODULE_NTLM
#include "auth/ntlm/auth_ntlm.h"
/* AuthNTLMUserRequest::AuthNTLMUserRequest works
*/
@@ -233,7 +255,9 @@
CPPUNIT_ASSERT_EQUAL(0, strcmp("John", temp->username()));
delete temp;
}
+#endif /* HAVE_AUTH_MODULE_NTLM */
+#ifdef HAVE_AUTH_MODULE_NEGOTIATE
#include "auth/negotiate/auth_negotiate.h"
/* AuthNegotiateUserRequest::AuthNegotiateUserRequest works
*/
@@ -257,3 +281,5 @@
CPPUNIT_ASSERT_EQUAL(0, strcmp("John", temp->username()));
delete temp;
}
+
+#endif /* HAVE_AUTH_MODULE_NEGOTIATE */
diff -u -r -N squid-3.0.STABLE11/src/tests/testAuth.h squid-3.0.STABLE12/src/tests/testAuth.h
--- squid-3.0.STABLE11/src/tests/testAuth.h 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/tests/testAuth.h 2009-01-21 14:59:09.000000000 +1300
@@ -2,6 +2,8 @@
#ifndef SQUID_SRC_TEST_AUTH_H
#define SQUID_SRC_TEST_AUTH_H
+#include "config.h"
+
#include
/*
@@ -45,6 +47,7 @@
void construction();
};
+#ifdef HAVE_AUTH_MODULE_BASIC
class testAuthBasicUserRequest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( testAuthBasicUserRequest );
@@ -58,7 +61,9 @@
void construction();
void username();
};
+#endif
+#ifdef HAVE_AUTH_MODULE_DIGEST
class testAuthDigestUserRequest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( testAuthDigestUserRequest );
@@ -72,7 +77,9 @@
void construction();
void username();
};
+#endif
+#ifdef HAVE_AUTH_MODULE_NTLM
class testAuthNTLMUserRequest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( testAuthNTLMUserRequest );
@@ -86,7 +93,9 @@
void construction();
void username();
};
+#endif
+#ifdef HAVE_AUTH_MODULE_NEGOTIATE
class testAuthNegotiateUserRequest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( testAuthNegotiateUserRequest );
@@ -100,6 +109,7 @@
void construction();
void username();
};
+#endif
#endif
diff -u -r -N squid-3.0.STABLE11/src/tests/testEvent.cc squid-3.0.STABLE12/src/tests/testEvent.cc
--- squid-3.0.STABLE11/src/tests/testEvent.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/tests/testEvent.cc 2009-01-21 14:59:09.000000000 +1300
@@ -1,4 +1,4 @@
-#include "squid.h"
+#include "config.h"
#include
#include "CapturingStoreEntry.h"
diff -u -r -N squid-3.0.STABLE11/src/tests/testEventLoop.cc squid-3.0.STABLE12/src/tests/testEventLoop.cc
--- squid-3.0.STABLE11/src/tests/testEventLoop.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/tests/testEventLoop.cc 2009-01-21 14:59:09.000000000 +1300
@@ -1,4 +1,4 @@
-#include "squid.h"
+#include "config.h"
#include
#include "AsyncEngine.h"
diff -u -r -N squid-3.0.STABLE11/src/tests/testHttpRequest.cc squid-3.0.STABLE12/src/tests/testHttpRequest.cc
--- squid-3.0.STABLE11/src/tests/testHttpRequest.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/tests/testHttpRequest.cc 2009-01-21 14:59:09.000000000 +1300
@@ -1,4 +1,4 @@
-#include "squid.h"
+#include "config.h"
#include
#include "Mem.h"
diff -u -r -N squid-3.0.STABLE11/src/tests/testString.cc squid-3.0.STABLE12/src/tests/testString.cc
--- squid-3.0.STABLE11/src/tests/testString.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/tests/testString.cc 2009-01-21 14:59:09.000000000 +1300
@@ -1,8 +1,8 @@
-#include "squid.h"
+#include "config.h"
+#include "testString.h"
#include "event.h"
#include "Mem.h"
#include "SquidString.h"
-#include "testString.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testString );
diff -u -r -N squid-3.0.STABLE11/src/tests/testUfs.cc squid-3.0.STABLE12/src/tests/testUfs.cc
--- squid-3.0.STABLE11/src/tests/testUfs.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/tests/testUfs.cc 2009-01-21 14:59:09.000000000 +1300
@@ -1,4 +1,4 @@
-#include "squid.h"
+#include "config.h"
#include
#include "testUfs.h"
diff -u -r -N squid-3.0.STABLE11/src/tests/testURL.cc squid-3.0.STABLE12/src/tests/testURL.cc
--- squid-3.0.STABLE11/src/tests/testURL.cc 2008-12-23 17:19:33.000000000 +1300
+++ squid-3.0.STABLE12/src/tests/testURL.cc 2009-01-21 14:59:09.000000000 +1300
@@ -1,4 +1,4 @@
-#include "squid.h"
+#include "config.h"
#include
#include