diff -u -r -N squid-5.0.5/acinclude/lib-checks.m4 squid-5.0.6/acinclude/lib-checks.m4
--- squid-5.0.5/acinclude/lib-checks.m4	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/acinclude/lib-checks.m4	2021-05-10 21:02:34.000000000 +1200
@@ -71,10 +71,13 @@
   AH_TEMPLATE(HAVE_LIBCRYPTO_X509_STORE_CTX_GET0_CERT, "Define to 1 if the X509_STORE_CTX_get0_cert() OpenSSL API function exists")
   AH_TEMPLATE(HAVE_LIBCRYPTO_X509_VERIFY_PARAM_GET_DEPTH, "Define to 1 if the X509_VERIFY_PARAM_get_depth() OpenSSL API function exists")
   AH_TEMPLATE(HAVE_LIBCRYPTO_X509_STORE_CTX_GET0_UNTRUSTED, "Define to 1 if the X509_STORE_CTX_get0_untrusted() OpenSSL API function exists")
+  AH_TEMPLATE(HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL, "Define to 1 if the X509_VERIFY_PARAM_set_auth_level() OpenSSL API function exists")
   AH_TEMPLATE(HAVE_LIBCRYPTO_X509_UP_REF, "Define to 1 if the X509_up_ref() OpenSSL API function exists")
+  AH_TEMPLATE(HAVE_LIBCRYPTO_X509_CHAIN_UP_REF, "Define to 1 if the X509_chain_up_ref() OpenSSL API function exists")
   AH_TEMPLATE(HAVE_LIBCRYPTO_X509_CRL_UP_REF, "Define to 1 if the X509_CRL_up_ref() OpenSSL API function exists")
   AH_TEMPLATE(HAVE_LIBCRYPTO_DH_UP_REF, "Define to 1 if the DH_up_ref() OpenSSL API function exists")
   AH_TEMPLATE(HAVE_LIBCRYPTO_X509_GET0_SIGNATURE, "Define to 1 if the X509_get0_signature() OpenSSL API function exists")
+  AH_TEMPLATE(HAVE_SSL_GET0_PARAM, "Define to 1 of the SSL_get0_param() OpenSSL API function exists")
   SQUID_STATE_SAVE(check_openssl_libcrypto_api)
   LIBS="$LIBS $SSLLIB"
   AC_CHECK_LIB(crypto, OPENSSL_LH_strhash, AC_DEFINE(HAVE_LIBCRYPTO_OPENSSL_LH_STRHASH, 1))
@@ -87,10 +90,13 @@
   AC_CHECK_LIB(crypto, X509_STORE_CTX_get0_cert, AC_DEFINE(HAVE_LIBCRYPTO_X509_STORE_CTX_GET0_CERT, 1))
   AC_CHECK_LIB(crypto, X509_VERIFY_PARAM_get_depth, AC_DEFINE(HAVE_LIBCRYPTO_X509_VERIFY_PARAM_GET_DEPTH, 1))
   AC_CHECK_LIB(crypto, X509_STORE_CTX_get0_untrusted, AC_DEFINE(HAVE_LIBCRYPTO_X509_STORE_CTX_GET0_UNTRUSTED, 1))
+  AC_CHECK_LIB(crypto,  X509_VERIFY_PARAM_set_auth_level, AC_DEFINE(HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL))
   AC_CHECK_LIB(crypto, X509_up_ref, AC_DEFINE(HAVE_LIBCRYPTO_X509_UP_REF, 1))
+  AC_CHECK_LIB(crypto, X509_chain_up_ref, AC_DEFINE(HAVE_LIBCRYPTO_X509_CHAIN_UP_REF, 1))
   AC_CHECK_LIB(crypto, X509_CRL_up_ref, AC_DEFINE(HAVE_LIBCRYPTO_X509_CRL_UP_REF, 1))
   AC_CHECK_LIB(crypto, DH_up_ref, AC_DEFINE(HAVE_LIBCRYPTO_DH_UP_REF, 1))
   AC_CHECK_LIB(crypto, X509_get0_signature, AC_DEFINE(HAVE_LIBCRYPTO_X509_GET0_SIGNATURE, 1), AC_DEFINE(SQUID_CONST_X509_GET0_SIGNATURE_ARGS,))
+  AC_CHECK_LIB(crypto, SSL_get0_param, AC_DEFINE(HAVE_SSL_GET0_PARAM, 1))
   SQUID_STATE_ROLLBACK(check_openssl_libcrypto_api)
 ])
 
diff -u -r -N squid-5.0.5/acinclude/os-deps.m4 squid-5.0.6/acinclude/os-deps.m4
--- squid-5.0.5/acinclude/os-deps.m4	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/acinclude/os-deps.m4	2021-05-10 21:02:34.000000000 +1200
@@ -792,6 +792,7 @@
   AC_CACHE_CHECK([for operational CPU clock access], 
                  squid_cv_cpu_profiler_works,
     AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+#include <ctime>
 #if defined(__GNUC__) && ( defined(__i386) || defined(__i386__) )
 // okay
 #elif defined(__GNUC__) && ( defined(__x86_64) || defined(__x86_64__) )
@@ -800,6 +801,8 @@
 // okay
 #elif defined(_M_IX86) && defined(_MSC_VER) /* x86 platform on Microsoft C Compiler ONLY */
 // okay
+#elif defined(HAVE_CLOCK_GETTIME_NSEC_NP) && defined(CLOCK_MONOTONIC_RAW)
+// okay
 #else
 #error This CPU is unsupported. No profiling available here.
 #endif
diff -u -r -N squid-5.0.5/ChangeLog squid-5.0.6/ChangeLog
--- squid-5.0.5/ChangeLog	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/ChangeLog	2021-05-10 21:02:34.000000000 +1200
@@ -1,3 +1,18 @@
+Changes in squid-5.0.6 (10 May 2021):
+
+	- Bug 5057: Generated response lacks status code
+	- TLS: Handling missing issuer certificates for TLSv1.3
+	- TLS: Detail certificate validation errors during TLS handshake
+	- TLS: Detail client closures of CONNECT tunnels during TLS handshake
+	- TLS: %ssl::<negotiated_version and %ssl::>negotiated_version for TLS/1.3
+	- HTTP: Allow 1xx and 204 responses with Transfer-Encoding headers
+	- Maintenance: Start following Inclusive Naming Initiative advice
+	- Maintenance: Sort source file lists in Makefiles
+	- Maintenance: Support plugin-style scripts for source format enforcement
+	- Cleanup: Deduplicating IPC strand messages
+	- ... and some compile and debugging fixes
+	- ... and all fixes from 4.15
+
 Changes in squid-5.0.5 (02 Feb 2021):
 
 	- HTTP: Do not send Connection:keep-alive/close in HTTP Upgrade requests
@@ -90,6 +105,22 @@
 	- ... and much code cleanup and polishing
 	- ... and all fixes from 4.10
 
+Changes in squid-4.15 (10 May 2021):
+
+	- Bug 5112: Excessively loud chunked reply parsing error reporting
+	- Bug 5106: Broken cache manager URL parsing
+	- Bug 5104: Memory leak in RFC 2169 response parsing
+	- Bug 3556: "FD ... is not an open socket" for accept() problems
+	- Profiling: CPU timing implemented for MAC non-x86
+	- Fix HttpHeaderStats definition to include hoErrorDetail
+	- Fix Squid-to-client write_timeout triggers client_lifetime timeout
+	- Limit HeaderLookupTable_t::lookup() to BadHdr and specific IDs
+	- Handle more Range requests
+	- Handle more partial responses
+	- Stop processing a response if the Store entry is gone
+	- ... and some portability fixes
+	- ... and some documentation updates
+
 Changes in squid-4.14 (02 Feb 2021):
 
 	- Regression Fix: support for non-lowercase Transfer-Encoding value
diff -u -r -N squid-5.0.5/compat/Makefile.am squid-5.0.6/compat/Makefile.am
--- squid-5.0.5/compat/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/compat/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -16,25 +16,25 @@
 
 noinst_LTLIBRARIES = libcompatsquid.la
 libcompatsquid_la_SOURCES = \
+	GnuRegex.c \
+	GnuRegex.h \
 	assert.cc \
 	assert.h \
 	cmsg.h \
 	compat.cc \
 	compat.h \
 	compat_shared.h \
-	cpu.h \
 	cppunit.h \
+	cpu.h \
 	debug.cc \
 	debug.h \
-	eui64_aton.h \
 	eui64_aton.c \
+	eui64_aton.h \
 	fdsetsize.h \
 	getaddrinfo.cc \
 	getaddrinfo.h \
 	getnameinfo.cc \
 	getnameinfo.h \
-	GnuRegex.c \
-	GnuRegex.h \
 	inet_ntop.cc \
 	inet_ntop.h \
 	inet_pton.cc \
@@ -42,19 +42,37 @@
 	initgroups.h \
 	memrchr.cc \
 	memrchr.h \
+	mswindows.cc \
 	openssl.h \
+	os/aix.h \
+	os/android.h \
+	os/dragonfly.h \
+	os/freebsd.h \
+	os/hpux.h \
+	os/linux.h \
+	os/macosx.h \
+	os/mswindows.h \
+	os/netbsd.h \
+	os/next.h \
+	os/openbsd.h \
+	os/opensolaris_10_netdb.h \
+	os/os2.h \
+	os/qnx.h \
+	os/sgi.h \
+	os/solaris.h \
+	os/sunos.h \
 	osdetect.h \
 	psignal.h \
 	shm.cc \
 	shm.h \
-	statvfs.h \
 	statvfs.cc \
+	statvfs.h \
 	stdio.h \
 	stdvarargs.h \
+	strnrchr.c \
+	strnrchr.h \
 	strnstr.cc \
 	strtoll.h \
-	strnrchr.h \
-	strnrchr.c \
 	tempnam.h \
 	types.h \
 	valgrind.h \
@@ -66,35 +84,16 @@
 	xstring.cc \
 	xstring.h \
 	xstrto.cc \
-	xstrto.h \
-	\
-	os/aix.h \
-	os/android.h \
-	os/dragonfly.h \
-	os/freebsd.h \
-	os/hpux.h \
-	os/linux.h \
-	os/macosx.h \
-	os/mswindows.h \
-	mswindows.cc \
-	os/netbsd.h \
-	os/next.h \
-	os/openbsd.h \
-	os/opensolaris_10_netdb.h \
-	os/os2.h \
-	os/qnx.h \
-	os/sgi.h \
-	os/solaris.h \
-	os/sunos.h
+	xstrto.h
 
 libcompatsquid_la_LIBADD= $(LTLIBOBJS)
 
 check_PROGRAMS += testPreCompiler
 TESTS += testPreCompiler
 
-testPreCompiler_SOURCES= \
-	testPreCompiler.h \
-	testPreCompiler.cc
+testPreCompiler_SOURCES = \
+	testPreCompiler.cc \
+	testPreCompiler.h
 testPreCompiler_LDADD= $(LIBCPPUNIT_LIBS)
 testPreCompiler_LDFLAGS=
 
diff -u -r -N squid-5.0.5/compat/Makefile.in squid-5.0.6/compat/Makefile.in
--- squid-5.0.5/compat/Makefile.in	2021-02-08 13:40:44.000000000 +1300
+++ squid-5.0.6/compat/Makefile.in	2021-05-10 22:57:52.000000000 +1200
@@ -169,11 +169,11 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libcompatsquid_la_DEPENDENCIES = $(LTLIBOBJS)
-am_libcompatsquid_la_OBJECTS = assert.lo compat.lo debug.lo \
-	eui64_aton.lo getaddrinfo.lo getnameinfo.lo GnuRegex.lo \
-	inet_ntop.lo inet_pton.lo memrchr.lo shm.lo statvfs.lo \
-	strnstr.lo strnrchr.lo xalloc.lo xstrerror.lo xstring.lo \
-	xstrto.lo mswindows.lo
+am_libcompatsquid_la_OBJECTS = GnuRegex.lo assert.lo compat.lo \
+	debug.lo eui64_aton.lo getaddrinfo.lo getnameinfo.lo \
+	inet_ntop.lo inet_pton.lo memrchr.lo mswindows.lo shm.lo \
+	statvfs.lo strnrchr.lo strnstr.lo xalloc.lo xstrerror.lo \
+	xstring.lo xstrto.lo
 libcompatsquid_la_OBJECTS = $(am_libcompatsquid_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -760,25 +760,25 @@
 # Port Specific Configurations
 noinst_LTLIBRARIES = libcompatsquid.la
 libcompatsquid_la_SOURCES = \
+	GnuRegex.c \
+	GnuRegex.h \
 	assert.cc \
 	assert.h \
 	cmsg.h \
 	compat.cc \
 	compat.h \
 	compat_shared.h \
-	cpu.h \
 	cppunit.h \
+	cpu.h \
 	debug.cc \
 	debug.h \
-	eui64_aton.h \
 	eui64_aton.c \
+	eui64_aton.h \
 	fdsetsize.h \
 	getaddrinfo.cc \
 	getaddrinfo.h \
 	getnameinfo.cc \
 	getnameinfo.h \
-	GnuRegex.c \
-	GnuRegex.h \
 	inet_ntop.cc \
 	inet_ntop.h \
 	inet_pton.cc \
@@ -786,19 +786,37 @@
 	initgroups.h \
 	memrchr.cc \
 	memrchr.h \
+	mswindows.cc \
 	openssl.h \
+	os/aix.h \
+	os/android.h \
+	os/dragonfly.h \
+	os/freebsd.h \
+	os/hpux.h \
+	os/linux.h \
+	os/macosx.h \
+	os/mswindows.h \
+	os/netbsd.h \
+	os/next.h \
+	os/openbsd.h \
+	os/opensolaris_10_netdb.h \
+	os/os2.h \
+	os/qnx.h \
+	os/sgi.h \
+	os/solaris.h \
+	os/sunos.h \
 	osdetect.h \
 	psignal.h \
 	shm.cc \
 	shm.h \
-	statvfs.h \
 	statvfs.cc \
+	statvfs.h \
 	stdio.h \
 	stdvarargs.h \
+	strnrchr.c \
+	strnrchr.h \
 	strnstr.cc \
 	strtoll.h \
-	strnrchr.h \
-	strnrchr.c \
 	tempnam.h \
 	types.h \
 	valgrind.h \
@@ -810,31 +828,12 @@
 	xstring.cc \
 	xstring.h \
 	xstrto.cc \
-	xstrto.h \
-	\
-	os/aix.h \
-	os/android.h \
-	os/dragonfly.h \
-	os/freebsd.h \
-	os/hpux.h \
-	os/linux.h \
-	os/macosx.h \
-	os/mswindows.h \
-	mswindows.cc \
-	os/netbsd.h \
-	os/next.h \
-	os/openbsd.h \
-	os/opensolaris_10_netdb.h \
-	os/os2.h \
-	os/qnx.h \
-	os/sgi.h \
-	os/solaris.h \
-	os/sunos.h
+	xstrto.h
 
 libcompatsquid_la_LIBADD = $(LTLIBOBJS)
 testPreCompiler_SOURCES = \
-	testPreCompiler.h \
-	testPreCompiler.cc
+	testPreCompiler.cc \
+	testPreCompiler.h
 
 testPreCompiler_LDADD = $(LIBCPPUNIT_LIBS)
 testPreCompiler_LDFLAGS = 
diff -u -r -N squid-5.0.5/compat/openssl.h squid-5.0.6/compat/openssl.h
--- squid-5.0.5/compat/openssl.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/compat/openssl.h	2021-05-10 21:02:34.000000000 +1200
@@ -222,6 +222,29 @@
 #endif /* CRYPTO_LOCK_X509 */
 #endif /* X509_up_ref */
 
+#if !HAVE_LIBCRYPTO_X509_CHAIN_UP_REF
+    inline STACK_OF(X509) *
+    X509_chain_up_ref(STACK_OF(X509) *chain)
+    {
+        if (STACK_OF(X509) *newChain = sk_X509_dup(chain)) {
+            bool error = false;
+            int i;
+            for (i = 0; !error && i < sk_X509_num(newChain); i++) {
+                X509 *cert = sk_X509_value(newChain, i);
+                if (!X509_up_ref(cert))
+                    error = true;
+            }
+            if (!error)
+                return newChain;
+
+            for (int k = 0; k < i; k++)
+                X509_free(sk_X509_value(newChain, k));
+            sk_X509_free(newChain);
+        }
+        return nullptr;
+    }
+#endif /* X509_chain_up_ref */
+
 #if !HAVE_LIBCRYPTO_X509_VERIFY_PARAM_GET_DEPTH
     inline int
     X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param)
@@ -230,6 +253,13 @@
     }
 #endif
 
+#if !HAVE_SSL_GET0_PARAM
+    inline X509_VERIFY_PARAM *
+    SSL_get0_param(SSL *ssl)
+    {
+        return ssl->param;
+    }
+#endif
 } /* extern "C" */
 
 inline void
diff -u -r -N squid-5.0.5/configure squid-5.0.6/configure
--- squid-5.0.5/configure	2021-02-08 13:40:49.000000000 +1300
+++ squid-5.0.6/configure	2021-05-10 22:57:57.000000000 +1200
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.ac Revision.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Squid Web Proxy 5.0.5.
+# Generated by GNU Autoconf 2.69 for Squid Web Proxy 5.0.6.
 #
 # Report bugs to <http://bugs.squid-cache.org/>.
 #
@@ -595,8 +595,8 @@
 # Identity of this package.
 PACKAGE_NAME='Squid Web Proxy'
 PACKAGE_TARNAME='squid'
-PACKAGE_VERSION='5.0.5'
-PACKAGE_STRING='Squid Web Proxy 5.0.5'
+PACKAGE_VERSION='5.0.6'
+PACKAGE_STRING='Squid Web Proxy 5.0.6'
 PACKAGE_BUGREPORT='http://bugs.squid-cache.org/'
 PACKAGE_URL=''
 
@@ -1662,7 +1662,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 5.0.5 to adapt to many kinds of systems.
+\`configure' configures Squid Web Proxy 5.0.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1733,7 +1733,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Squid Web Proxy 5.0.5:";;
+     short | recursive ) echo "Configuration of Squid Web Proxy 5.0.6:";;
    esac
   cat <<\_ACEOF
 
@@ -2166,7 +2166,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Squid Web Proxy configure 5.0.5
+Squid Web Proxy configure 5.0.6
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3270,7 +3270,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 5.0.5, which was
+It was created by Squid Web Proxy $as_me 5.0.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4132,7 +4132,7 @@
 
 # Define the identity of the package.
  PACKAGE='squid'
- VERSION='5.0.5'
+ VERSION='5.0.6'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -24254,6 +24254,9 @@
 
 
 
+
+
+
 # save state, key is check_openssl_libcrypto_api
 check_openssl_libcrypto_api_CFLAGS="${CFLAGS}"
 check_openssl_libcrypto_api_CXXFLAGS="${CXXFLAGS}"
@@ -24680,6 +24683,47 @@
 
 fi
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set_auth_level in -lcrypto" >&5
+$as_echo_n "checking for X509_VERIFY_PARAM_set_auth_level in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_X509_VERIFY_PARAM_set_auth_level+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char X509_VERIFY_PARAM_set_auth_level ();
+int
+main ()
+{
+return X509_VERIFY_PARAM_set_auth_level ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_crypto_X509_VERIFY_PARAM_set_auth_level=yes
+else
+  ac_cv_lib_crypto_X509_VERIFY_PARAM_set_auth_level=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_X509_VERIFY_PARAM_set_auth_level" >&5
+$as_echo "$ac_cv_lib_crypto_X509_VERIFY_PARAM_set_auth_level" >&6; }
+if test "x$ac_cv_lib_crypto_X509_VERIFY_PARAM_set_auth_level" = xyes; then :
+  $as_echo "#define HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL 1" >>confdefs.h
+
+fi
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_up_ref in -lcrypto" >&5
 $as_echo_n "checking for X509_up_ref in -lcrypto... " >&6; }
 if ${ac_cv_lib_crypto_X509_up_ref+:} false; then :
@@ -24721,6 +24765,47 @@
 
 fi
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_chain_up_ref in -lcrypto" >&5
+$as_echo_n "checking for X509_chain_up_ref in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_X509_chain_up_ref+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char X509_chain_up_ref ();
+int
+main ()
+{
+return X509_chain_up_ref ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_crypto_X509_chain_up_ref=yes
+else
+  ac_cv_lib_crypto_X509_chain_up_ref=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_X509_chain_up_ref" >&5
+$as_echo "$ac_cv_lib_crypto_X509_chain_up_ref" >&6; }
+if test "x$ac_cv_lib_crypto_X509_chain_up_ref" = xyes; then :
+  $as_echo "#define HAVE_LIBCRYPTO_X509_CHAIN_UP_REF 1" >>confdefs.h
+
+fi
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_CRL_up_ref in -lcrypto" >&5
 $as_echo_n "checking for X509_CRL_up_ref in -lcrypto... " >&6; }
 if ${ac_cv_lib_crypto_X509_CRL_up_ref+:} false; then :
@@ -24847,6 +24932,47 @@
 
 fi
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_get0_param in -lcrypto" >&5
+$as_echo_n "checking for SSL_get0_param in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_SSL_get0_param+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_get0_param ();
+int
+main ()
+{
+return SSL_get0_param ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_crypto_SSL_get0_param=yes
+else
+  ac_cv_lib_crypto_SSL_get0_param=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SSL_get0_param" >&5
+$as_echo "$ac_cv_lib_crypto_SSL_get0_param" >&6; }
+if test "x$ac_cv_lib_crypto_SSL_get0_param" = xyes; then :
+  $as_echo "#define HAVE_SSL_GET0_PARAM 1" >>confdefs.h
+
+fi
+
 
 # rollback state, key is check_openssl_libcrypto_api
 CFLAGS="${check_openssl_libcrypto_api_CFLAGS}"
@@ -37760,6 +37886,17 @@
 
 # Default OFF. This is a debug feature. Only check and enable if forced ON.
 if test "x$enable_cpu_profiling" = "xyes"; then
+  for ac_func in clock_gettime_nsec_np
+do :
+  ac_fn_cxx_check_func "$LINENO" "clock_gettime_nsec_np" "ac_cv_func_clock_gettime_nsec_np"
+if test "x$ac_cv_func_clock_gettime_nsec_np" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOCK_GETTIME_NSEC_NP 1
+_ACEOF
+
+fi
+done
+
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for operational CPU clock access" >&5
 $as_echo_n "checking for operational CPU clock access... " >&6; }
@@ -37769,6 +37906,7 @@
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#include <ctime>
 #if defined(__GNUC__) && ( defined(__i386) || defined(__i386__) )
 // okay
 #elif defined(__GNUC__) && ( defined(__x86_64) || defined(__x86_64__) )
@@ -37777,6 +37915,8 @@
 // okay
 #elif defined(_M_IX86) && defined(_MSC_VER) /* x86 platform on Microsoft C Compiler ONLY */
 // okay
+#elif defined(HAVE_CLOCK_GETTIME_NSEC_NP) && defined(CLOCK_MONOTONIC_RAW)
+// okay
 #else
 #error This CPU is unsupported. No profiling available here.
 #endif
@@ -44207,7 +44347,7 @@
 
 rm -f core
 
-ac_config_files="$ac_config_files Makefile compat/Makefile contrib/Makefile doc/Makefile doc/manuals/Makefile doc/release-notes/Makefile errors/Makefile icons/Makefile lib/Makefile lib/libTrie/Makefile lib/libTrie/test/Makefile lib/ntlmauth/Makefile lib/profiler/Makefile lib/rfcnb/Makefile lib/smblib/Makefile lib/snmplib/Makefile scripts/Makefile src/Makefile src/acl/Makefile src/acl/external/Makefile src/acl/external/AD_group/Makefile src/acl/external/delayer/Makefile src/acl/external/eDirectory_userip/Makefile src/acl/external/file_userip/Makefile src/acl/external/kerberos_ldap_group/Makefile src/acl/external/kerberos_sid_group/Makefile src/acl/external/LDAP_group/Makefile src/acl/external/LM_group/Makefile src/acl/external/session/Makefile src/acl/external/SQL_session/Makefile src/acl/external/unix_group/Makefile src/acl/external/wbinfo_group/Makefile src/acl/external/time_quota/Makefile src/adaptation/Makefile src/adaptation/icap/Makefile src/adaptation/ecap/Makefile src/anyp/Makefile src/auth/Makefile src/auth/basic/Makefile src/auth/basic/DB/Makefile src/auth/basic/fake/Makefile src/auth/basic/getpwnam/Makefile src/auth/basic/LDAP/Makefile src/auth/basic/NCSA/Makefile src/auth/basic/NIS/Makefile src/auth/basic/PAM/Makefile src/auth/basic/POP3/Makefile src/auth/basic/RADIUS/Makefile src/auth/basic/SASL/Makefile src/auth/basic/SMB/Makefile src/auth/basic/SMB_LM/Makefile src/auth/basic/SSPI/Makefile src/auth/digest/Makefile src/auth/digest/eDirectory/Makefile src/auth/digest/file/Makefile src/auth/digest/LDAP/Makefile src/auth/negotiate/Makefile src/auth/negotiate/kerberos/Makefile src/auth/negotiate/SSPI/Makefile src/auth/negotiate/wrapper/Makefile src/auth/ntlm/Makefile src/auth/ntlm/fake/Makefile src/auth/ntlm/SMB_LM/Makefile src/auth/ntlm/SSPI/Makefile src/base/Makefile src/clients/Makefile src/comm/Makefile src/dns/Makefile src/DiskIO/Makefile src/DiskIO/AIO/Makefile src/DiskIO/Blocking/Makefile src/DiskIO/DiskDaemon/Makefile src/DiskIO/DiskThreads/Makefile src/DiskIO/IpcIo/Makefile src/DiskIO/Mmapped/Makefile src/esi/Makefile src/eui/Makefile src/format/Makefile src/fs/Makefile src/ftp/Makefile src/helper/Makefile src/http/Makefile src/http/one/Makefile src/http/url_rewriters/Makefile src/http/url_rewriters/fake/Makefile src/http/url_rewriters/LFS/Makefile src/icmp/Makefile src/ident/Makefile src/ip/Makefile src/ipc/Makefile src/log/Makefile src/log/DB/Makefile src/log/file/Makefile src/mem/Makefile src/mgr/Makefile src/parser/Makefile src/proxyp/Makefile src/repl/Makefile src/sbuf/Makefile src/security/Makefile src/security/cert_generators/Makefile src/security/cert_generators/file/Makefile src/security/cert_validators/Makefile src/security/cert_validators/fake/Makefile src/servers/Makefile src/snmp/Makefile src/ssl/Makefile src/store/Makefile src/store/id_rewriters/Makefile src/store/id_rewriters/file/Makefile test-suite/Makefile tools/Makefile tools/apparmor/Makefile tools/helper-mux/Makefile tools/purge/Makefile tools/squidclient/Makefile tools/systemd/Makefile tools/sysvinit/Makefile"
+ac_config_files="$ac_config_files Makefile compat/Makefile contrib/Makefile doc/Makefile doc/manuals/Makefile doc/release-notes/Makefile errors/Makefile icons/Makefile lib/Makefile lib/libTrie/Makefile lib/libTrie/test/Makefile lib/ntlmauth/Makefile lib/profiler/Makefile lib/rfcnb/Makefile lib/smblib/Makefile lib/snmplib/Makefile scripts/Makefile src/Makefile src/acl/Makefile src/acl/external/Makefile src/acl/external/AD_group/Makefile src/acl/external/delayer/Makefile src/acl/external/eDirectory_userip/Makefile src/acl/external/file_userip/Makefile src/acl/external/kerberos_ldap_group/Makefile src/acl/external/kerberos_sid_group/Makefile src/acl/external/LDAP_group/Makefile src/acl/external/LM_group/Makefile src/acl/external/session/Makefile src/acl/external/SQL_session/Makefile src/acl/external/unix_group/Makefile src/acl/external/wbinfo_group/Makefile src/acl/external/time_quota/Makefile src/adaptation/Makefile src/adaptation/icap/Makefile src/adaptation/ecap/Makefile src/anyp/Makefile src/auth/Makefile src/auth/basic/Makefile src/auth/basic/DB/Makefile src/auth/basic/fake/Makefile src/auth/basic/getpwnam/Makefile src/auth/basic/LDAP/Makefile src/auth/basic/NCSA/Makefile src/auth/basic/NIS/Makefile src/auth/basic/PAM/Makefile src/auth/basic/POP3/Makefile src/auth/basic/RADIUS/Makefile src/auth/basic/SASL/Makefile src/auth/basic/SMB/Makefile src/auth/basic/SMB_LM/Makefile src/auth/basic/SSPI/Makefile src/auth/digest/Makefile src/auth/digest/eDirectory/Makefile src/auth/digest/file/Makefile src/auth/digest/LDAP/Makefile src/auth/negotiate/Makefile src/auth/negotiate/kerberos/Makefile src/auth/negotiate/SSPI/Makefile src/auth/negotiate/wrapper/Makefile src/auth/ntlm/Makefile src/auth/ntlm/fake/Makefile src/auth/ntlm/SMB_LM/Makefile src/auth/ntlm/SSPI/Makefile src/base/Makefile src/clients/Makefile src/comm/Makefile src/dns/Makefile src/DiskIO/Makefile src/DiskIO/AIO/Makefile src/DiskIO/Blocking/Makefile src/DiskIO/DiskDaemon/Makefile src/DiskIO/DiskThreads/Makefile src/DiskIO/IpcIo/Makefile src/DiskIO/Mmapped/Makefile src/error/Makefile src/esi/Makefile src/eui/Makefile src/format/Makefile src/fs/Makefile src/ftp/Makefile src/helper/Makefile src/http/Makefile src/http/one/Makefile src/http/url_rewriters/Makefile src/http/url_rewriters/fake/Makefile src/http/url_rewriters/LFS/Makefile src/icmp/Makefile src/ident/Makefile src/ip/Makefile src/ipc/Makefile src/log/Makefile src/log/DB/Makefile src/log/file/Makefile src/mem/Makefile src/mgr/Makefile src/parser/Makefile src/proxyp/Makefile src/repl/Makefile src/sbuf/Makefile src/security/Makefile src/security/cert_generators/Makefile src/security/cert_generators/file/Makefile src/security/cert_validators/Makefile src/security/cert_validators/fake/Makefile src/servers/Makefile src/snmp/Makefile src/ssl/Makefile src/store/Makefile src/store/id_rewriters/Makefile src/store/id_rewriters/file/Makefile test-suite/Makefile tools/Makefile tools/apparmor/Makefile tools/helper-mux/Makefile tools/purge/Makefile tools/squidclient/Makefile tools/systemd/Makefile tools/sysvinit/Makefile"
 
 
 # must configure libltdl subdir unconditionally for "make distcheck" to work
@@ -44953,7 +45093,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 5.0.5, which was
+This file was extended by Squid Web Proxy $as_me 5.0.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -45019,7 +45159,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Squid Web Proxy config.status 5.0.5
+Squid Web Proxy config.status 5.0.6
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -45607,6 +45747,7 @@
     "src/DiskIO/DiskThreads/Makefile") CONFIG_FILES="$CONFIG_FILES src/DiskIO/DiskThreads/Makefile" ;;
     "src/DiskIO/IpcIo/Makefile") CONFIG_FILES="$CONFIG_FILES src/DiskIO/IpcIo/Makefile" ;;
     "src/DiskIO/Mmapped/Makefile") CONFIG_FILES="$CONFIG_FILES src/DiskIO/Mmapped/Makefile" ;;
+    "src/error/Makefile") CONFIG_FILES="$CONFIG_FILES src/error/Makefile" ;;
     "src/esi/Makefile") CONFIG_FILES="$CONFIG_FILES src/esi/Makefile" ;;
     "src/eui/Makefile") CONFIG_FILES="$CONFIG_FILES src/eui/Makefile" ;;
     "src/format/Makefile") CONFIG_FILES="$CONFIG_FILES src/format/Makefile" ;;
diff -u -r -N squid-5.0.5/configure.ac squid-5.0.6/configure.ac
--- squid-5.0.5/configure.ac	2021-02-08 13:40:49.000000000 +1300
+++ squid-5.0.6/configure.ac	2021-05-10 22:57:57.000000000 +1200
@@ -5,7 +5,7 @@
 ## Please see the COPYING and CONTRIBUTORS files for details.
 ##
 
-AC_INIT([Squid Web Proxy],[5.0.5],[http://bugs.squid-cache.org/],[squid])
+AC_INIT([Squid Web Proxy],[5.0.6],[http://bugs.squid-cache.org/],[squid])
 AC_PREREQ(2.61)
 AC_CONFIG_HEADERS([include/autoconf.h])
 AC_CONFIG_AUX_DIR(cfgaux)
@@ -2779,6 +2779,7 @@
 ])
 # Default OFF. This is a debug feature. Only check and enable if forced ON.
 if test "x$enable_cpu_profiling" = "xyes"; then
+  AC_CHECK_FUNCS(clock_gettime_nsec_np)
   SQUID_CHECK_FUNCTIONAL_CPU_PROFILER
   if test "x$squid_cv_cpu_profiler_works" = "xno"; then
     AC_MSG_ERROR([CPU profiling will not be functional in this build.])
@@ -3900,6 +3901,7 @@
 	src/DiskIO/DiskThreads/Makefile
 	src/DiskIO/IpcIo/Makefile
 	src/DiskIO/Mmapped/Makefile
+	src/error/Makefile
 	src/esi/Makefile
 	src/eui/Makefile
 	src/format/Makefile
diff -u -r -N squid-5.0.5/CONTRIBUTORS squid-5.0.6/CONTRIBUTORS
--- squid-5.0.5/CONTRIBUTORS	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/CONTRIBUTORS	2021-05-10 21:02:34.000000000 +1200
@@ -105,6 +105,7 @@
     Dan Searle <dan@censornet.com>
     Dan Searle <dan.searle@censornet.com>
     Dave Dykstra <dwd@fnal.gov>
+    David Carlier <devnexen@gmail.com>
     David Hill <david.hill@ubisoft.com>
     David Isaacs <david.isaacs@sbhs.nsw.edu.au>
     David J N Begley
@@ -250,6 +251,7 @@
     Jorge Ivan Burgos Aguilar <jorgeivanburgosaguilar@gmail.com>
     Jose Luis Godoy <joseluis.godoy@correo.aeat.es>
     Jose-Marcio Martins da Cruz <Jose-Marcio.Martins@mines-paristech.fr>
+    Joshua Rogers <megamansec@gmail.com>
     Joshua Root <jmr@macports.org>
     Joshua Root <josh+squid@root.id.au>
     JPP <jpp1@frws.com>
diff -u -r -N squid-5.0.5/doc/debug-sections.txt squid-5.0.6/doc/debug-sections.txt
--- squid-5.0.5/doc/debug-sections.txt	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/doc/debug-sections.txt	2021-05-10 21:02:34.000000000 +1200
@@ -18,6 +18,7 @@
 section 03    Configuration File Parsing
 section 03    Configuration Settings
 section 04    Error Generation
+section 04    Error Management
 section 05    Comm
 section 05    Disk I/O pipe manager
 section 05    Listener Socket Handler
@@ -139,6 +140,7 @@
 section 82    External ACL
 section 83    SSL accelerator support
 section 83    SSL-Bump Server/Peer negotiation
+section 83    TLS I/O
 section 83    TLS Server/Peer negotiation
 section 83    TLS session management
 section 84    Helper process maintenance
diff -u -r -N squid-5.0.5/doc/release-notes/release-5.html squid-5.0.6/doc/release-notes/release-5.html
--- squid-5.0.5/doc/release-notes/release-5.html	2021-02-08 13:46:34.000000000 +1300
+++ squid-5.0.6/doc/release-notes/release-5.html	2021-05-10 23:02:18.000000000 +1200
@@ -3,10 +3,10 @@
 <HEAD>
  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.82">
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <TITLE>Squid 5.0.5 release notes</TITLE>
+ <TITLE>Squid 5.0.6 release notes</TITLE>
 </HEAD>
 <BODY>
-<H1>Squid 5.0.5 release notes</H1>
+<H1>Squid 5.0.6 release notes</H1>
 
 <H2>Squid Developers</H2>
 <HR>
@@ -61,7 +61,7 @@
 <HR>
 <H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>
 
-<P>The Squid Team are pleased to announce the release of Squid-5.0.5 for testing.</P>
+<P>The Squid Team are pleased to announce the release of Squid-5.0.6 for testing.</P>
 <P>This new release is available for download from 
 <A HREF="http://www.squid-cache.org/Versions/v5/">http://www.squid-cache.org/Versions/v5/</A> or the
 <A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>
@@ -341,8 +341,12 @@
 protocol version 2 TLV values.</P>
 <P>New <EM>master_xaction</EM> code to display Squids internal
 transaction ID.</P>
-<P>New <EM>CF</EM> value for <EM>%Ss</EM> code to indicate the response
+<P>New <EM>CF</EM> value for <EM>Ss</EM> code to indicate the response
 was handled by Collapsed Forwarding.</P>
+<P>New <EM>TLS/1.3</EM> value for <EM>ssl::&gt;negotiated_version</EM>
+code to indicate the request was received from client using TLS/1.3.</P>
+<P>New <EM>TLS/1.3</EM> value for <EM>ssl::&lt;negotiated_version</EM>
+code to indicate the response was received from server using TLS/1.3.</P>
 <P>Codes <EM>rm</EM>, <EM>&lt;rm</EM> and <EM>&gt;rm</EM> display "-"
 instead of the made-up method NONE.</P>
 
diff -u -r -N squid-5.0.5/errors/af/error-details.txt squid-5.0.6/errors/af/error-details.txt
--- squid-5.0.5/errors/af/error-details.txt	2021-02-08 13:41:31.000000000 +1300
+++ squid-5.0.6/errors/af/error-details.txt	2021-05-10 22:58:39.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/ar/error-details.txt squid-5.0.6/errors/ar/error-details.txt
--- squid-5.0.5/errors/ar/error-details.txt	2021-02-08 13:41:36.000000000 +1300
+++ squid-5.0.6/errors/ar/error-details.txt	2021-05-10 22:58:44.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/az/error-details.txt squid-5.0.6/errors/az/error-details.txt
--- squid-5.0.5/errors/az/error-details.txt	2021-02-08 13:41:41.000000000 +1300
+++ squid-5.0.6/errors/az/error-details.txt	2021-05-10 22:58:49.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/bg/error-details.txt squid-5.0.6/errors/bg/error-details.txt
--- squid-5.0.5/errors/bg/error-details.txt	2021-02-08 13:41:46.000000000 +1300
+++ squid-5.0.6/errors/bg/error-details.txt	2021-05-10 22:58:54.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/ca/error-details.txt squid-5.0.6/errors/ca/error-details.txt
--- squid-5.0.5/errors/ca/error-details.txt	2021-02-08 13:41:51.000000000 +1300
+++ squid-5.0.6/errors/ca/error-details.txt	2021-05-10 22:58:58.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/cs/error-details.txt squid-5.0.6/errors/cs/error-details.txt
--- squid-5.0.5/errors/cs/error-details.txt	2021-02-08 13:41:56.000000000 +1300
+++ squid-5.0.6/errors/cs/error-details.txt	2021-05-10 22:59:03.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/da/error-details.txt squid-5.0.6/errors/da/error-details.txt
--- squid-5.0.5/errors/da/error-details.txt	2021-02-08 13:42:01.000000000 +1300
+++ squid-5.0.6/errors/da/error-details.txt	2021-05-10 22:59:08.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/de/error-details.txt squid-5.0.6/errors/de/error-details.txt
--- squid-5.0.5/errors/de/error-details.txt	2021-02-08 13:42:06.000000000 +1300
+++ squid-5.0.6/errors/de/error-details.txt	2021-05-10 22:59:13.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/el/error-details.txt squid-5.0.6/errors/el/error-details.txt
--- squid-5.0.5/errors/el/error-details.txt	2021-02-08 13:42:12.000000000 +1300
+++ squid-5.0.6/errors/el/error-details.txt	2021-05-10 22:59:18.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/en/error-details.txt squid-5.0.6/errors/en/error-details.txt
--- squid-5.0.5/errors/en/error-details.txt	2021-02-08 13:42:19.000000000 +1300
+++ squid-5.0.6/errors/en/error-details.txt	2021-05-10 22:59:23.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/es/error-details.txt squid-5.0.6/errors/es/error-details.txt
--- squid-5.0.5/errors/es/error-details.txt	2021-02-08 13:42:34.000000000 +1300
+++ squid-5.0.6/errors/es/error-details.txt	2021-05-10 22:59:32.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/es-mx/error-details.txt squid-5.0.6/errors/es-mx/error-details.txt
--- squid-5.0.5/errors/es-mx/error-details.txt	2021-02-08 13:42:27.000000000 +1300
+++ squid-5.0.6/errors/es-mx/error-details.txt	2021-05-10 22:59:28.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/et/error-details.txt squid-5.0.6/errors/et/error-details.txt
--- squid-5.0.5/errors/et/error-details.txt	2021-02-08 13:42:41.000000000 +1300
+++ squid-5.0.6/errors/et/error-details.txt	2021-05-10 22:59:37.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/fa/error-details.txt squid-5.0.6/errors/fa/error-details.txt
--- squid-5.0.5/errors/fa/error-details.txt	2021-02-08 13:42:48.000000000 +1300
+++ squid-5.0.6/errors/fa/error-details.txt	2021-05-10 22:59:42.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/fi/error-details.txt squid-5.0.6/errors/fi/error-details.txt
--- squid-5.0.5/errors/fi/error-details.txt	2021-02-08 13:42:55.000000000 +1300
+++ squid-5.0.6/errors/fi/error-details.txt	2021-05-10 22:59:47.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/fr/error-details.txt squid-5.0.6/errors/fr/error-details.txt
--- squid-5.0.5/errors/fr/error-details.txt	2021-02-08 13:43:02.000000000 +1300
+++ squid-5.0.6/errors/fr/error-details.txt	2021-05-10 22:59:52.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/he/error-details.txt squid-5.0.6/errors/he/error-details.txt
--- squid-5.0.5/errors/he/error-details.txt	2021-02-08 13:43:09.000000000 +1300
+++ squid-5.0.6/errors/he/error-details.txt	2021-05-10 22:59:57.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/hu/error-details.txt squid-5.0.6/errors/hu/error-details.txt
--- squid-5.0.5/errors/hu/error-details.txt	2021-02-08 13:43:16.000000000 +1300
+++ squid-5.0.6/errors/hu/error-details.txt	2021-05-10 23:00:01.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/hy/error-details.txt squid-5.0.6/errors/hy/error-details.txt
--- squid-5.0.5/errors/hy/error-details.txt	2021-02-08 13:43:23.000000000 +1300
+++ squid-5.0.6/errors/hy/error-details.txt	2021-05-10 23:00:06.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/id/error-details.txt squid-5.0.6/errors/id/error-details.txt
--- squid-5.0.5/errors/id/error-details.txt	2021-02-08 13:43:30.000000000 +1300
+++ squid-5.0.6/errors/id/error-details.txt	2021-05-10 23:00:11.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/it/error-details.txt squid-5.0.6/errors/it/error-details.txt
--- squid-5.0.5/errors/it/error-details.txt	2021-02-08 13:43:37.000000000 +1300
+++ squid-5.0.6/errors/it/error-details.txt	2021-05-10 23:00:16.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/ja/error-details.txt squid-5.0.6/errors/ja/error-details.txt
--- squid-5.0.5/errors/ja/error-details.txt	2021-02-08 13:43:44.000000000 +1300
+++ squid-5.0.6/errors/ja/error-details.txt	2021-05-10 23:00:21.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/ka/error-details.txt squid-5.0.6/errors/ka/error-details.txt
--- squid-5.0.5/errors/ka/error-details.txt	2021-02-08 13:43:51.000000000 +1300
+++ squid-5.0.6/errors/ka/error-details.txt	2021-05-10 23:00:26.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/ko/error-details.txt squid-5.0.6/errors/ko/error-details.txt
--- squid-5.0.5/errors/ko/error-details.txt	2021-02-08 13:43:58.000000000 +1300
+++ squid-5.0.6/errors/ko/error-details.txt	2021-05-10 23:00:31.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/lt/error-details.txt squid-5.0.6/errors/lt/error-details.txt
--- squid-5.0.5/errors/lt/error-details.txt	2021-02-08 13:44:05.000000000 +1300
+++ squid-5.0.6/errors/lt/error-details.txt	2021-05-10 23:00:35.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/lv/error-details.txt squid-5.0.6/errors/lv/error-details.txt
--- squid-5.0.5/errors/lv/error-details.txt	2021-02-08 13:44:12.000000000 +1300
+++ squid-5.0.6/errors/lv/error-details.txt	2021-05-10 23:00:40.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/ms/error-details.txt squid-5.0.6/errors/ms/error-details.txt
--- squid-5.0.5/errors/ms/error-details.txt	2021-02-08 13:44:19.000000000 +1300
+++ squid-5.0.6/errors/ms/error-details.txt	2021-05-10 23:00:45.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/nl/error-details.txt squid-5.0.6/errors/nl/error-details.txt
--- squid-5.0.5/errors/nl/error-details.txt	2021-02-08 13:44:26.000000000 +1300
+++ squid-5.0.6/errors/nl/error-details.txt	2021-05-10 23:00:50.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/oc/error-details.txt squid-5.0.6/errors/oc/error-details.txt
--- squid-5.0.5/errors/oc/error-details.txt	2021-02-08 13:44:33.000000000 +1300
+++ squid-5.0.6/errors/oc/error-details.txt	2021-05-10 23:00:55.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/pl/error-details.txt squid-5.0.6/errors/pl/error-details.txt
--- squid-5.0.5/errors/pl/error-details.txt	2021-02-08 13:44:40.000000000 +1300
+++ squid-5.0.6/errors/pl/error-details.txt	2021-05-10 23:01:00.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/pt/error-details.txt squid-5.0.6/errors/pt/error-details.txt
--- squid-5.0.5/errors/pt/error-details.txt	2021-02-08 13:44:54.000000000 +1300
+++ squid-5.0.6/errors/pt/error-details.txt	2021-05-10 23:01:09.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/pt-br/error-details.txt squid-5.0.6/errors/pt-br/error-details.txt
--- squid-5.0.5/errors/pt-br/error-details.txt	2021-02-08 13:44:47.000000000 +1300
+++ squid-5.0.6/errors/pt-br/error-details.txt	2021-05-10 23:01:04.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/ro/error-details.txt squid-5.0.6/errors/ro/error-details.txt
--- squid-5.0.5/errors/ro/error-details.txt	2021-02-08 13:45:01.000000000 +1300
+++ squid-5.0.6/errors/ro/error-details.txt	2021-05-10 23:01:14.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/ru/error-details.txt squid-5.0.6/errors/ru/error-details.txt
--- squid-5.0.5/errors/ru/error-details.txt	2021-02-08 13:45:08.000000000 +1300
+++ squid-5.0.6/errors/ru/error-details.txt	2021-05-10 23:01:19.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/sk/error-details.txt squid-5.0.6/errors/sk/error-details.txt
--- squid-5.0.5/errors/sk/error-details.txt	2021-02-08 13:45:15.000000000 +1300
+++ squid-5.0.6/errors/sk/error-details.txt	2021-05-10 23:01:24.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/sl/error-details.txt squid-5.0.6/errors/sl/error-details.txt
--- squid-5.0.5/errors/sl/error-details.txt	2021-02-08 13:45:22.000000000 +1300
+++ squid-5.0.6/errors/sl/error-details.txt	2021-05-10 23:01:29.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/sr-cyrl/error-details.txt squid-5.0.6/errors/sr-cyrl/error-details.txt
--- squid-5.0.5/errors/sr-cyrl/error-details.txt	2021-02-08 13:45:29.000000000 +1300
+++ squid-5.0.6/errors/sr-cyrl/error-details.txt	2021-05-10 23:01:34.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/sr-latn/error-details.txt squid-5.0.6/errors/sr-latn/error-details.txt
--- squid-5.0.5/errors/sr-latn/error-details.txt	2021-02-08 13:45:36.000000000 +1300
+++ squid-5.0.6/errors/sr-latn/error-details.txt	2021-05-10 23:01:38.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/sv/error-details.txt squid-5.0.6/errors/sv/error-details.txt
--- squid-5.0.5/errors/sv/error-details.txt	2021-02-08 13:45:44.000000000 +1300
+++ squid-5.0.6/errors/sv/error-details.txt	2021-05-10 23:01:43.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/templates/error-details.txt squid-5.0.6/errors/templates/error-details.txt
--- squid-5.0.5/errors/templates/error-details.txt	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/errors/templates/error-details.txt	2021-05-10 21:02:34.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/th/error-details.txt squid-5.0.6/errors/th/error-details.txt
--- squid-5.0.5/errors/th/error-details.txt	2021-02-08 13:45:51.000000000 +1300
+++ squid-5.0.6/errors/th/error-details.txt	2021-05-10 23:01:48.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/tr/error-details.txt squid-5.0.6/errors/tr/error-details.txt
--- squid-5.0.5/errors/tr/error-details.txt	2021-02-08 13:45:58.000000000 +1300
+++ squid-5.0.6/errors/tr/error-details.txt	2021-05-10 23:01:53.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/TRANSLATORS squid-5.0.6/errors/TRANSLATORS
--- squid-5.0.5/errors/TRANSLATORS	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/errors/TRANSLATORS	2021-05-10 21:02:34.000000000 +1200
@@ -110,7 +110,7 @@
 Russian			Andrew L. Davydov <davydov@okbmei.msk.su>
 Serbian			Zoran Verovski <zoran@hemofarm.co.yu>
 Serbian			Dragutin Cirkovic <auto@gromnet.net>
-Simplify Chinese	Wang DaQing <wdq@bigfoot.com>
+Simplified Chinese	Wang DaQing <wdq@bigfoot.com>
 Slovak			Peter Hanecak <hany@megaloman.sk>
 Spanish			Javier Puche <javier.puche@rediris.es>
 Spanish			Roberto Lumbreras <rover-squid@lander.es>
diff -u -r -N squid-5.0.5/errors/uk/error-details.txt squid-5.0.6/errors/uk/error-details.txt
--- squid-5.0.5/errors/uk/error-details.txt	2021-02-08 13:46:05.000000000 +1300
+++ squid-5.0.6/errors/uk/error-details.txt	2021-05-10 23:01:58.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/uz/error-details.txt squid-5.0.6/errors/uz/error-details.txt
--- squid-5.0.5/errors/uz/error-details.txt	2021-02-08 13:46:12.000000000 +1300
+++ squid-5.0.6/errors/uz/error-details.txt	2021-05-10 23:02:03.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/vi/error-details.txt squid-5.0.6/errors/vi/error-details.txt
--- squid-5.0.5/errors/vi/error-details.txt	2021-02-08 13:46:19.000000000 +1300
+++ squid-5.0.6/errors/vi/error-details.txt	2021-05-10 23:02:08.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/zh-hans/error-details.txt squid-5.0.6/errors/zh-hans/error-details.txt
--- squid-5.0.5/errors/zh-hans/error-details.txt	2021-02-08 13:46:26.000000000 +1300
+++ squid-5.0.6/errors/zh-hans/error-details.txt	2021-05-10 23:02:12.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/errors/zh-hant/error-details.txt squid-5.0.6/errors/zh-hant/error-details.txt
--- squid-5.0.5/errors/zh-hant/error-details.txt	2021-02-08 13:46:33.000000000 +1300
+++ squid-5.0.6/errors/zh-hant/error-details.txt	2021-05-10 23:02:17.000000000 +1200
@@ -2,9 +2,13 @@
 detail: "%ssl_error_descr: %ssl_subject"
 descr: "Cert validation infinite loop detected"
 
-name: SQUID_ERR_SSL_HANDSHAKE
+name: SQUID_TLS_ERR_ACCEPT
 detail: "%ssl_error_descr: %ssl_lib_error"
-descr: "Handshake with SSL server failed"
+descr: "Failed to accept a secure connection"
+
+name: SQUID_TLS_ERR_CONNECT
+detail: "%ssl_error_descr: %ssl_lib_error"
+descr: "Failed to establish a secure connection"
 
 name: SQUID_X509_V_ERR_DOMAIN_MISMATCH
 detail: "%ssl_error_descr: %ssl_subject"
diff -u -r -N squid-5.0.5/include/autoconf.h.in squid-5.0.6/include/autoconf.h.in
--- squid-5.0.5/include/autoconf.h.in	2021-02-08 13:40:43.000000000 +1300
+++ squid-5.0.6/include/autoconf.h.in	2021-05-10 22:57:50.000000000 +1200
@@ -118,6 +118,9 @@
 /* Define to 1 if you have the <byteswap.h> header file. */
 #undef HAVE_BYTESWAP_H
 
+/* Define to 1 if you have the `clock_gettime_nsec_np' function. */
+#undef HAVE_CLOCK_GETTIME_NSEC_NP
+
 /* Define to 1 if you have the `closedir' function. */
 #undef HAVE_CLOSEDIR
 
@@ -519,6 +522,9 @@
 /* "Define to 1 if the OPENSSL_LH_strhash() OpenSSL API function exists" */
 #undef HAVE_LIBCRYPTO_OPENSSL_LH_STRHASH
 
+/* "Define to 1 if the X509_chain_up_ref() OpenSSL API function exists" */
+#undef HAVE_LIBCRYPTO_X509_CHAIN_UP_REF
+
 /* "Define to 1 if the X509_CRL_up_ref() OpenSSL API function exists" */
 #undef HAVE_LIBCRYPTO_X509_CRL_UP_REF
 
@@ -981,6 +987,9 @@
 /* SSL_CTX_get0_certificate is available */
 #undef HAVE_SSL_CTX_GET0_CERTIFICATE
 
+/* "Define to 1 of the SSL_get0_param() OpenSSL API function exists" */
+#undef HAVE_SSL_GET0_PARAM
+
 /* Define if sockaddr_storage has field ss_len */
 #undef HAVE_SS_LEN_IN_SS
 
@@ -1250,6 +1259,10 @@
 /* Define to 1 if you have the <ws2tcpip.h> header file. */
 #undef HAVE_WS2TCPIP_H
 
+/* "Define to 1 if the X509_VERIFY_PARAM_set_auth_level() OpenSSL API function
+   exists" */
+#undef HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL
+
 /* Define to 1 if you have the `__htole16' function. */
 #undef HAVE___HTOLE16
 
diff -u -r -N squid-5.0.5/include/version.h squid-5.0.6/include/version.h
--- squid-5.0.5/include/version.h	2021-02-08 13:40:49.000000000 +1300
+++ squid-5.0.6/include/version.h	2021-05-10 22:57:57.000000000 +1200
@@ -7,7 +7,7 @@
  */
 
 #ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1612744840
+#define SQUID_RELEASE_TIME 1620644267
 #endif
 
 /*
diff -u -r -N squid-5.0.5/lib/libTrie/Makefile.am squid-5.0.6/lib/libTrie/Makefile.am
--- squid-5.0.5/lib/libTrie/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/lib/libTrie/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -15,8 +15,9 @@
 
 noinst_HEADERS = Trie.h TrieNode.h TrieCharTransform.h
 
-libTrie_a_SOURCES = Trie.cc \
+libTrie_a_SOURCES = \
+	Trie.cc \
 	Trie.h \
+	TrieCharTransform.h \
 	TrieNode.cc \
-	TrieNode.h \
-	TrieCharTransform.h
+	TrieNode.h
diff -u -r -N squid-5.0.5/lib/libTrie/Makefile.in squid-5.0.6/lib/libTrie/Makefile.in
--- squid-5.0.5/lib/libTrie/Makefile.in	2021-02-08 13:40:44.000000000 +1300
+++ squid-5.0.6/lib/libTrie/Makefile.in	2021-05-10 22:57:52.000000000 +1200
@@ -779,11 +779,12 @@
 SUBDIRS = . test
 noinst_LIBRARIES = libTrie.a
 noinst_HEADERS = Trie.h TrieNode.h TrieCharTransform.h
-libTrie_a_SOURCES = Trie.cc \
+libTrie_a_SOURCES = \
+	Trie.cc \
 	Trie.h \
+	TrieCharTransform.h \
 	TrieNode.cc \
-	TrieNode.h \
-	TrieCharTransform.h
+	TrieNode.h
 
 all: all-recursive
 
diff -u -r -N squid-5.0.5/lib/Makefile.am squid-5.0.6/lib/Makefile.am
--- squid-5.0.5/lib/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/lib/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -66,13 +66,13 @@
 	hash.cc
 
 libmiscutil_la_SOURCES = \
+	$(SNPRINTFSOURCE) \
+	Splay.cc \
 	getfullhostname.c \
 	heap.c \
 	iso3307.c \
 	radix.c \
 	rfc1123.c \
-	$(SNPRINTFSOURCE) \
-	Splay.cc \
 	stub_memaccount.c \
 	util.c \
 	xusleep.c
@@ -81,9 +81,9 @@
 
 check_PROGRAMS += tests/testRFC1738
 
-tests_testRFC1738_SOURCES= \
-	tests/testRFC1738.h \
-	tests/testRFC1738.cc
+tests_testRFC1738_SOURCES = \
+	tests/testRFC1738.cc \
+	tests/testRFC1738.h
 
 tests_testRFC1738_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/lib/Makefile.in squid-5.0.6/lib/Makefile.in
--- squid-5.0.5/lib/Makefile.in	2021-02-08 13:40:44.000000000 +1300
+++ squid-5.0.6/lib/Makefile.in	2021-05-10 22:57:52.000000000 +1200
@@ -189,8 +189,8 @@
 	rfc1738.lo rfc2617.lo
 libmiscencoding_la_OBJECTS = $(am_libmiscencoding_la_OBJECTS)
 libmiscutil_la_LIBADD =
-am_libmiscutil_la_OBJECTS = getfullhostname.lo heap.lo iso3307.lo \
-	radix.lo rfc1123.lo Splay.lo stub_memaccount.lo util.lo \
+am_libmiscutil_la_OBJECTS = Splay.lo getfullhostname.lo heap.lo \
+	iso3307.lo radix.lo rfc1123.lo stub_memaccount.lo util.lo \
 	xusleep.lo
 libmiscutil_la_OBJECTS = $(am_libmiscutil_la_OBJECTS)
 libsspwin32_la_LIBADD =
@@ -850,20 +850,20 @@
 	hash.cc
 
 libmiscutil_la_SOURCES = \
+	$(SNPRINTFSOURCE) \
+	Splay.cc \
 	getfullhostname.c \
 	heap.c \
 	iso3307.c \
 	radix.c \
 	rfc1123.c \
-	$(SNPRINTFSOURCE) \
-	Splay.cc \
 	stub_memaccount.c \
 	util.c \
 	xusleep.c
 
 tests_testRFC1738_SOURCES = \
-	tests/testRFC1738.h \
-	tests/testRFC1738.cc
+	tests/testRFC1738.cc \
+	tests/testRFC1738.h
 
 tests_testRFC1738_LDADD = \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/lib/profiler/get_tick.h squid-5.0.6/lib/profiler/get_tick.h
--- squid-5.0.5/lib/profiler/get_tick.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/lib/profiler/get_tick.h	2021-05-10 21:02:34.000000000 +1200
@@ -10,6 +10,7 @@
 #define _PROFILER_GET_TICK_H_
 
 #if USE_XPROF_STATS
+#include <ctime>
 
 /*
  * Ensure that any changes here are synchronised with SQUID_CHECK_FUNCTIONAL_CPU_PROFILER
@@ -67,6 +68,14 @@
     return regs;
 }
 
+#elif defined(HAVE_CLOCK_GETTIME_NSEC_NP) && defined(CLOCK_MONOTONIC_RAW)
+
+static inline hrtime_t
+get_tick()
+{
+    return clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW);
+}
+
 #else
 /* This CPU is unsupported. Short-circuit, no profiling here */
 // #error for configure tests to prevent library construction
diff -u -r -N squid-5.0.5/lib/rfcnb/Makefile.am squid-5.0.6/lib/rfcnb/Makefile.am
--- squid-5.0.5/lib/rfcnb/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/lib/rfcnb/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -13,14 +13,13 @@
 
 librfcnb_la_SOURCES = \
 	byteorder.h \
-	rfcnb.h \
 	rfcnb-common.h \
 	rfcnb-error.h \
-	rfcnb-priv.h \
-	rfcnb-util.h \
-	rfcnb-io.h \
 	rfcnb-io.c \
+	rfcnb-io.h \
+	rfcnb-priv.h \
 	rfcnb-util.c \
 	rfcnb-util.h \
+	rfcnb.h \
 	session.c \
 	std-includes.h
diff -u -r -N squid-5.0.5/lib/rfcnb/Makefile.in squid-5.0.6/lib/rfcnb/Makefile.in
--- squid-5.0.5/lib/rfcnb/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/lib/rfcnb/Makefile.in	2021-05-10 22:57:52.000000000 +1200
@@ -709,15 +709,14 @@
 noinst_LTLIBRARIES = librfcnb.la
 librfcnb_la_SOURCES = \
 	byteorder.h \
-	rfcnb.h \
 	rfcnb-common.h \
 	rfcnb-error.h \
-	rfcnb-priv.h \
-	rfcnb-util.h \
-	rfcnb-io.h \
 	rfcnb-io.c \
+	rfcnb-io.h \
+	rfcnb-priv.h \
 	rfcnb-util.c \
 	rfcnb-util.h \
+	rfcnb.h \
 	session.c \
 	std-includes.h
 
diff -u -r -N squid-5.0.5/lib/smblib/Makefile.am squid-5.0.6/lib/smblib/Makefile.am
--- squid-5.0.5/lib/smblib/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/lib/smblib/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -14,13 +14,13 @@
 libsmblib_la_SOURCES = \
 	md4.c \
 	md4.h \
-	smblib.c \
-	smblib.h \
+	smbdes.c \
+	smbdes.h \
+	smbencrypt.c \
+	smbencrypt.h \
 	smblib-common.h \
 	smblib-priv.h \
 	smblib-util.c \
-	smbencrypt.c \
-	smbencrypt.h \
-	smbdes.c \
-	smbdes.h \
+	smblib.c \
+	smblib.h \
 	std-defines.h
diff -u -r -N squid-5.0.5/lib/smblib/Makefile.in squid-5.0.6/lib/smblib/Makefile.in
--- squid-5.0.5/lib/smblib/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/lib/smblib/Makefile.in	2021-05-10 22:57:52.000000000 +1200
@@ -165,8 +165,8 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libsmblib_la_LIBADD =
-am_libsmblib_la_OBJECTS = md4.lo smblib.lo smblib-util.lo \
-	smbencrypt.lo smbdes.lo
+am_libsmblib_la_OBJECTS = md4.lo smbdes.lo smbencrypt.lo \
+	smblib-util.lo smblib.lo
 libsmblib_la_OBJECTS = $(am_libsmblib_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -712,15 +712,15 @@
 libsmblib_la_SOURCES = \
 	md4.c \
 	md4.h \
-	smblib.c \
-	smblib.h \
+	smbdes.c \
+	smbdes.h \
+	smbencrypt.c \
+	smbencrypt.h \
 	smblib-common.h \
 	smblib-priv.h \
 	smblib-util.c \
-	smbencrypt.c \
-	smbencrypt.h \
-	smbdes.c \
-	smbdes.h \
+	smblib.c \
+	smblib.h \
 	std-defines.h
 
 all: all-am
diff -u -r -N squid-5.0.5/lib/snmplib/Makefile.am squid-5.0.6/lib/snmplib/Makefile.am
--- squid-5.0.5/lib/snmplib/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/lib/snmplib/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -17,11 +17,18 @@
 	-I$(top_srcdir)/include
 
 noinst_LTLIBRARIES = libsnmplib.la
-libsnmplib_la_SOURCES  = asn1.c parse.c snmp_vars.c \
-	coexistance.c snmp_api.c snmp_error.c  \
-	mib.c snmp_api_error.c   \
+libsnmplib_la_SOURCES = \
+	asn1.c \
+	coexistance.c \
+	mib.c \
+	parse.c \
+	snmp_api.c \
+	snmp_api_error.c \
+	snmp_error.c \
 	snmp_msg.c \
-	snmp_pdu.c  snmplib_debug.c
+	snmp_pdu.c \
+	snmp_vars.c \
+	snmplib_debug.c
 
 VERSION		= 3.4
 DEFS		= -DSQUID_SNMP=1
diff -u -r -N squid-5.0.5/lib/snmplib/Makefile.in squid-5.0.6/lib/snmplib/Makefile.in
--- squid-5.0.5/lib/snmplib/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/lib/snmplib/Makefile.in	2021-05-10 22:57:52.000000000 +1200
@@ -162,9 +162,9 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libsnmplib_la_LIBADD =
-am_libsnmplib_la_OBJECTS = asn1.lo parse.lo snmp_vars.lo \
-	coexistance.lo snmp_api.lo snmp_error.lo mib.lo \
-	snmp_api_error.lo snmp_msg.lo snmp_pdu.lo snmplib_debug.lo
+am_libsnmplib_la_OBJECTS = asn1.lo coexistance.lo mib.lo parse.lo \
+	snmp_api.lo snmp_api_error.lo snmp_error.lo snmp_msg.lo \
+	snmp_pdu.lo snmp_vars.lo snmplib_debug.lo
 libsnmplib_la_OBJECTS = $(am_libsnmplib_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -479,11 +479,18 @@
 	-I$(top_srcdir)/include
 
 noinst_LTLIBRARIES = libsnmplib.la
-libsnmplib_la_SOURCES = asn1.c parse.c snmp_vars.c \
-	coexistance.c snmp_api.c snmp_error.c  \
-	mib.c snmp_api_error.c   \
+libsnmplib_la_SOURCES = \
+	asn1.c \
+	coexistance.c \
+	mib.c \
+	parse.c \
+	snmp_api.c \
+	snmp_api_error.c \
+	snmp_error.c \
 	snmp_msg.c \
-	snmp_pdu.c  snmplib_debug.c
+	snmp_pdu.c \
+	snmp_vars.c \
+	snmplib_debug.c
 
 all: all-am
 
diff -u -r -N squid-5.0.5/RELEASENOTES.html squid-5.0.6/RELEASENOTES.html
--- squid-5.0.5/RELEASENOTES.html	2021-02-08 13:46:34.000000000 +1300
+++ squid-5.0.6/RELEASENOTES.html	2021-05-10 23:02:18.000000000 +1200
@@ -3,10 +3,10 @@
 <HEAD>
  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.82">
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <TITLE>Squid 5.0.5 release notes</TITLE>
+ <TITLE>Squid 5.0.6 release notes</TITLE>
 </HEAD>
 <BODY>
-<H1>Squid 5.0.5 release notes</H1>
+<H1>Squid 5.0.6 release notes</H1>
 
 <H2>Squid Developers</H2>
 <HR>
@@ -61,7 +61,7 @@
 <HR>
 <H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>
 
-<P>The Squid Team are pleased to announce the release of Squid-5.0.5 for testing.</P>
+<P>The Squid Team are pleased to announce the release of Squid-5.0.6 for testing.</P>
 <P>This new release is available for download from 
 <A HREF="http://www.squid-cache.org/Versions/v5/">http://www.squid-cache.org/Versions/v5/</A> or the
 <A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>
@@ -341,8 +341,12 @@
 protocol version 2 TLV values.</P>
 <P>New <EM>master_xaction</EM> code to display Squids internal
 transaction ID.</P>
-<P>New <EM>CF</EM> value for <EM>%Ss</EM> code to indicate the response
+<P>New <EM>CF</EM> value for <EM>Ss</EM> code to indicate the response
 was handled by Collapsed Forwarding.</P>
+<P>New <EM>TLS/1.3</EM> value for <EM>ssl::&gt;negotiated_version</EM>
+code to indicate the request was received from client using TLS/1.3.</P>
+<P>New <EM>TLS/1.3</EM> value for <EM>ssl::&lt;negotiated_version</EM>
+code to indicate the response was received from server using TLS/1.3.</P>
 <P>Codes <EM>rm</EM>, <EM>&lt;rm</EM> and <EM>&gt;rm</EM> display "-"
 instead of the made-up method NONE.</P>
 
diff -u -r -N squid-5.0.5/scripts/calc-must-ids.pl squid-5.0.6/scripts/calc-must-ids.pl
--- squid-5.0.5/scripts/calc-must-ids.pl	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/scripts/calc-must-ids.pl	2021-05-10 21:02:34.000000000 +1200
@@ -66,7 +66,7 @@
         $line =~ s@/[*].*?[*]/@@; # strip simple single-line /* comments */
 
         my($id);
-        if ($line =~ /\bMust2?\s*\(/ || # Must(...) and Must2(...)
+        if ($line =~ /\bMust\s*\(/ || # Must(...)
             $line =~ /\bTexcHere\s*\(/ || # TexcHere(...)
             $line =~ /\bHere\s*\(\s*\)/) { # Here()
             $line =~ s/^\s*//;
diff -u -r -N squid-5.0.5/scripts/calc-must-ids.sh squid-5.0.6/scripts/calc-must-ids.sh
--- squid-5.0.5/scripts/calc-must-ids.sh	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/scripts/calc-must-ids.sh	2021-05-10 21:02:34.000000000 +1200
@@ -23,7 +23,7 @@
         xargs `dirname $0`/calc-must-ids.pl
 else
     find . -name "*.cc" -o -name "*.h" -o -name "*.cci" | \
-        xargs `dirname $0`/calc-must-ids.pl | grep ": $1 "
+        xargs `dirname $0`/calc-must-ids.pl | grep -Ei ": (0x)?$1 "
 fi
 
 
diff -u -r -N squid-5.0.5/SPONSORS squid-5.0.6/SPONSORS
--- squid-5.0.5/SPONSORS	2021-02-08 13:40:49.000000000 +1300
+++ squid-5.0.6/SPONSORS	2021-05-10 22:57:57.000000000 +1200
@@ -8,7 +8,7 @@
 	developers and users.
 
 
-DigialOcean - https://www.digitalocean.com/
+DigitalOcean - https://www.digitalocean.com/
 
 	DigitalOcean has donated droplets from their cloud infrastructure
 	to host most of Squid Project's continuous integration farm.
diff -u -r -N squid-5.0.5/src/AccessLogEntry.cc squid-5.0.6/src/AccessLogEntry.cc
--- squid-5.0.5/src/AccessLogEntry.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/AccessLogEntry.cc	2021-05-10 21:02:34.000000000 +1200
@@ -175,6 +175,27 @@
     return nullptr;
 }
 
+const Error *
+AccessLogEntry::error() const
+{
+    // the order ensures that the first-imported error is returned
+    if (error_) // updateError() was called before importing the request
+        return &error_;
+    if (request && request->error) // request was imported before updateError()
+        return &request->error;
+    return nullptr; // we imported no errors and no requests
+}
+
+void
+AccessLogEntry::updateError(const Error &err)
+{
+    // the order ensures that error() returns the first-imported error
+    if (request)
+        request->error.update(err);
+    else
+        error_.update(err);
+}
+
 void
 AccessLogEntry::packReplyHeaders(MemBuf &mb) const
 {
diff -u -r -N squid-5.0.5/src/AccessLogEntry.h squid-5.0.6/src/AccessLogEntry.h
--- squid-5.0.5/src/AccessLogEntry.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/AccessLogEntry.h	2021-05-10 21:02:34.000000000 +1200
@@ -12,6 +12,7 @@
 #include "anyp/PortCfg.h"
 #include "base/CodeContext.h"
 #include "comm/Connection.h"
+#include "error/Error.h"
 #include "HierarchyLogEntry.h"
 #include "http/ProtocolVersion.h"
 #include "http/RequestMethod.h"
@@ -255,7 +256,17 @@
             virginUrlForMissingRequest_ = vu;
     }
 
+    /// \returns stored transaction error information (or nil)
+    const Error *error() const;
+
+    /// sets (or updates the already stored) transaction error as needed
+    void updateError(const Error &);
+
 private:
+    /// transaction problem
+    /// if set, overrides (and should eventually replace) request->error
+    Error error_;
+
     /// Client URI (or equivalent) for effectiveVirginUrl() when HttpRequest is
     /// missing. This member is ignored unless the request member is nil.
     SBuf virginUrlForMissingRequest_;
diff -u -r -N squid-5.0.5/src/acl/AclDenyInfoList.h squid-5.0.6/src/acl/AclDenyInfoList.h
--- squid-5.0.5/src/acl/AclDenyInfoList.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/AclDenyInfoList.h	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 #define SQUID_ACLDENYINFOLIST_H_
 
 #include "acl/forward.h"
-#include "err_type.h"
+#include "error/forward.h"
 #include "errorpage.h"
 #include "mem/forward.h"
 #include "sbuf/forward.h"
diff -u -r -N squid-5.0.5/src/acl/Asn.cc squid-5.0.6/src/acl/Asn.cc
--- squid-5.0.5/src/acl/Asn.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/Asn.cc	2021-05-10 21:02:34.000000000 +1200
@@ -595,7 +595,7 @@
     const ipcache_addrs *ia = ipcache_gethostbyname(checklist->request->url.host(), IP_LOOKUP_IF_MISS);
 
     if (ia) {
-        for (const auto ip: ia->goodAndBad()) {
+        for (const auto &ip: ia->goodAndBad()) {
             if (data->match(ip))
                 return 1;
         }
diff -u -r -N squid-5.0.5/src/acl/DestinationIp.cc squid-5.0.6/src/acl/DestinationIp.cc
--- squid-5.0.5/src/acl/DestinationIp.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/DestinationIp.cc	2021-05-10 21:02:34.000000000 +1200
@@ -67,7 +67,7 @@
     if (ia) {
         /* Entry in cache found */
 
-        for (const auto ip: ia->goodAndBad()) {
+        for (const auto &ip: ia->goodAndBad()) {
             if (ACLIP::match(ip))
                 return 1;
         }
diff -u -r -N squid-5.0.5/src/acl/external/delayer/ext_delayer_acl.8 squid-5.0.6/src/acl/external/delayer/ext_delayer_acl.8
--- squid-5.0.5/src/acl/external/delayer/ext_delayer_acl.8	2021-02-08 13:46:37.000000000 +1300
+++ squid-5.0.6/src/acl/external/delayer/ext_delayer_acl.8	2021-05-10 23:02:22.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EXT_DELAYER_ACL 8"
-.TH EXT_DELAYER_ACL 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH EXT_DELAYER_ACL 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/acl/external/file_userip/Makefile.am squid-5.0.6/src/acl/external/file_userip/Makefile.am
--- squid-5.0.5/src/acl/external/file_userip/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/external/file_userip/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 libexec_PROGRAMS = ext_file_userip_acl
 man_MANS = ext_file_userip_acl.8
 
-ext_file_userip_acl_SOURCES= \
+ext_file_userip_acl_SOURCES = \
 	ext_file_userip_acl.cc
 ext_file_userip_acl_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/acl/external/kerberos_ldap_group/Makefile.am squid-5.0.6/src/acl/external/kerberos_ldap_group/Makefile.am
--- squid-5.0.5/src/acl/external/kerberos_ldap_group/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/external/kerberos_ldap_group/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -23,14 +23,14 @@
 	kerberos_ldap_group.cc \
 	support.h \
 	support_group.cc \
-	support_netbios.cc \
-	support_member.cc \
 	support_krb5.cc \
 	support_ldap.cc \
-	support_sasl.cc \
-	support_resolv.cc \
+	support_log.cc \
 	support_lserver.cc \
-	support_log.cc
+	support_member.cc \
+	support_netbios.cc \
+	support_resolv.cc \
+	support_sasl.cc
 
 ext_kerberos_ldap_group_acl_LDFLAGS =
 ext_kerberos_ldap_group_acl_LDADD = \
diff -u -r -N squid-5.0.5/src/acl/external/kerberos_ldap_group/Makefile.in squid-5.0.6/src/acl/external/kerberos_ldap_group/Makefile.in
--- squid-5.0.5/src/acl/external/kerberos_ldap_group/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/src/acl/external/kerberos_ldap_group/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -169,10 +169,10 @@
 PROGRAMS = $(libexec_PROGRAMS)
 am_ext_kerberos_ldap_group_acl_OBJECTS =  \
 	kerberos_ldap_group.$(OBJEXT) support_group.$(OBJEXT) \
-	support_netbios.$(OBJEXT) support_member.$(OBJEXT) \
 	support_krb5.$(OBJEXT) support_ldap.$(OBJEXT) \
-	support_sasl.$(OBJEXT) support_resolv.$(OBJEXT) \
-	support_lserver.$(OBJEXT) support_log.$(OBJEXT)
+	support_log.$(OBJEXT) support_lserver.$(OBJEXT) \
+	support_member.$(OBJEXT) support_netbios.$(OBJEXT) \
+	support_resolv.$(OBJEXT) support_sasl.$(OBJEXT)
 ext_kerberos_ldap_group_acl_OBJECTS =  \
 	$(am_ext_kerberos_ldap_group_acl_OBJECTS)
 @ENABLE_XPROF_STATS_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/lib/profiler/libprofiler.la
@@ -762,14 +762,14 @@
 	kerberos_ldap_group.cc \
 	support.h \
 	support_group.cc \
-	support_netbios.cc \
-	support_member.cc \
 	support_krb5.cc \
 	support_ldap.cc \
-	support_sasl.cc \
-	support_resolv.cc \
+	support_log.cc \
 	support_lserver.cc \
-	support_log.cc
+	support_member.cc \
+	support_netbios.cc \
+	support_resolv.cc \
+	support_sasl.cc
 
 ext_kerberos_ldap_group_acl_LDFLAGS = 
 ext_kerberos_ldap_group_acl_LDADD = \
diff -u -r -N squid-5.0.5/src/acl/external/kerberos_sid_group/ext_kerberos_sid_group_acl.8 squid-5.0.6/src/acl/external/kerberos_sid_group/ext_kerberos_sid_group_acl.8
--- squid-5.0.5/src/acl/external/kerberos_sid_group/ext_kerberos_sid_group_acl.8	2021-02-08 13:46:37.000000000 +1300
+++ squid-5.0.6/src/acl/external/kerberos_sid_group/ext_kerberos_sid_group_acl.8	2021-05-10 23:02:22.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EXT_KERBEROS_SID_GROUP_ACL 8"
-.TH EXT_KERBEROS_SID_GROUP_ACL 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH EXT_KERBEROS_SID_GROUP_ACL 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/acl/external/LDAP_group/Makefile.am squid-5.0.6/src/acl/external/LDAP_group/Makefile.am
--- squid-5.0.5/src/acl/external/LDAP_group/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/external/LDAP_group/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 libexec_PROGRAMS= ext_ldap_group_acl
 man_MANS= ext_ldap_group_acl.8
 
-ext_ldap_group_acl_SOURCES= \
+ext_ldap_group_acl_SOURCES = \
 	ext_ldap_group_acl.cc
 ext_ldap_group_acl_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/acl/external/LM_group/Makefile.am squid-5.0.6/src/acl/external/LM_group/Makefile.am
--- squid-5.0.5/src/acl/external/LM_group/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/external/LM_group/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 libexec_PROGRAMS= ext_lm_group_acl
 man_MANS= ext_lm_group_acl.8
 
-ext_lm_group_acl_SOURCES= ext_lm_group_acl.cc
+ext_lm_group_acl_SOURCES = ext_lm_group_acl.cc
 ext_lm_group_acl_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
 	$(COMPAT_LIB) \
diff -u -r -N squid-5.0.5/src/acl/external/session/Makefile.am squid-5.0.6/src/acl/external/session/Makefile.am
--- squid-5.0.5/src/acl/external/session/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/external/session/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 libexec_PROGRAMS= ext_session_acl
 man_MANS= ext_session_acl.8
 
-ext_session_acl_SOURCES= \
+ext_session_acl_SOURCES = \
 	ext_session_acl.cc
 ext_session_acl_LDADD = \
 	$(COMPAT_LIB) \
diff -u -r -N squid-5.0.5/src/acl/external/SQL_session/ext_sql_session_acl.8 squid-5.0.6/src/acl/external/SQL_session/ext_sql_session_acl.8
--- squid-5.0.5/src/acl/external/SQL_session/ext_sql_session_acl.8	2021-02-08 13:46:37.000000000 +1300
+++ squid-5.0.6/src/acl/external/SQL_session/ext_sql_session_acl.8	2021-05-10 23:02:22.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EXT_SQL_SESSION_ACL 8"
-.TH EXT_SQL_SESSION_ACL 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH EXT_SQL_SESSION_ACL 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/acl/external/time_quota/Makefile.am squid-5.0.6/src/acl/external/time_quota/Makefile.am
--- squid-5.0.5/src/acl/external/time_quota/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/external/time_quota/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -12,7 +12,7 @@
 
 DEFS += -DDEFAULT_QUOTA_DB=\"$(localstatedir)/ext_time_quota.db\"
 
-ext_time_quota_acl_SOURCES= \
+ext_time_quota_acl_SOURCES = \
 	ext_time_quota_acl.cc
 ext_time_quota_acl_LDADD = \
 	$(COMPAT_LIB) \
diff -u -r -N squid-5.0.5/src/acl/external/unix_group/Makefile.am squid-5.0.6/src/acl/external/unix_group/Makefile.am
--- squid-5.0.5/src/acl/external/unix_group/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/external/unix_group/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,7 @@
 man_MANS 			= ext_unix_group_acl.8
 EXTRA_DIST			= ext_unix_group_acl.8 required.m4
 
-ext_unix_group_acl_SOURCES= \
+ext_unix_group_acl_SOURCES = \
 	check_group.cc
 ext_unix_group_acl_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8 squid-5.0.6/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8
--- squid-5.0.5/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8	2021-02-08 13:46:37.000000000 +1300
+++ squid-5.0.6/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8	2021-05-10 23:02:22.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EXT_WBINFO_GROUP_ACL 8"
-.TH EXT_WBINFO_GROUP_ACL 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH EXT_WBINFO_GROUP_ACL 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/acl/FilledChecklist.h squid-5.0.6/src/acl/FilledChecklist.h
--- squid-5.0.5/src/acl/FilledChecklist.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/FilledChecklist.h	2021-05-10 21:02:34.000000000 +1200
@@ -13,7 +13,7 @@
 #include "acl/Checklist.h"
 #include "acl/forward.h"
 #include "base/CbcPointer.h"
-#include "err_type.h"
+#include "error/forward.h"
 #include "ip/Address.h"
 #if USE_AUTH
 #include "auth/UserRequest.h"
diff -u -r -N squid-5.0.5/src/acl/Gadgets.h squid-5.0.6/src/acl/Gadgets.h
--- squid-5.0.5/src/acl/Gadgets.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/Gadgets.h	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 #define SQUID_ACL_GADGETS_H
 
 #include "acl/forward.h"
-#include "err_type.h"
+#include "error/forward.h"
 
 #include <sstream>
 
diff -u -r -N squid-5.0.5/src/acl/Makefile.am squid-5.0.6/src/acl/Makefile.am
--- squid-5.0.5/src/acl/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -20,39 +20,32 @@
 	BoolOps.h \
 	Checklist.cc \
 	Checklist.h \
-	forward.h \
 	InnerNode.cc \
 	InnerNode.h \
-	Options.h \
 	Options.cc \
+	Options.h \
 	Tree.cc \
-	Tree.h
+	Tree.h \
+	forward.h
 
 ## Data-dependent Squid/transaction state used by specific ACLs.
 ## Does not refer to specific ACLs to avoid circular dependencies.
 libstate_la_SOURCES = \
+	Address.cc \
+	Address.h \
 	CharacterSetOption.h \
 	Data.h \
-	Strategy.h \
-	Strategised.cc \
-	Strategised.h \
 	FilledChecklist.cc \
 	FilledChecklist.h \
-	Address.h \
-	Address.cc
+	Strategised.cc \
+	Strategised.h \
+	Strategy.h
 
 ## data-specific ACLs
 libacls_la_SOURCES = \
-	IntRange.cc \
-	IntRange.h \
-	RegexData.cc \
-	RegexData.h \
-	StringData.cc \
-	StringData.h \
-	Time.cc \
-	Time.h \
-	TimeData.cc \
-	TimeData.h \
+	AclDenyInfoList.h \
+	AclSizeLimit.cc \
+	AclSizeLimit.h \
 	AllOf.cc \
 	AllOf.h \
 	AnnotateClient.cc \
@@ -69,10 +62,10 @@
 	AtStep.h \
 	AtStepData.cc \
 	AtStepData.h \
-	ConnectionsEncrypted.cc \
-	ConnectionsEncrypted.h \
 	ConnMark.cc \
 	ConnMark.h \
+	ConnectionsEncrypted.cc \
+	ConnectionsEncrypted.h \
 	DestinationAsn.h \
 	DestinationDomain.cc \
 	DestinationDomain.h \
@@ -82,14 +75,16 @@
 	DomainData.h \
 	ExtUser.cc \
 	ExtUser.h \
+	Gadgets.cc \
+	Gadgets.h \
 	HasComponent.cc \
 	HasComponent.h \
 	HasComponentData.cc \
 	HasComponentData.h \
-	HierCodeData.cc \
-	HierCodeData.h \
 	HierCode.cc \
 	HierCode.h \
+	HierCodeData.cc \
+	HierCodeData.h \
 	HttpHeaderData.cc \
 	HttpHeaderData.h \
 	HttpRepHeader.cc \
@@ -98,6 +93,8 @@
 	HttpReqHeader.h \
 	HttpStatus.cc \
 	HttpStatus.h \
+	IntRange.cc \
+	IntRange.h \
 	Ip.cc \
 	Ip.h \
 	LocalIp.cc \
@@ -107,23 +104,25 @@
 	MaxConnection.cc \
 	MaxConnection.h \
 	Method.cc \
+	Method.h \
 	MethodData.cc \
 	MethodData.h \
-	Method.h \
 	MyPortName.cc \
 	MyPortName.h \
-	Note.h \
 	Note.cc \
-	NoteData.h \
+	Note.h \
 	NoteData.cc \
+	NoteData.h \
 	PeerName.cc \
 	PeerName.h \
 	Protocol.cc \
+	Protocol.h \
 	ProtocolData.cc \
 	ProtocolData.h \
-	Protocol.h \
 	Random.cc \
 	Random.h \
+	RegexData.cc \
+	RegexData.h \
 	ReplyHeaderStrategy.h \
 	ReplyMimeType.h \
 	RequestHeaderStrategy.h \
@@ -133,12 +132,18 @@
 	SourceDomain.h \
 	SourceIp.cc \
 	SourceIp.h \
-	SquidError.h \
 	SquidError.cc \
+	SquidError.h \
 	SquidErrorData.cc \
 	SquidErrorData.h \
+	StringData.cc \
+	StringData.h \
 	Tag.cc \
 	Tag.h \
+	Time.cc \
+	Time.h \
+	TimeData.cc \
+	TimeData.h \
 	TransactionInitiator.cc \
 	TransactionInitiator.h \
 	Url.cc \
@@ -150,12 +155,7 @@
 	UrlPort.cc \
 	UrlPort.h \
 	UserData.cc \
-	UserData.h \
-	AclDenyInfoList.h \
-	Gadgets.cc \
-	Gadgets.h \
-	AclSizeLimit.cc \
-	AclSizeLimit.h
+	UserData.h
 
 ## Add conditional sources
 ## TODO: move these to their respective dirs when those dirs are created
diff -u -r -N squid-5.0.5/src/acl/Makefile.in squid-5.0.6/src/acl/Makefile.in
--- squid-5.0.5/src/acl/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/src/acl/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -167,39 +167,40 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libacls_la_LIBADD =
-am__libacls_la_SOURCES_DIST = IntRange.cc IntRange.h RegexData.cc \
-	RegexData.h StringData.cc StringData.h Time.cc Time.h \
-	TimeData.cc TimeData.h AllOf.cc AllOf.h AnnotateClient.cc \
+am__libacls_la_SOURCES_DIST = AclDenyInfoList.h AclSizeLimit.cc \
+	AclSizeLimit.h AllOf.cc AllOf.h AnnotateClient.cc \
 	AnnotateClient.h AnnotateTransaction.cc AnnotateTransaction.h \
 	AnnotationData.cc AnnotationData.h AnyOf.cc AnyOf.h Asn.cc \
 	Asn.h AtStep.cc AtStep.h AtStepData.cc AtStepData.h \
-	ConnectionsEncrypted.cc ConnectionsEncrypted.h ConnMark.cc \
-	ConnMark.h DestinationAsn.h DestinationDomain.cc \
+	ConnMark.cc ConnMark.h ConnectionsEncrypted.cc \
+	ConnectionsEncrypted.h DestinationAsn.h DestinationDomain.cc \
 	DestinationDomain.h DestinationIp.cc DestinationIp.h \
-	DomainData.cc DomainData.h ExtUser.cc ExtUser.h \
-	HasComponent.cc HasComponent.h HasComponentData.cc \
-	HasComponentData.h HierCodeData.cc HierCodeData.h HierCode.cc \
-	HierCode.h HttpHeaderData.cc HttpHeaderData.h HttpRepHeader.cc \
-	HttpRepHeader.h HttpReqHeader.cc HttpReqHeader.h HttpStatus.cc \
-	HttpStatus.h Ip.cc Ip.h LocalIp.cc LocalIp.h LocalPort.cc \
+	DomainData.cc DomainData.h ExtUser.cc ExtUser.h Gadgets.cc \
+	Gadgets.h HasComponent.cc HasComponent.h HasComponentData.cc \
+	HasComponentData.h HierCode.cc HierCode.h HierCodeData.cc \
+	HierCodeData.h HttpHeaderData.cc HttpHeaderData.h \
+	HttpRepHeader.cc HttpRepHeader.h HttpReqHeader.cc \
+	HttpReqHeader.h HttpStatus.cc HttpStatus.h IntRange.cc \
+	IntRange.h Ip.cc Ip.h LocalIp.cc LocalIp.h LocalPort.cc \
 	LocalPort.h MaxConnection.cc MaxConnection.h Method.cc \
-	MethodData.cc MethodData.h Method.h MyPortName.cc MyPortName.h \
-	Note.h Note.cc NoteData.h NoteData.cc PeerName.cc PeerName.h \
-	Protocol.cc ProtocolData.cc ProtocolData.h Protocol.h \
-	Random.cc Random.h ReplyHeaderStrategy.h ReplyMimeType.h \
-	RequestHeaderStrategy.h RequestMimeType.h SourceAsn.h \
-	SourceDomain.cc SourceDomain.h SourceIp.cc SourceIp.h \
-	SquidError.h SquidError.cc SquidErrorData.cc SquidErrorData.h \
-	Tag.cc Tag.h TransactionInitiator.cc TransactionInitiator.h \
-	Url.cc Url.h UrlLogin.cc UrlLogin.h UrlPath.cc UrlPath.h \
-	UrlPort.cc UrlPort.h UserData.cc UserData.h AclDenyInfoList.h \
-	Gadgets.cc Gadgets.h AclSizeLimit.cc AclSizeLimit.h \
-	CertificateData.cc CertificateData.h Certificate.cc \
-	Certificate.h ServerCertificate.cc ServerCertificate.h \
-	ServerName.cc ServerName.h SslError.cc SslError.h \
-	SslErrorData.cc SslErrorData.h AdaptationService.h \
-	AdaptationService.cc AdaptationServiceData.h \
-	AdaptationServiceData.cc Arp.cc Arp.h Eui64.cc Eui64.h
+	Method.h MethodData.cc MethodData.h MyPortName.cc MyPortName.h \
+	Note.cc Note.h NoteData.cc NoteData.h PeerName.cc PeerName.h \
+	Protocol.cc Protocol.h ProtocolData.cc ProtocolData.h \
+	Random.cc Random.h RegexData.cc RegexData.h \
+	ReplyHeaderStrategy.h ReplyMimeType.h RequestHeaderStrategy.h \
+	RequestMimeType.h SourceAsn.h SourceDomain.cc SourceDomain.h \
+	SourceIp.cc SourceIp.h SquidError.cc SquidError.h \
+	SquidErrorData.cc SquidErrorData.h StringData.cc StringData.h \
+	Tag.cc Tag.h Time.cc Time.h TimeData.cc TimeData.h \
+	TransactionInitiator.cc TransactionInitiator.h Url.cc Url.h \
+	UrlLogin.cc UrlLogin.h UrlPath.cc UrlPath.h UrlPort.cc \
+	UrlPort.h UserData.cc UserData.h CertificateData.cc \
+	CertificateData.h Certificate.cc Certificate.h \
+	ServerCertificate.cc ServerCertificate.h ServerName.cc \
+	ServerName.h SslError.cc SslError.h SslErrorData.cc \
+	SslErrorData.h AdaptationService.h AdaptationService.cc \
+	AdaptationServiceData.h AdaptationServiceData.cc Arp.cc Arp.h \
+	Eui64.cc Eui64.h
 am__objects_1 = CertificateData.lo Certificate.lo ServerCertificate.lo \
 	ServerName.lo SslError.lo SslErrorData.lo
 @ENABLE_SSL_TRUE@am__objects_2 = $(am__objects_1)
@@ -207,20 +208,20 @@
 @ENABLE_ADAPTATION_TRUE@am__objects_4 = $(am__objects_3)
 am__objects_5 = Arp.lo Eui64.lo
 @ENABLE_EUI_TRUE@am__objects_6 = $(am__objects_5)
-am_libacls_la_OBJECTS = IntRange.lo RegexData.lo StringData.lo Time.lo \
-	TimeData.lo AllOf.lo AnnotateClient.lo AnnotateTransaction.lo \
-	AnnotationData.lo AnyOf.lo Asn.lo AtStep.lo AtStepData.lo \
-	ConnectionsEncrypted.lo ConnMark.lo DestinationDomain.lo \
-	DestinationIp.lo DomainData.lo ExtUser.lo HasComponent.lo \
-	HasComponentData.lo HierCodeData.lo HierCode.lo \
-	HttpHeaderData.lo HttpRepHeader.lo HttpReqHeader.lo \
-	HttpStatus.lo Ip.lo LocalIp.lo LocalPort.lo MaxConnection.lo \
-	Method.lo MethodData.lo MyPortName.lo Note.lo NoteData.lo \
-	PeerName.lo Protocol.lo ProtocolData.lo Random.lo \
-	SourceDomain.lo SourceIp.lo SquidError.lo SquidErrorData.lo \
-	Tag.lo TransactionInitiator.lo Url.lo UrlLogin.lo UrlPath.lo \
-	UrlPort.lo UserData.lo Gadgets.lo AclSizeLimit.lo \
-	$(am__objects_2) $(am__objects_4) $(am__objects_6)
+am_libacls_la_OBJECTS = AclSizeLimit.lo AllOf.lo AnnotateClient.lo \
+	AnnotateTransaction.lo AnnotationData.lo AnyOf.lo Asn.lo \
+	AtStep.lo AtStepData.lo ConnMark.lo ConnectionsEncrypted.lo \
+	DestinationDomain.lo DestinationIp.lo DomainData.lo ExtUser.lo \
+	Gadgets.lo HasComponent.lo HasComponentData.lo HierCode.lo \
+	HierCodeData.lo HttpHeaderData.lo HttpRepHeader.lo \
+	HttpReqHeader.lo HttpStatus.lo IntRange.lo Ip.lo LocalIp.lo \
+	LocalPort.lo MaxConnection.lo Method.lo MethodData.lo \
+	MyPortName.lo Note.lo NoteData.lo PeerName.lo Protocol.lo \
+	ProtocolData.lo Random.lo RegexData.lo SourceDomain.lo \
+	SourceIp.lo SquidError.lo SquidErrorData.lo StringData.lo \
+	Tag.lo Time.lo TimeData.lo TransactionInitiator.lo Url.lo \
+	UrlLogin.lo UrlPath.lo UrlPort.lo UserData.lo $(am__objects_2) \
+	$(am__objects_4) $(am__objects_6)
 libacls_la_OBJECTS = $(am_libacls_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -231,7 +232,7 @@
 	Options.lo Tree.lo
 libapi_la_OBJECTS = $(am_libapi_la_OBJECTS)
 libstate_la_LIBADD =
-am_libstate_la_OBJECTS = Strategised.lo FilledChecklist.lo Address.lo
+am_libstate_la_OBJECTS = Address.lo FilledChecklist.lo Strategised.lo
 libstate_la_OBJECTS = $(am_libstate_la_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -879,52 +880,53 @@
 	BoolOps.h \
 	Checklist.cc \
 	Checklist.h \
-	forward.h \
 	InnerNode.cc \
 	InnerNode.h \
-	Options.h \
 	Options.cc \
+	Options.h \
 	Tree.cc \
-	Tree.h
+	Tree.h \
+	forward.h
 
 libstate_la_SOURCES = \
+	Address.cc \
+	Address.h \
 	CharacterSetOption.h \
 	Data.h \
-	Strategy.h \
-	Strategised.cc \
-	Strategised.h \
 	FilledChecklist.cc \
 	FilledChecklist.h \
-	Address.h \
-	Address.cc
+	Strategised.cc \
+	Strategised.h \
+	Strategy.h
 
-libacls_la_SOURCES = IntRange.cc IntRange.h RegexData.cc RegexData.h \
-	StringData.cc StringData.h Time.cc Time.h TimeData.cc \
-	TimeData.h AllOf.cc AllOf.h AnnotateClient.cc AnnotateClient.h \
+libacls_la_SOURCES = AclDenyInfoList.h AclSizeLimit.cc AclSizeLimit.h \
+	AllOf.cc AllOf.h AnnotateClient.cc AnnotateClient.h \
 	AnnotateTransaction.cc AnnotateTransaction.h AnnotationData.cc \
 	AnnotationData.h AnyOf.cc AnyOf.h Asn.cc Asn.h AtStep.cc \
-	AtStep.h AtStepData.cc AtStepData.h ConnectionsEncrypted.cc \
-	ConnectionsEncrypted.h ConnMark.cc ConnMark.h DestinationAsn.h \
-	DestinationDomain.cc DestinationDomain.h DestinationIp.cc \
-	DestinationIp.h DomainData.cc DomainData.h ExtUser.cc \
-	ExtUser.h HasComponent.cc HasComponent.h HasComponentData.cc \
-	HasComponentData.h HierCodeData.cc HierCodeData.h HierCode.cc \
-	HierCode.h HttpHeaderData.cc HttpHeaderData.h HttpRepHeader.cc \
+	AtStep.h AtStepData.cc AtStepData.h ConnMark.cc ConnMark.h \
+	ConnectionsEncrypted.cc ConnectionsEncrypted.h \
+	DestinationAsn.h DestinationDomain.cc DestinationDomain.h \
+	DestinationIp.cc DestinationIp.h DomainData.cc DomainData.h \
+	ExtUser.cc ExtUser.h Gadgets.cc Gadgets.h HasComponent.cc \
+	HasComponent.h HasComponentData.cc HasComponentData.h \
+	HierCode.cc HierCode.h HierCodeData.cc HierCodeData.h \
+	HttpHeaderData.cc HttpHeaderData.h HttpRepHeader.cc \
 	HttpRepHeader.h HttpReqHeader.cc HttpReqHeader.h HttpStatus.cc \
-	HttpStatus.h Ip.cc Ip.h LocalIp.cc LocalIp.h LocalPort.cc \
-	LocalPort.h MaxConnection.cc MaxConnection.h Method.cc \
-	MethodData.cc MethodData.h Method.h MyPortName.cc MyPortName.h \
-	Note.h Note.cc NoteData.h NoteData.cc PeerName.cc PeerName.h \
-	Protocol.cc ProtocolData.cc ProtocolData.h Protocol.h \
-	Random.cc Random.h ReplyHeaderStrategy.h ReplyMimeType.h \
+	HttpStatus.h IntRange.cc IntRange.h Ip.cc Ip.h LocalIp.cc \
+	LocalIp.h LocalPort.cc LocalPort.h MaxConnection.cc \
+	MaxConnection.h Method.cc Method.h MethodData.cc MethodData.h \
+	MyPortName.cc MyPortName.h Note.cc Note.h NoteData.cc \
+	NoteData.h PeerName.cc PeerName.h Protocol.cc Protocol.h \
+	ProtocolData.cc ProtocolData.h Random.cc Random.h RegexData.cc \
+	RegexData.h ReplyHeaderStrategy.h ReplyMimeType.h \
 	RequestHeaderStrategy.h RequestMimeType.h SourceAsn.h \
 	SourceDomain.cc SourceDomain.h SourceIp.cc SourceIp.h \
-	SquidError.h SquidError.cc SquidErrorData.cc SquidErrorData.h \
-	Tag.cc Tag.h TransactionInitiator.cc TransactionInitiator.h \
-	Url.cc Url.h UrlLogin.cc UrlLogin.h UrlPath.cc UrlPath.h \
-	UrlPort.cc UrlPort.h UserData.cc UserData.h AclDenyInfoList.h \
-	Gadgets.cc Gadgets.h AclSizeLimit.cc AclSizeLimit.h \
-	$(am__append_2) $(am__append_3) $(am__append_4)
+	SquidError.cc SquidError.h SquidErrorData.cc SquidErrorData.h \
+	StringData.cc StringData.h Tag.cc Tag.h Time.cc Time.h \
+	TimeData.cc TimeData.h TransactionInitiator.cc \
+	TransactionInitiator.h Url.cc Url.h UrlLogin.cc UrlLogin.h \
+	UrlPath.cc UrlPath.h UrlPort.cc UrlPort.h UserData.cc \
+	UserData.h $(am__append_2) $(am__append_3) $(am__append_4)
 EXTRA_libacls_la_SOURCES = $(SSL_ACLS) $(ADAPT_ACLS) $(ARP_ACLS)
 SSL_ACLS = \
         CertificateData.cc \
diff -u -r -N squid-5.0.5/src/acl/SquidError.cc squid-5.0.6/src/acl/SquidError.cc
--- squid-5.0.5/src/acl/SquidError.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/SquidError.cc	2021-05-10 21:02:34.000000000 +1200
@@ -17,7 +17,7 @@
     if (checklist->requestErrorType != ERR_MAX)
         return data->match(checklist->requestErrorType);
     else if (checklist->request)
-        return data->match(checklist->request->errType);
+        return data->match(checklist->request->error.category);
     return 0;
 }
 
diff -u -r -N squid-5.0.5/src/acl/SquidErrorData.cc squid-5.0.6/src/acl/SquidErrorData.cc
--- squid-5.0.5/src/acl/SquidErrorData.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/SquidErrorData.cc	2021-05-10 21:02:34.000000000 +1200
@@ -12,7 +12,7 @@
 #include "cache_cf.h"
 #include "ConfigParser.h"
 #include "Debug.h"
-#include "err_type.h"
+#include "error/Error.h"
 #include "fatal.h"
 #include "wordlist.h"
 
diff -u -r -N squid-5.0.5/src/acl/SquidErrorData.h squid-5.0.6/src/acl/SquidErrorData.h
--- squid-5.0.5/src/acl/SquidErrorData.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/SquidErrorData.h	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,7 @@
 
 #include "acl/Data.h"
 #include "base/CbDataList.h"
-#include "err_type.h"
+#include "error/forward.h"
 
 /// \ingroup ACLAPI
 class ACLSquidErrorData : public ACLData<err_type>
diff -u -r -N squid-5.0.5/src/acl/SquidError.h squid-5.0.6/src/acl/SquidError.h
--- squid-5.0.5/src/acl/SquidError.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/acl/SquidError.h	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 #define SQUID_ACLSQUIDERROR_H
 
 #include "acl/Strategy.h"
-#include "err_type.h"
+#include "error/forward.h"
 
 class ACLSquidErrorStrategy : public ACLStrategy<err_type>
 {
diff -u -r -N squid-5.0.5/src/adaptation/ecap/Makefile.am squid-5.0.6/src/adaptation/ecap/Makefile.am
--- squid-5.0.5/src/adaptation/ecap/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/adaptation/ecap/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,18 +11,17 @@
 noinst_LTLIBRARIES = libecapsquid.la
 
 libecapsquid_la_SOURCES = \
-	Config.h \
 	Config.cc \
-	Host.h \
+	Config.h \
 	Host.cc \
-	MessageRep.h \
+	Host.h \
 	MessageRep.cc \
-	ServiceRep.h \
+	MessageRep.h \
+	Registry.h \
 	ServiceRep.cc \
-	XactionRep.h \
+	ServiceRep.h \
 	XactionRep.cc \
-	\
-	Registry.h
+	XactionRep.h
 
 # add libecap using its pkg-config-produced configuration variables
 libecapsquid_la_CXXFLAGS = $(EXT_LIBECAP_CFLAGS)
diff -u -r -N squid-5.0.5/src/adaptation/ecap/Makefile.in squid-5.0.6/src/adaptation/ecap/Makefile.in
--- squid-5.0.5/src/adaptation/ecap/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/adaptation/ecap/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -739,18 +739,17 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libecapsquid.la
 libecapsquid_la_SOURCES = \
-	Config.h \
 	Config.cc \
-	Host.h \
+	Config.h \
 	Host.cc \
-	MessageRep.h \
+	Host.h \
 	MessageRep.cc \
-	ServiceRep.h \
+	MessageRep.h \
+	Registry.h \
 	ServiceRep.cc \
-	XactionRep.h \
+	ServiceRep.h \
 	XactionRep.cc \
-	\
-	Registry.h
+	XactionRep.h
 
 
 # add libecap using its pkg-config-produced configuration variables
diff -u -r -N squid-5.0.5/src/adaptation/icap/Makefile.am squid-5.0.6/src/adaptation/icap/Makefile.am
--- squid-5.0.5/src/adaptation/icap/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/adaptation/icap/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -13,24 +13,24 @@
 libicap_la_SOURCES = \
 	Client.cc \
 	Client.h \
-	InOut.h \
 	Config.cc \
 	Config.h \
 	Elements.cc \
 	Elements.h \
-	Options.cc \
-	Options.h \
-	ServiceRep.cc \
-	ServiceRep.h \
+	History.cc \
+	History.h \
+	InOut.h \
 	Launcher.cc \
 	Launcher.h \
+	ModXact.cc \
+	ModXact.h \
 	OptXact.cc \
 	OptXact.h \
+	Options.cc \
+	Options.h \
+	ServiceRep.cc \
+	ServiceRep.h \
 	Xaction.cc \
 	Xaction.h \
-	ModXact.cc \
-	ModXact.h \
 	icap_log.cc \
-	icap_log.h \
-	History.cc \
-	History.h
+	icap_log.h
diff -u -r -N squid-5.0.5/src/adaptation/icap/Makefile.in squid-5.0.6/src/adaptation/icap/Makefile.in
--- squid-5.0.5/src/adaptation/icap/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/adaptation/icap/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -164,9 +164,9 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libicap_la_LIBADD =
-am_libicap_la_OBJECTS = Client.lo Config.lo Elements.lo Options.lo \
-	ServiceRep.lo Launcher.lo OptXact.lo Xaction.lo ModXact.lo \
-	icap_log.lo History.lo
+am_libicap_la_OBJECTS = Client.lo Config.lo Elements.lo History.lo \
+	Launcher.lo ModXact.lo OptXact.lo Options.lo ServiceRep.lo \
+	Xaction.lo icap_log.lo
 libicap_la_OBJECTS = $(am_libicap_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -737,27 +737,27 @@
 libicap_la_SOURCES = \
 	Client.cc \
 	Client.h \
-	InOut.h \
 	Config.cc \
 	Config.h \
 	Elements.cc \
 	Elements.h \
-	Options.cc \
-	Options.h \
-	ServiceRep.cc \
-	ServiceRep.h \
+	History.cc \
+	History.h \
+	InOut.h \
 	Launcher.cc \
 	Launcher.h \
+	ModXact.cc \
+	ModXact.h \
 	OptXact.cc \
 	OptXact.h \
+	Options.cc \
+	Options.h \
+	ServiceRep.cc \
+	ServiceRep.h \
 	Xaction.cc \
 	Xaction.h \
-	ModXact.cc \
-	ModXact.h \
 	icap_log.cc \
-	icap_log.h \
-	History.cc \
-	History.h
+	icap_log.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/adaptation/icap/ModXact.cc squid-5.0.6/src/adaptation/icap/ModXact.cc
--- squid-5.0.5/src/adaptation/icap/ModXact.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/adaptation/icap/ModXact.cc	2021-05-10 21:02:34.000000000 +1200
@@ -24,7 +24,8 @@
 #include "base64.h"
 #include "comm.h"
 #include "comm/Connection.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
+#include "error/ExceptionErrorDetail.h"
 #include "http/ContentLengthInterpreter.h"
 #include "HttpHeaderTools.h"
 #include "HttpReply.h"
@@ -670,9 +671,9 @@
     if (!canStartBypass || isRetriable) {
         if (!isRetriable) {
             if (const TextException *te = dynamic_cast<const TextException *>(&e))
-                detailError(ERR_DETAIL_EXCEPTION_START + te->id());
+                detailError(new ExceptionErrorDetail(te->id()));
             else
-                detailError(ERR_DETAIL_EXCEPTION_OTHER);
+                detailError(new ExceptionErrorDetail(Here().id()));
         }
         Adaptation::Icap::Xaction::callException(e);
         return;
@@ -683,10 +684,10 @@
                e.what() << ' ' << status());
         bypassFailure();
     } catch (const TextException &bypassTe) {
-        detailError(ERR_DETAIL_EXCEPTION_START + bypassTe.id());
+        detailError(new ExceptionErrorDetail(bypassTe.id()));
         Adaptation::Icap::Xaction::callException(bypassTe);
     } catch (const std::exception &bypassE) {
-        detailError(ERR_DETAIL_EXCEPTION_OTHER);
+        detailError(new ExceptionErrorDetail(Here().id()));
         Adaptation::Icap::Xaction::callException(bypassE);
     }
 }
@@ -1281,7 +1282,8 @@
 // adapted body consumer aborted
 void Adaptation::Icap::ModXact::noteBodyConsumerAborted(BodyPipe::Pointer)
 {
-    detailError(ERR_DETAIL_ICAP_XACT_BODY_CONSUMER_ABORT);
+    static const auto d = MakeNamedErrorDetail("ICAP_XACT_BODY_CONSUMER_ABORT");
+    detailError(d);
     mustStop("adapted body consumer aborted");
 }
 
@@ -1299,8 +1301,10 @@
     stopWriting(false);
     stopSending(false);
 
-    if (theInitiator.set()) // we have not sent the answer to the initiator
-        detailError(ERR_DETAIL_ICAP_XACT_OTHER);
+    if (theInitiator.set()) { // we have not sent the answer to the initiator
+        static const auto d = MakeNamedErrorDetail("ICAP_XACT_OTHER");
+        detailError(d);
+    }
 
     // update adaptation history if start was called and we reserved a slot
     Adaptation::History::Pointer ah = virginRequest().adaptLogHistory();
@@ -1989,7 +1993,7 @@
     return true;
 }
 
-void Adaptation::Icap::ModXact::detailError(int errDetail)
+void Adaptation::Icap::ModXact::detailError(const ErrorDetail::Pointer &errDetail)
 {
     HttpRequest *request = dynamic_cast<HttpRequest*>(adapted.header);
     // if no adapted request, update virgin (and inherit its properties later)
diff -u -r -N squid-5.0.5/src/adaptation/icap/ModXact.h squid-5.0.6/src/adaptation/icap/ModXact.h
--- squid-5.0.5/src/adaptation/icap/ModXact.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/adaptation/icap/ModXact.h	2021-05-10 21:02:34.000000000 +1200
@@ -174,7 +174,7 @@
     virtual void callException(const std::exception &e);
 
     /// record error detail in the virgin request if possible
-    virtual void detailError(int errDetail);
+    virtual void detailError(const ErrorDetail::Pointer &errDetail);
     // Icap::Xaction API
     virtual void clearError();
     /// The master transaction log entry
diff -u -r -N squid-5.0.5/src/adaptation/icap/Xaction.cc squid-5.0.6/src/adaptation/icap/Xaction.cc
--- squid-5.0.5/src/adaptation/icap/Xaction.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/adaptation/icap/Xaction.cc	2021-05-10 21:02:34.000000000 +1200
@@ -20,7 +20,7 @@
 #include "comm/Read.h"
 #include "comm/Write.h"
 #include "CommCalls.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
 #include "fde.h"
 #include "FwdState.h"
 #include "globals.h"
@@ -324,7 +324,8 @@
     debugs(93, 2, HERE << typeName <<
            " failed to connect to " << service().cfg().uri);
     service().noteConnectionFailed("failure");
-    detailError(ERR_DETAIL_ICAP_XACT_START);
+    static const auto d = MakeNamedErrorDetail("ICAP_XACT_START");
+    detailError(d);
     throw TexcHere("cannot connect to the ICAP service");
 }
 
@@ -394,7 +395,8 @@
 
 void Adaptation::Icap::Xaction::handleCommClosed()
 {
-    detailError(ERR_DETAIL_ICAP_XACT_CLOSE);
+    static const auto d = MakeNamedErrorDetail("ICAP_XACT_CLOSE");
+    detailError(d);
     mustStop("ICAP service connection externally closed");
 }
 
@@ -575,7 +577,8 @@
     if (theInitiator.set()) {
         debugs(93,4, HERE << "Initiator gone before ICAP transaction ended");
         clearInitiator();
-        detailError(ERR_DETAIL_ICAP_INIT_GONE);
+        static const auto d = MakeNamedErrorDetail("ICAP_INIT_GONE");
+        detailError(d);
         setOutcome(xoGone);
         mustStop("initiator aborted");
     }
@@ -754,7 +757,8 @@
         debugs(93, 2, typeName <<
                " TLS negotiation to " << service().cfg().uri << " failed");
         service().noteConnectionFailed("failure");
-        detailError(ERR_DETAIL_ICAP_XACT_SSL_START);
+        static const auto d = MakeNamedErrorDetail("ICAP_XACT_SSL_START");
+        detailError(d);
         throw TexcHere("cannot connect to the TLS ICAP service");
     }
 
diff -u -r -N squid-5.0.5/src/adaptation/icap/Xaction.h squid-5.0.6/src/adaptation/icap/Xaction.h
--- squid-5.0.5/src/adaptation/icap/Xaction.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/adaptation/icap/Xaction.h	2021-05-10 21:02:34.000000000 +1200
@@ -13,6 +13,7 @@
 #include "adaptation/icap/ServiceRep.h"
 #include "adaptation/Initiate.h"
 #include "comm/ConnOpener.h"
+#include "error/forward.h"
 #include "HttpReply.h"
 #include "ipcache.h"
 #include "sbuf/SBuf.h"
@@ -73,7 +74,7 @@
 
     void handleSecuredPeer(Security::EncryptorAnswer &answer);
     /// record error detail if possible
-    virtual void detailError(int) {}
+    virtual void detailError(const ErrorDetailPointer &) {}
 
     void openConnection();
     void closeConnection();
diff -u -r -N squid-5.0.5/src/adaptation/Makefile.am squid-5.0.6/src/adaptation/Makefile.am
--- squid-5.0.5/src/adaptation/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/adaptation/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -26,7 +26,8 @@
 	DynamicGroupCfg.h \
 	Elements.cc \
 	Elements.h \
-	forward.h \
+	History.cc \
+	History.h \
 	Initiate.cc \
 	Initiate.h \
 	Initiator.cc \
@@ -39,12 +40,11 @@
 	Service.h \
 	ServiceConfig.cc \
 	ServiceConfig.h \
-	ServiceGroups.cc \
-	ServiceGroups.h \
 	ServiceFilter.cc \
 	ServiceFilter.h \
-	History.cc \
-	History.h
+	ServiceGroups.cc \
+	ServiceGroups.h \
+	forward.h
 
 libadaptation_la_LIBADD =
 
diff -u -r -N squid-5.0.5/src/adaptation/Makefile.in squid-5.0.6/src/adaptation/Makefile.in
--- squid-5.0.5/src/adaptation/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/adaptation/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -169,9 +169,9 @@
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libadaptation_la_DEPENDENCIES = $(am__append_3) $(am__append_5)
 am_libadaptation_la_OBJECTS = AccessCheck.lo AccessRule.lo Answer.lo \
-	Config.lo DynamicGroupCfg.lo Elements.lo Initiate.lo \
-	Initiator.lo Iterator.lo Message.lo Service.lo \
-	ServiceConfig.lo ServiceGroups.lo ServiceFilter.lo History.lo
+	Config.lo DynamicGroupCfg.lo Elements.lo History.lo \
+	Initiate.lo Initiator.lo Iterator.lo Message.lo Service.lo \
+	ServiceConfig.lo ServiceFilter.lo ServiceGroups.lo
 libadaptation_la_OBJECTS = $(am_libadaptation_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -796,7 +796,8 @@
 	DynamicGroupCfg.h \
 	Elements.cc \
 	Elements.h \
-	forward.h \
+	History.cc \
+	History.h \
 	Initiate.cc \
 	Initiate.h \
 	Initiator.cc \
@@ -809,12 +810,11 @@
 	Service.h \
 	ServiceConfig.cc \
 	ServiceConfig.h \
-	ServiceGroups.cc \
-	ServiceGroups.h \
 	ServiceFilter.cc \
 	ServiceFilter.h \
-	History.cc \
-	History.h
+	ServiceGroups.cc \
+	ServiceGroups.h \
+	forward.h
 
 libadaptation_la_LIBADD = $(am__append_3) $(am__append_5)
 all: all-recursive
diff -u -r -N squid-5.0.5/src/anyp/Makefile.am squid-5.0.6/src/anyp/Makefile.am
--- squid-5.0.5/src/anyp/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/anyp/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,6 @@
 noinst_LTLIBRARIES = libanyp.la
 
 libanyp_la_SOURCES = \
-	forward.h \
 	PortCfg.cc \
 	PortCfg.h \
 	ProtocolType.cc \
@@ -21,7 +20,8 @@
 	Uri.cc \
 	Uri.h \
 	UriScheme.cc \
-	UriScheme.h
+	UriScheme.h \
+	forward.h
 
 ProtocolType.cc: ProtocolType.h $(top_srcdir)/src/mk-string-arrays.awk
 	($(AWK) -f $(top_srcdir)/src/mk-string-arrays.awk <$(srcdir)/ProtocolType.h | sed -e 's%PROTO_%%' >$@) || ($(RM) -f $@ && exit 1)
diff -u -r -N squid-5.0.5/src/anyp/Makefile.in squid-5.0.6/src/anyp/Makefile.in
--- squid-5.0.5/src/anyp/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/anyp/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -730,7 +730,6 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libanyp.la
 libanyp_la_SOURCES = \
-	forward.h \
 	PortCfg.cc \
 	PortCfg.h \
 	ProtocolType.cc \
@@ -740,7 +739,8 @@
 	Uri.cc \
 	Uri.h \
 	UriScheme.cc \
-	UriScheme.h
+	UriScheme.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/auth/basic/DB/basic_db_auth.8 squid-5.0.6/src/auth/basic/DB/basic_db_auth.8
--- squid-5.0.5/src/auth/basic/DB/basic_db_auth.8	2021-02-08 13:46:38.000000000 +1300
+++ squid-5.0.6/src/auth/basic/DB/basic_db_auth.8	2021-05-10 23:02:23.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BASIC_DB_AUTH 8"
-.TH BASIC_DB_AUTH 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH BASIC_DB_AUTH 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/auth/basic/LDAP/Makefile.am squid-5.0.6/src/auth/basic/LDAP/Makefile.am
--- squid-5.0.5/src/auth/basic/LDAP/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/LDAP/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 libexec_PROGRAMS 	= basic_ldap_auth
 man_MANS 		= basic_ldap_auth.8
 EXTRA_DIST		= basic_ldap_auth.8 required.m4
-basic_ldap_auth_SOURCES	= basic_ldap_auth.cc
+basic_ldap_auth_SOURCES = basic_ldap_auth.cc
 
 basic_ldap_auth_LDADD = \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/basic/NCSA/Makefile.am squid-5.0.6/src/auth/basic/NCSA/Makefile.am
--- squid-5.0.5/src/auth/basic/NCSA/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/NCSA/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,7 @@
 man_MANS 		= basic_ncsa_auth.8
 EXTRA_DIST		= basic_ncsa_auth.8 required.m4
 
-basic_ncsa_auth_SOURCES= \
+basic_ncsa_auth_SOURCES = \
 	basic_ncsa_auth.cc \
 	crypt_md5.cc \
 	crypt_md5.h
diff -u -r -N squid-5.0.5/src/auth/basic/NIS/Makefile.am squid-5.0.6/src/auth/basic/NIS/Makefile.am
--- squid-5.0.5/src/auth/basic/NIS/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/NIS/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -9,10 +9,10 @@
 
 libexec_PROGRAMS = basic_nis_auth
 
-basic_nis_auth_SOURCES= \
+basic_nis_auth_SOURCES = \
 	basic_nis_auth.cc \
-	nis_support.h \
-	nis_support.cc
+	nis_support.cc \
+	nis_support.h
 
 basic_nis_auth_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/basic/NIS/Makefile.in squid-5.0.6/src/auth/basic/NIS/Makefile.in
--- squid-5.0.5/src/auth/basic/NIS/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/auth/basic/NIS/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -735,8 +735,8 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 basic_nis_auth_SOURCES = \
 	basic_nis_auth.cc \
-	nis_support.h \
-	nis_support.cc
+	nis_support.cc \
+	nis_support.h
 
 basic_nis_auth_LDADD = \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/basic/PAM/Makefile.am squid-5.0.6/src/auth/basic/PAM/Makefile.am
--- squid-5.0.5/src/auth/basic/PAM/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/PAM/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,7 @@
 EXTRA_DIST		= basic_pam_auth.8 required.m4
 libexec_PROGRAMS	= basic_pam_auth
 
-basic_pam_auth_SOURCES	= basic_pam_auth.cc
+basic_pam_auth_SOURCES = basic_pam_auth.cc
 basic_pam_auth_LDADD = \
 	$(top_builddir)/lib/libmiscencoding.la \
 	$(COMPAT_LIB) \
diff -u -r -N squid-5.0.5/src/auth/basic/POP3/basic_pop3_auth.8 squid-5.0.6/src/auth/basic/POP3/basic_pop3_auth.8
--- squid-5.0.5/src/auth/basic/POP3/basic_pop3_auth.8	2021-02-08 13:46:39.000000000 +1300
+++ squid-5.0.6/src/auth/basic/POP3/basic_pop3_auth.8	2021-05-10 23:02:23.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BASIC_POP3_AUTH 8"
-.TH BASIC_POP3_AUTH 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH BASIC_POP3_AUTH 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/auth/basic/RADIUS/Makefile.am squid-5.0.6/src/auth/basic/RADIUS/Makefile.am
--- squid-5.0.5/src/auth/basic/RADIUS/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/RADIUS/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,11 +11,11 @@
 man_MANS 		= basic_radius_auth.8
 EXTRA_DIST		= basic_radius_auth.8 required.m4
 
-basic_radius_auth_SOURCES= \
+basic_radius_auth_SOURCES = \
 	basic_radius_auth.cc \
-	radius.h \
 	radius-util.cc \
-	radius-util.h
+	radius-util.h \
+	radius.h
 
 basic_radius_auth_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/basic/RADIUS/Makefile.in squid-5.0.6/src/auth/basic/RADIUS/Makefile.in
--- squid-5.0.5/src/auth/basic/RADIUS/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/auth/basic/RADIUS/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -742,9 +742,9 @@
 EXTRA_DIST = basic_radius_auth.8 required.m4
 basic_radius_auth_SOURCES = \
 	basic_radius_auth.cc \
-	radius.h \
 	radius-util.cc \
-	radius-util.h
+	radius-util.h \
+	radius.h
 
 basic_radius_auth_LDADD = \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/basic/SASL/Makefile.am squid-5.0.6/src/auth/basic/SASL/Makefile.am
--- squid-5.0.5/src/auth/basic/SASL/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/SASL/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 man_MANS= basic_sasl_auth.8
 libexec_PROGRAMS= basic_sasl_auth
 
-basic_sasl_auth_SOURCES= \
+basic_sasl_auth_SOURCES = \
 	basic_sasl_auth.cc
 basic_sasl_auth_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/basic/SMB/Makefile.am squid-5.0.6/src/auth/basic/SMB/Makefile.am
--- squid-5.0.5/src/auth/basic/SMB/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/SMB/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -12,7 +12,7 @@
 libexec_PROGRAMS = basic_smb_auth
 endif
 
-basic_smb_auth_SOURCES= basic_smb_auth.cc
+basic_smb_auth_SOURCES = basic_smb_auth.cc
 basic_smb_auth_CXXFLAGS = -DHELPERSCRIPT=\"$(libexecdir)/basic_smb_auth.sh\"
 basic_smb_auth_LDADD = \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/basic/SMB_LM/Makefile.am squid-5.0.6/src/auth/basic/SMB_LM/Makefile.am
--- squid-5.0.5/src/auth/basic/SMB_LM/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/SMB_LM/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -9,7 +9,7 @@
 
 libexec_PROGRAMS= basic_smb_lm_auth
 
-basic_smb_lm_auth_SOURCES= \
+basic_smb_lm_auth_SOURCES = \
 	msntauth.cc \
 	msntauth.h \
 	valid.cc \
diff -u -r -N squid-5.0.5/src/auth/basic/SSPI/Makefile.am squid-5.0.6/src/auth/basic/SSPI/Makefile.am
--- squid-5.0.5/src/auth/basic/SSPI/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/basic/SSPI/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -13,7 +13,8 @@
 
 basic_sspi_auth_SOURCES = \
 	basic_sspi_auth.cc \
-	valid.cc valid.h
+	valid.cc \
+	valid.h
 basic_sspi_auth_CXXFLAGS = -Wl,--enable-auto-import
 basic_sspi_auth_LDADD = \
 	$(top_builddir)/lib/libsspwin32.la \
diff -u -r -N squid-5.0.5/src/auth/basic/SSPI/Makefile.in squid-5.0.6/src/auth/basic/SSPI/Makefile.in
--- squid-5.0.5/src/auth/basic/SSPI/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/auth/basic/SSPI/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -744,7 +744,8 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 basic_sspi_auth_SOURCES = \
 	basic_sspi_auth.cc \
-	valid.cc valid.h
+	valid.cc \
+	valid.h
 
 basic_sspi_auth_CXXFLAGS = -Wl,--enable-auto-import
 basic_sspi_auth_LDADD = \
diff -u -r -N squid-5.0.5/src/auth/digest/eDirectory/Makefile.am squid-5.0.6/src/auth/digest/eDirectory/Makefile.am
--- squid-5.0.5/src/auth/digest/eDirectory/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/digest/eDirectory/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -9,13 +9,13 @@
 
 libexec_PROGRAMS= digest_edirectory_auth
 
-digest_edirectory_auth_SOURCES= \
-	digest_pw_auth.cc \
+digest_edirectory_auth_SOURCES = \
 	digest_common.h \
-	ldap_backend.cc \
-	ldap_backend.h \
+	digest_pw_auth.cc \
 	edir_ldapext.cc \
-	edir_ldapext.h
+	edir_ldapext.h \
+	ldap_backend.cc \
+	ldap_backend.h
 
 digest_edirectory_auth_LDADD = \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/digest/eDirectory/Makefile.in squid-5.0.6/src/auth/digest/eDirectory/Makefile.in
--- squid-5.0.5/src/auth/digest/eDirectory/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/auth/digest/eDirectory/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -167,7 +167,7 @@
 am__installdirs = "$(DESTDIR)$(libexecdir)"
 PROGRAMS = $(libexec_PROGRAMS)
 am_digest_edirectory_auth_OBJECTS = digest_pw_auth.$(OBJEXT) \
-	ldap_backend.$(OBJEXT) edir_ldapext.$(OBJEXT)
+	edir_ldapext.$(OBJEXT) ldap_backend.$(OBJEXT)
 digest_edirectory_auth_OBJECTS = $(am_digest_edirectory_auth_OBJECTS)
 @ENABLE_XPROF_STATS_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/lib/profiler/libprofiler.la
 am__DEPENDENCIES_2 = $(top_builddir)/compat/libcompatsquid.la \
@@ -736,12 +736,12 @@
 COMPAT_LIB = $(top_builddir)/compat/libcompatsquid.la $(LIBPROFILER)
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 digest_edirectory_auth_SOURCES = \
-	digest_pw_auth.cc \
 	digest_common.h \
-	ldap_backend.cc \
-	ldap_backend.h \
+	digest_pw_auth.cc \
 	edir_ldapext.cc \
-	edir_ldapext.h
+	edir_ldapext.h \
+	ldap_backend.cc \
+	ldap_backend.h
 
 digest_edirectory_auth_LDADD = \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/digest/file/Makefile.am squid-5.0.6/src/auth/digest/file/Makefile.am
--- squid-5.0.5/src/auth/digest/file/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/digest/file/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 man_MANS= digest_file_auth.8
 libexec_PROGRAMS= digest_file_auth
 
-digest_file_auth_SOURCES= \
+digest_file_auth_SOURCES = \
 	digest_common.h \
 	digest_file_auth.cc \
 	text_backend.cc \
diff -u -r -N squid-5.0.5/src/auth/digest/LDAP/Makefile.am squid-5.0.6/src/auth/digest/LDAP/Makefile.am
--- squid-5.0.5/src/auth/digest/LDAP/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/digest/LDAP/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -9,7 +9,7 @@
 
 libexec_PROGRAMS= digest_ldap_auth
 
-digest_ldap_auth_SOURCES= \
+digest_ldap_auth_SOURCES = \
 	digest_common.h \
 	digest_pw_auth.cc \
 	ldap_backend.cc \
diff -u -r -N squid-5.0.5/src/auth/digest/Makefile.am squid-5.0.6/src/auth/digest/Makefile.am
--- squid-5.0.5/src/auth/digest/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/digest/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -14,7 +14,7 @@
 
 noinst_LTLIBRARIES= libdigest.la
 
-libdigest_la_SOURCES= \
+libdigest_la_SOURCES = \
 	Config.cc \
 	Config.h \
 	Scheme.cc \
diff -u -r -N squid-5.0.5/src/auth/Makefile.am squid-5.0.6/src/auth/Makefile.am
--- squid-5.0.5/src/auth/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -17,15 +17,12 @@
 
 ## authentication framework; this library is always built
 libauth_la_SOURCES = \
-	Type.h \
-	Type.cc \
 	Config.cc \
 	Config.h \
-	CredentialsCache.h \
-	CredentialsCache.cc \
 	CredentialState.cc \
 	CredentialState.h \
-	forward.h \
+	CredentialsCache.cc \
+	CredentialsCache.h \
 	Gadgets.cc \
 	Gadgets.h \
 	QueueNode.h \
@@ -33,16 +30,19 @@
 	Scheme.h \
 	SchemeConfig.cc \
 	SchemeConfig.h \
-	SchemesConfig.h \
 	SchemesConfig.cc \
-	State.h \
+	SchemesConfig.h \
 	State.cc \
-	toUtf.h \
-	toUtf.cc \
-	User.h \
+	State.h \
+	Type.cc \
+	Type.h \
 	User.cc \
+	User.h \
+	UserRequest.cc \
 	UserRequest.h \
-	UserRequest.cc
+	forward.h \
+	toUtf.cc \
+	toUtf.h
 
 libauth_la_LIBADD = $(AUTH_LIBS_TO_BUILD)
 libauth_la_DEPENDENCIES = $(AUTH_LIBS_TO_BUILD)
@@ -51,7 +51,6 @@
 libacls_la_SOURCES = \
 	Acl.cc \
 	Acl.h \
-	\
 	AclMaxUserIp.cc \
 	AclMaxUserIp.h \
 	AclProxyAuth.cc \
diff -u -r -N squid-5.0.5/src/auth/Makefile.in squid-5.0.6/src/auth/Makefile.in
--- squid-5.0.5/src/auth/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/auth/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -171,9 +171,10 @@
 am__v_lt_0 = --silent
 am__v_lt_1 = 
 am__DEPENDENCIES_1 =
-am_libauth_la_OBJECTS = Type.lo Config.lo CredentialsCache.lo \
-	CredentialState.lo Gadgets.lo Scheme.lo SchemeConfig.lo \
-	SchemesConfig.lo State.lo toUtf.lo User.lo UserRequest.lo
+am_libauth_la_OBJECTS = Config.lo CredentialState.lo \
+	CredentialsCache.lo Gadgets.lo Scheme.lo SchemeConfig.lo \
+	SchemesConfig.lo State.lo Type.lo User.lo UserRequest.lo \
+	toUtf.lo
 libauth_la_OBJECTS = $(am_libauth_la_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -782,15 +783,12 @@
 DIST_SUBDIRS = basic digest negotiate ntlm
 noinst_LTLIBRARIES = libauth.la libacls.la
 libauth_la_SOURCES = \
-	Type.h \
-	Type.cc \
 	Config.cc \
 	Config.h \
-	CredentialsCache.h \
-	CredentialsCache.cc \
 	CredentialState.cc \
 	CredentialState.h \
-	forward.h \
+	CredentialsCache.cc \
+	CredentialsCache.h \
 	Gadgets.cc \
 	Gadgets.h \
 	QueueNode.h \
@@ -798,23 +796,25 @@
 	Scheme.h \
 	SchemeConfig.cc \
 	SchemeConfig.h \
-	SchemesConfig.h \
 	SchemesConfig.cc \
-	State.h \
+	SchemesConfig.h \
 	State.cc \
-	toUtf.h \
-	toUtf.cc \
-	User.h \
+	State.h \
+	Type.cc \
+	Type.h \
 	User.cc \
+	User.h \
+	UserRequest.cc \
 	UserRequest.h \
-	UserRequest.cc
+	forward.h \
+	toUtf.cc \
+	toUtf.h
 
 libauth_la_LIBADD = $(AUTH_LIBS_TO_BUILD)
 libauth_la_DEPENDENCIES = $(AUTH_LIBS_TO_BUILD)
 libacls_la_SOURCES = \
 	Acl.cc \
 	Acl.h \
-	\
 	AclMaxUserIp.cc \
 	AclMaxUserIp.h \
 	AclProxyAuth.cc \
diff -u -r -N squid-5.0.5/src/auth/negotiate/kerberos/Makefile.am squid-5.0.6/src/auth/negotiate/kerberos/Makefile.am
--- squid-5.0.5/src/auth/negotiate/kerberos/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/negotiate/kerberos/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -18,10 +18,10 @@
 
 AM_CPPFLAGS += -I$(srcdir)
 
-negotiate_kerberos_auth_SOURCES= \
+negotiate_kerberos_auth_SOURCES = \
+	negotiate_kerberos.h \
 	negotiate_kerberos_auth.cc \
-	negotiate_kerberos_pac.cc \
-	negotiate_kerberos.h
+	negotiate_kerberos_pac.cc
 negotiate_kerberos_auth_LDFLAGS=
 negotiate_kerberos_auth_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
@@ -30,7 +30,7 @@
 	$(KRB5LIBS) \
 	$(XTRA_LIBS)
 
-negotiate_kerberos_auth_test_SOURCES= \
+negotiate_kerberos_auth_test_SOURCES = \
 	negotiate_kerberos_auth_test.cc
 negotiate_kerberos_auth_test_LDFLAGS=
 negotiate_kerberos_auth_test_LDADD= \
diff -u -r -N squid-5.0.5/src/auth/negotiate/kerberos/Makefile.in squid-5.0.6/src/auth/negotiate/kerberos/Makefile.in
--- squid-5.0.5/src/auth/negotiate/kerberos/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/auth/negotiate/kerberos/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -766,9 +766,9 @@
 	negotiate_kerberos_auth.8
 
 negotiate_kerberos_auth_SOURCES = \
+	negotiate_kerberos.h \
 	negotiate_kerberos_auth.cc \
-	negotiate_kerberos_pac.cc \
-	negotiate_kerberos.h
+	negotiate_kerberos_pac.cc
 
 negotiate_kerberos_auth_LDFLAGS = 
 negotiate_kerberos_auth_LDADD = \
diff -u -r -N squid-5.0.5/src/auth/negotiate/Makefile.am squid-5.0.6/src/auth/negotiate/Makefile.am
--- squid-5.0.5/src/auth/negotiate/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/negotiate/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -15,10 +15,10 @@
 noinst_LTLIBRARIES = libnegotiate.la
 
 libnegotiate_la_SOURCES = \
-	Scheme.cc \
-	Scheme.h \
 	Config.cc \
 	Config.h \
+	Scheme.cc \
+	Scheme.h \
 	User.cc \
 	User.h \
 	UserRequest.cc \
diff -u -r -N squid-5.0.5/src/auth/negotiate/Makefile.in squid-5.0.6/src/auth/negotiate/Makefile.in
--- squid-5.0.5/src/auth/negotiate/Makefile.in	2021-02-08 13:40:46.000000000 +1300
+++ squid-5.0.6/src/auth/negotiate/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -164,7 +164,7 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libnegotiate_la_LIBADD =
-am_libnegotiate_la_OBJECTS = Scheme.lo Config.lo User.lo \
+am_libnegotiate_la_OBJECTS = Config.lo Scheme.lo User.lo \
 	UserRequest.lo
 libnegotiate_la_OBJECTS = $(am_libnegotiate_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -773,10 +773,10 @@
 EXTRA_DIST = helpers.m4
 noinst_LTLIBRARIES = libnegotiate.la
 libnegotiate_la_SOURCES = \
-	Scheme.cc \
-	Scheme.h \
 	Config.cc \
 	Config.h \
+	Scheme.cc \
+	Scheme.h \
 	User.cc \
 	User.h \
 	UserRequest.cc \
diff -u -r -N squid-5.0.5/src/auth/negotiate/wrapper/Makefile.am squid-5.0.6/src/auth/negotiate/wrapper/Makefile.am
--- squid-5.0.5/src/auth/negotiate/wrapper/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/negotiate/wrapper/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,7 @@
 
 libexec_PROGRAMS= negotiate_wrapper_auth
 
-negotiate_wrapper_auth_SOURCES= \
+negotiate_wrapper_auth_SOURCES = \
 	negotiate_wrapper.cc
 negotiate_wrapper_auth_LDADD= \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/ntlm/fake/Makefile.am squid-5.0.6/src/auth/ntlm/fake/Makefile.am
--- squid-5.0.5/src/auth/ntlm/fake/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/ntlm/fake/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -9,7 +9,7 @@
 
 libexec_PROGRAMS= ntlm_fake_auth
 
-ntlm_fake_auth_SOURCES= ntlm_fake_auth.cc
+ntlm_fake_auth_SOURCES = ntlm_fake_auth.cc
 ntlm_fake_auth_LDADD= \
 	$(top_builddir)/lib/ntlmauth/libntlmauth.la \
 	$(top_builddir)/lib/libmiscencoding.la \
diff -u -r -N squid-5.0.5/src/auth/ntlm/SSPI/Makefile.am squid-5.0.6/src/auth/ntlm/SSPI/Makefile.am
--- squid-5.0.5/src/auth/ntlm/SSPI/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/auth/ntlm/SSPI/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 man_MANS= ntlm_sspi_auth.8
 libexec_PROGRAMS= ntlm_sspi_auth
 
-ntlm_sspi_auth_SOURCES= ntlm_sspi_auth.cc
+ntlm_sspi_auth_SOURCES = ntlm_sspi_auth.cc
 ntlm_sspi_auth_LDADD= \
 	$(top_builddir)/lib/ntlmauth/libntlmauth.la \
 	$(top_builddir)/lib/libsspwin32.la \
diff -u -r -N squid-5.0.5/src/base/Makefile.am squid-5.0.6/src/base/Makefile.am
--- squid-5.0.5/src/base/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/base/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -20,8 +20,8 @@
 	AsyncJob.h \
 	AsyncJobCalls.h \
 	ByteCounter.h \
-	CbcPointer.h \
 	CbDataList.h \
+	CbcPointer.h \
 	CharacterSet.cc \
 	CharacterSet.h \
 	CodeContext.cc \
@@ -29,7 +29,6 @@
 	EnumIterator.h \
 	File.cc \
 	File.h \
-	forward.h \
 	HardFun.h \
 	Here.cc \
 	Here.h \
@@ -49,4 +48,6 @@
 	Subscription.h \
 	TextException.cc \
 	TextException.h \
-	YesNoNone.h
+	TypeTraits.h \
+	YesNoNone.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/base/Makefile.in squid-5.0.6/src/base/Makefile.in
--- squid-5.0.5/src/base/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/base/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -744,8 +744,8 @@
 	AsyncJob.h \
 	AsyncJobCalls.h \
 	ByteCounter.h \
-	CbcPointer.h \
 	CbDataList.h \
+	CbcPointer.h \
 	CharacterSet.cc \
 	CharacterSet.h \
 	CodeContext.cc \
@@ -753,7 +753,6 @@
 	EnumIterator.h \
 	File.cc \
 	File.h \
-	forward.h \
 	HardFun.h \
 	Here.cc \
 	Here.h \
@@ -773,7 +772,9 @@
 	Subscription.h \
 	TextException.cc \
 	TextException.h \
-	YesNoNone.h
+	TypeTraits.h \
+	YesNoNone.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/base/TextException.cc squid-5.0.6/src/base/TextException.cc
--- squid-5.0.5/src/base/TextException.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/base/TextException.cc	2021-05-10 21:02:34.000000000 +1200
@@ -59,12 +59,22 @@
 }
 
 std::ostream &
+operator <<(std::ostream &os, const TextException &ex)
+{
+    ex.print(os);
+    return os;
+}
+
+std::ostream &
 CurrentException(std::ostream &os)
 {
     if (std::current_exception()) {
         try {
             throw; // re-throw to recognize the exception type
         }
+        catch (const TextException &ex) {
+            os << ex; // optimization: this is a lot cheaper than what() below
+        }
         catch (const std::exception &ex) {
             os << ex.what();
         }
diff -u -r -N squid-5.0.5/src/base/TextException.h squid-5.0.6/src/base/TextException.h
--- squid-5.0.5/src/base/TextException.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/base/TextException.h	2021-05-10 21:02:34.000000000 +1200
@@ -51,22 +51,26 @@
 /// prints active (i.e., thrown but not yet handled) exception
 std::ostream &CurrentException(std::ostream &);
 
+/// efficiently prints TextException
+std::ostream &operator <<(std::ostream &, const TextException &);
+
 /// legacy convenience macro; it is not difficult to type Here() now
 #define TexcHere(msg) TextException((msg), Here())
 
 /// Like assert() but throws an exception instead of aborting the process
-/// and allows the caller to specify a custom exception message.
-#define Must2(condition, message) \
+/// and allows the caller to customize the exception message and location.
+/// \param description string literal describing the condition; what MUST happen
+#define Must3(condition, description, location) \
     do { \
         if (!(condition)) { \
-            const TextException Must_ex_((message), Here()); \
+            const TextException Must_ex_(("check failed: " description), (location)); \
             debugs(0, 3, Must_ex_.what()); \
             throw Must_ex_; \
         } \
     } while (/*CONSTCOND*/ false)
 
 /// Like assert() but throws an exception instead of aborting the process.
-#define Must(condition) Must2((condition), "check failed: " #condition)
+#define Must(condition) Must3((condition), #condition, Here())
 
 /// Reports and swallows all exceptions to prevent compiler warnings and runtime
 /// errors related to throwing class destructors. Should be used for most dtors.
diff -u -r -N squid-5.0.5/src/base/TypeTraits.h squid-5.0.6/src/base/TypeTraits.h
--- squid-5.0.5/src/base/TypeTraits.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/base/TypeTraits.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef SQUID_SRC_BASE_TYPETRAITS_H
+#define SQUID_SRC_BASE_TYPETRAITS_H
+
+namespace TypeTraits_ { // a hack to prevent "unintended ADL"
+
+// TODO: Extract reusable paradigms into other mixins (e.g., NonCopyable).
+/// convenience base for any class with pure virtual method(s)
+class Interface
+{
+public:
+    // ensures proper destruction via pointers to base interface classes
+    virtual ~Interface() = default;
+
+    // prohibits copy/move assignment to prevent accidental object slicing
+    Interface &operator=(const Interface &) = delete;
+    Interface &operator=(Interface &&) = delete;
+
+protected: // prevents accidental creation of Interface instances
+
+    // allows default-construction in kids
+    constexpr Interface() = default;
+
+    // allows copy/move construction for kids convenience
+    Interface(const Interface &) = default;
+    Interface(Interface &&) = default;
+};
+
+} // namespace TypeTraits_
+
+using Interface = TypeTraits_::Interface;
+
+#endif /* SQUID_SRC_BASE_TYPETRAITS_H */
+
diff -u -r -N squid-5.0.5/src/cache_manager.cc squid-5.0.6/src/cache_manager.cc
--- squid-5.0.5/src/cache_manager.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/cache_manager.cc	2021-05-10 21:02:34.000000000 +1200
@@ -15,6 +15,7 @@
 #include "comm/Connection.h"
 #include "Debug.h"
 #include "errorpage.h"
+#include "error/ExceptionErrorDetail.h"
 #include "fde.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
@@ -27,7 +28,9 @@
 #include "mgr/Forwarder.h"
 #include "mgr/FunAction.h"
 #include "mgr/QueryParams.h"
+#include "parser/Tokenizer.h"
 #include "protos.h"
+#include "sbuf/Stream.h"
 #include "sbuf/StringConvert.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
@@ -148,82 +151,87 @@
     return cmd->profile->creator->create(cmd);
 }
 
+static const CharacterSet &
+MgrFieldChars(const AnyP::ProtocolType &protocol)
+{
+    // Deprecated cache_object:// scheme used '@' to delimit passwords
+    if (protocol == AnyP::PROTO_CACHE_OBJECT) {
+        static const CharacterSet fieldChars = CharacterSet("cache-object-field", "@?#").complement();
+        return fieldChars;
+    }
+
+    static const CharacterSet actionChars = CharacterSet("mgr-field", "?#").complement();
+    return actionChars;
+}
+
 /**
- \ingroup CacheManagerInternal
  * define whether the URL is a cache-manager URL and parse the action
  * requested by the user. Checks via CacheManager::ActionProtection() that the
  * item is accessible by the user.
- \retval CacheManager::cachemgrStateData state object for the following handling
- \retval NULL if the action can't be found or can't be accessed by the user
+ *
+ * Syntax:
+ *
+ *  scheme "://" authority [ '/squid-internal-mgr' ] path-absolute [ '@' unreserved ] '?' query-string
+ *
+ * see RFC 3986 for definitions of scheme, authority, path-absolute, query-string
+ *
+ * \returns Mgr::Command object with action to perform and parameters it might use
  */
 Mgr::Command::Pointer
-CacheManager::ParseUrl(const char *url)
+CacheManager::ParseUrl(const AnyP::Uri &uri)
 {
-    int t;
-    LOCAL_ARRAY(char, host, MAX_URL);
-    LOCAL_ARRAY(char, request, MAX_URL);
-    LOCAL_ARRAY(char, password, MAX_URL);
-    LOCAL_ARRAY(char, params, MAX_URL);
-    host[0] = 0;
-    request[0] = 0;
-    password[0] = 0;
-    params[0] = 0;
-    int pos = -1;
-    int len = strlen(url);
-    Must(len > 0);
-    t = sscanf(url, "cache_object://%[^/]/%[^@?]%n@%[^?]?%s", host, request, &pos, password, params);
-    if (t < 3) {
-        t = sscanf(url, "cache_object://%[^/]/%[^?]%n?%s", host, request, &pos, params);
-    }
-    if (t < 1) {
-        t = sscanf(url, "http://%[^/]/squid-internal-mgr/%[^?]%n?%s", host, request, &pos, params);
-    }
-    if (t < 1) {
-        t = sscanf(url, "https://%[^/]/squid-internal-mgr/%[^?]%n?%s", host, request, &pos, params);
-    }
-    if (t < 2) {
-        if (strncmp("cache_object://",url,15)==0)
-            xstrncpy(request, "menu", MAX_URL);
-        else
-            xstrncpy(request, "index", MAX_URL);
-    }
+    Parser::Tokenizer tok(uri.path());
 
-#if _SQUID_OS2_
-    if (t == 2 && request[0] == '\0') {
-        /*
-         * emx's sscanf insists of returning 2 because it sets request
-         * to null
-         */
-        if (strncmp("cache_object://",url,15)==0)
-            xstrncpy(request, "menu", MAX_URL);
-        else
-            xstrncpy(request, "index", MAX_URL);
-    }
-#endif
+    static const SBuf internalMagicPrefix("/squid-internal-mgr/");
+    if (!tok.skip(internalMagicPrefix) && !tok.skip('/'))
+        throw TextException("invalid URL path", Here());
 
-    debugs(16, 3, HERE << "MGR request: t=" << t << ", host='" << host << "', request='" << request << "', pos=" << pos <<
-           ", password='" << password << "', params='" << params << "'");
+    Mgr::Command::Pointer cmd = new Mgr::Command();
+    cmd->params.httpUri = SBufToString(uri.absolute());
 
-    Mgr::ActionProfile::Pointer profile = findAction(request);
-    if (!profile) {
-        debugs(16, DBG_IMPORTANT, "CacheManager::ParseUrl: action '" << request << "' not found");
-        return NULL;
+    const auto &fieldChars = MgrFieldChars(uri.getScheme());
+
+    SBuf action;
+    if (!tok.prefix(action, fieldChars)) {
+        if (uri.getScheme() == AnyP::PROTO_CACHE_OBJECT) {
+            static const SBuf menuReport("menu");
+            action = menuReport;
+        } else {
+            static const SBuf indexReport("index");
+            action = indexReport;
+        }
     }
+    cmd->params.actionName = SBufToString(action);
+
+    const auto profile = findAction(action.c_str());
+    if (!profile)
+        throw TextException(ToSBuf("action '", action, "' not found"), Here());
 
     const char *prot = ActionProtection(profile);
-    if (!strcmp(prot, "disabled") || !strcmp(prot, "hidden")) {
-        debugs(16, DBG_IMPORTANT, "CacheManager::ParseUrl: action '" << request << "' is " << prot);
-        return NULL;
+    if (!strcmp(prot, "disabled") || !strcmp(prot, "hidden"))
+        throw TextException(ToSBuf("action '", action, "' is ", prot), Here());
+    cmd->profile = profile;
+
+    SBuf passwd;
+    if (uri.getScheme() == AnyP::PROTO_CACHE_OBJECT && tok.skip('@')) {
+        (void)tok.prefix(passwd, fieldChars);
+        cmd->params.password = SBufToString(passwd);
     }
 
-    Mgr::Command::Pointer cmd = new Mgr::Command;
-    if (!Mgr::QueryParams::Parse(params, cmd->params.queryParams))
-        return NULL;
-    cmd->profile = profile;
-    cmd->params.httpUri = url;
-    cmd->params.userName = String();
-    cmd->params.password = password;
-    cmd->params.actionName = request;
+    // TODO: fix when AnyP::Uri::parse() separates path?query#fragment
+    SBuf params;
+    if (tok.skip('?')) {
+        params = tok.remaining();
+        Mgr::QueryParams::Parse(tok, cmd->params.queryParams);
+    }
+
+    if (!tok.skip('#') && !tok.atEnd())
+        throw TextException("invalid characters in URL", Here());
+    // else ignore #fragment (if any)
+
+    debugs(16, 3, "MGR request: host=" << uri.host() << ", action=" << action <<
+           ", password=" << passwd << ", params=" << params);
+
     return cmd;
 }
 
@@ -306,12 +314,17 @@
 void
 CacheManager::start(const Comm::ConnectionPointer &client, HttpRequest *request, StoreEntry *entry, const AccessLogEntry::Pointer &ale)
 {
-    debugs(16, 3, "CacheManager::Start: '" << entry->url() << "'" );
+    debugs(16, 3, "request-url= '" << request->url << "', entry-url='" << entry->url() << "'");
+
+    Mgr::Command::Pointer cmd;
+    try {
+        cmd = ParseUrl(request->url);
 
-    Mgr::Command::Pointer cmd = ParseUrl(entry->url());
-    if (!cmd) {
+    } catch (...) {
+        debugs(16, 2, "request URL error: " << CurrentException);
         const auto err = new ErrorState(ERR_INVALID_URL, Http::scNotFound, request, ale);
         err->url = xstrdup(entry->url());
+        err->detailError(new ExceptionErrorDetail(Here().id()));
         errorAppendEntry(entry, err);
         entry->expires = squid_curtime;
         return;
@@ -474,4 +487,3 @@
     }
     return instance;
 }
-
diff -u -r -N squid-5.0.5/src/CacheManager.h squid-5.0.6/src/CacheManager.h
--- squid-5.0.5/src/CacheManager.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/CacheManager.h	2021-05-10 21:02:34.000000000 +1200
@@ -9,6 +9,7 @@
 #ifndef SQUID_CACHEMANAGER_H
 #define SQUID_CACHEMANAGER_H
 
+#include "anyp/forward.h"
 #include "comm/forward.h"
 #include "log/forward.h"
 #include "mgr/Action.h"
@@ -51,7 +52,7 @@
 protected:
     CacheManager() {} ///< use Instance() instead
 
-    Mgr::CommandPointer ParseUrl(const char *url);
+    Mgr::CommandPointer ParseUrl(const AnyP::Uri &);
     void ParseHeaders(const HttpRequest * request, Mgr::ActionParams &params);
     int CheckPassword(const Mgr::Command &cmd);
     char *PasswdGet(Mgr::ActionPasswordList *, const char *);
diff -u -r -N squid-5.0.5/src/cbdata.cc squid-5.0.6/src/cbdata.cc
--- squid-5.0.5/src/cbdata.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/cbdata.cc	2021-05-10 21:02:34.000000000 +1200
@@ -16,6 +16,7 @@
 #include "Store.h"
 
 #include <climits>
+#include <cstddef>
 
 #if USE_CBDATA_DEBUG
 #include <algorithm>
@@ -46,8 +47,6 @@
 
 #endif
 
-#define OFFSET_OF(TYPE, MEMBER) ((size_t) &(((TYPE) *)0)->(MEMBER))
-
 /**
  * Manage a set of registered callback data pointers.
  * One of the easiest ways to make Squid coredump is to issue a
@@ -91,6 +90,15 @@
     {}
     ~cbdata();
 
+    static cbdata *FromUserData(const void *p) {
+#if WITH_VALGRIND
+        return cbdata_htable.at(p);
+#else
+        const auto t = static_cast<const char *>(p) - offsetof(cbdata, data);
+        return reinterpret_cast<cbdata *>(const_cast<char *>(t));
+#endif
+    }
+
     int valid;
     int32_t locks;
     cbdata_type type;
@@ -116,25 +124,14 @@
 
 #if !WITH_VALGRIND
     size_t dataSize() const { return sizeof(data);}
-    static long MakeOffset();
-    static const long Offset;
 #endif
     /* MUST be the last per-instance member */
     void *data;
 };
 
-const long cbdata::Cookie((long)0xDEADBEEF);
-#if !WITH_VALGRIND
-const long cbdata::Offset(MakeOffset());
+static_assert(std::is_standard_layout<cbdata>::value, "the behavior of offsetof(cbdata) is defined");
 
-long
-cbdata::MakeOffset()
-{
-    cbdata *zero = (cbdata *)0L;
-    void **dataOffset = &zero->data;
-    return (long)dataOffset;
-}
-#endif
+const long cbdata::Cookie((long)0xDEADBEEF);
 
 static OBJH cbdataDump;
 #if USE_CBDATA_DEBUG
@@ -186,8 +183,7 @@
     snprintf(label, strlen(name) + 20, "cbdata %s (%d)", name, (int) type);
 
 #if !WITH_VALGRIND
-    assert((size_t)cbdata::Offset == (sizeof(cbdata) - ((cbdata *)NULL)->dataSize()));
-    size += cbdata::Offset;
+    size += offsetof(cbdata, data);
 #endif
 
     cbdata_index[type].pool = memPoolCreate(label, size);
@@ -297,12 +293,7 @@
 void *
 cbdataInternalFree(void *p, const char *file, int line)
 {
-    cbdata *c;
-#if WITH_VALGRIND
-    c = cbdata_htable.at(p);
-#else
-    c = (cbdata *) (((char *) p) - cbdata::Offset);
-#endif
+    auto *c = cbdata::FromUserData(p);
 #if USE_CBDATA_DEBUG
     debugs(45, 3, p << " " << file << ":" << line);
 #else
@@ -333,16 +324,10 @@
 cbdataInternalLock(const void *p)
 #endif
 {
-    cbdata *c;
-
     if (p == NULL)
         return;
 
-#if WITH_VALGRIND
-    c = cbdata_htable.at(p);
-#else
-    c = (cbdata *) (((char *) p) - cbdata::Offset);
-#endif
+    auto *c = cbdata::FromUserData(p);
 
 #if USE_CBDATA_DEBUG
     debugs(45, 3, p << "=" << (c ? c->locks + 1 : -1) << " " << file << ":" << line);
@@ -365,16 +350,10 @@
 cbdataInternalUnlock(const void *p)
 #endif
 {
-    cbdata *c;
-
     if (p == NULL)
         return;
 
-#if WITH_VALGRIND
-    c = cbdata_htable.at(p);
-#else
-    c = (cbdata *) (((char *) p) - cbdata::Offset);
-#endif
+    auto *c = cbdata::FromUserData(p);
 
 #if USE_CBDATA_DEBUG
     debugs(45, 3, p << "=" << (c ? c->locks - 1 : -1) << " " << file << ":" << line);
@@ -411,18 +390,12 @@
 int
 cbdataReferenceValid(const void *p)
 {
-    cbdata *c;
-
     if (p == NULL)
         return 1;       /* A NULL pointer cannot become invalid */
 
     debugs(45, 9, p);
 
-#if WITH_VALGRIND
-    c = cbdata_htable.at(p);
-#else
-    c = (cbdata *) (((char *) p) - cbdata::Offset);
-#endif
+    const auto c = cbdata::FromUserData(p);
 
     c->check(__LINE__);
 
@@ -502,7 +475,7 @@
 #if WITH_VALGRIND
             int obj_size = pool->objectSize();
 #else
-            int obj_size = pool->objectSize() - cbdata::Offset;
+            int obj_size = pool->objectSize() - offsetof(cbdata, data);
 #endif
             storeAppendPrintf(sentry, "%s\t%d\t%ld\t%ld\n", pool->objectType() + 7, obj_size, (long int)pool->getMeter().inuse.currentLevel(), (long int)obj_size * pool->getMeter().inuse.currentLevel());
         }
diff -u -r -N squid-5.0.5/src/cf.data.pre squid-5.0.6/src/cf.data.pre
--- squid-5.0.5/src/cf.data.pre	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/cf.data.pre	2021-05-10 21:02:34.000000000 +1200
@@ -84,7 +84,7 @@
 	files using the syntax:
 		parameters("/path/filename")
 	For example:
-		acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
+		acl allowlist dstdomain parameters("/etc/squid/allowlist.txt")
 
   Conditional configuration
 
@@ -2455,7 +2455,7 @@
 
 	   require-proxy-header
 			Require PROXY protocol version 1 or 2 connections.
-			The proxy_protocol_access is required to whitelist
+			The proxy_protocol_access is required to permit
 			downstream proxies which can be trusted.
 
 	   worker-queues
diff -u -r -N squid-5.0.5/src/clients/Client.cc squid-5.0.6/src/clients/Client.cc
--- squid-5.0.5/src/clients/Client.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/clients/Client.cc	2021-05-10 21:02:34.000000000 +1200
@@ -14,7 +14,7 @@
 #include "comm/Connection.h"
 #include "comm/forward.h"
 #include "comm/Write.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
 #include "errorpage.h"
 #include "fd.h"
 #include "HttpHdrContRange.h"
@@ -520,8 +520,11 @@
     maybePurgeOthers();
 
     // adaptation may overwrite old offset computed using the virgin response
-    const bool partial = theFinalReply->contentRange();
-    currentOffset = partial ? theFinalReply->contentRange()->spec.offset : 0;
+    currentOffset = 0;
+    if (const auto cr = theFinalReply->contentRange()) {
+        if (cr->spec.offset != HttpHdrRangeSpec::UnknownPosition)
+            currentOffset = cr->spec.offset;
+    }
 }
 
 /// whether to prevent caching of an otherwise cachable response
@@ -869,15 +872,18 @@
     if (entry->isEmpty()) {
         debugs(11,8, "adaptation failure with an empty entry: " << *entry);
         const auto err = new ErrorState(ERR_ICAP_FAILURE, Http::scInternalServerError, request.getRaw(), fwd->al);
-        err->detailError(ERR_DETAIL_ICAP_RESPMOD_EARLY);
+        static const auto d = MakeNamedErrorDetail("ICAP_RESPMOD_EARLY");
+        err->detailError(d);
         fwd->fail(err);
         fwd->dontRetry(true);
         abortAll("adaptation failure with an empty entry");
         return true; // handled
     }
 
-    if (request) // update logged info directly
-        request->detailError(ERR_ICAP_FAILURE, ERR_DETAIL_ICAP_RESPMOD_LATE);
+    if (request) { // update logged info directly
+        static const auto d = MakeNamedErrorDetail("ICAP_RESPMOD_LATE");
+        request->detailError(ERR_ICAP_FAILURE, d);
+    }
 
     return false; // the caller must handle
 }
@@ -892,8 +898,10 @@
         return;
 
     if (!entry->isEmpty()) { // too late to block (should not really happen)
-        if (request)
-            request->detailError(ERR_ICAP_FAILURE, ERR_DETAIL_RESPMOD_BLOCK_LATE);
+        if (request) {
+            static const auto d = MakeNamedErrorDetail("RESPMOD_BLOCK_LATE");
+            request->detailError(ERR_ICAP_FAILURE, d);
+        }
         abortAll("late adaptation block");
         return;
     }
@@ -906,7 +914,8 @@
         page_id = ERR_ACCESS_DENIED;
 
     const auto err = new ErrorState(page_id, Http::scForbidden, request.getRaw(), fwd->al);
-    err->detailError(ERR_DETAIL_RESPMOD_BLOCK_EARLY);
+    static const auto d = MakeNamedErrorDetail("RESPMOD_BLOCK_EARLY");
+    err->detailError(d);
     fwd->fail(err);
     fwd->dontRetry(true);
 
diff -u -r -N squid-5.0.5/src/clients/FtpClient.cc squid-5.0.6/src/clients/FtpClient.cc
--- squid-5.0.5/src/clients/FtpClient.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/clients/FtpClient.cc	2021-05-10 21:02:34.000000000 +1200
@@ -16,11 +16,14 @@
 #include "comm/Read.h"
 #include "comm/TcpAcceptor.h"
 #include "comm/Write.h"
+#include "error/SysErrorDetail.h"
 #include "errorpage.h"
 #include "fd.h"
 #include "ftp/Parsing.h"
 #include "http/Stream.h"
 #include "ip/tools.h"
+#include "sbuf/SBuf.h"
+#include "sbuf/Stream.h"
 #include "SquidConfig.h"
 #include "SquidString.h"
 #include "StatCounters.h"
@@ -64,6 +67,20 @@
     return ret;
 }
 
+/* Ftp::ErrorDetail */
+
+SBuf
+Ftp::ErrorDetail::brief() const
+{
+    return ToSBuf("FTP_REPLY_CODE=", completionCode);
+}
+
+SBuf
+Ftp::ErrorDetail::verbose(const HttpRequest::Pointer &) const
+{
+    return ToSBuf("FTP reply with completion code ", completionCode);
+}
+
 /* Ftp::Channel */
 
 /// configures the channel with a descriptor and registers a close handler
@@ -285,7 +302,7 @@
         ftperr->ftp.reply = xstrdup(reply);
 
     if (!err) {
-        fwd->request->detailError(error, xerrno);
+        fwd->request->detailError(error, SysErrorDetail::NewIfAny(xerrno));
         fwd->fail(ftperr);
         closeServer(); // we failed, so no serverComplete()
     }
diff -u -r -N squid-5.0.5/src/clients/FtpClient.h squid-5.0.6/src/clients/FtpClient.h
--- squid-5.0.5/src/clients/FtpClient.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/clients/FtpClient.h	2021-05-10 21:02:34.000000000 +1200
@@ -12,6 +12,7 @@
 #define SQUID_FTP_CLIENT_H
 
 #include "clients/Client.h"
+#include "error/Detail.h"
 
 class String;
 namespace Ftp
@@ -19,6 +20,24 @@
 
 extern const char *const crlf;
 
+/// Holds FTP server reply error code
+/// Squid needs to interpret internally FTP reply codes and respond with
+/// custom error (eg in the case of Ftp::Gateway), however still we need
+/// to log the exact FTP server error reply code as the reason of error.
+class ErrorDetail: public ::ErrorDetail {
+    MEMPROXY_CLASS(Ftp::ErrorDetail);
+
+public:
+    explicit ErrorDetail(const int code): completionCode(code) {}
+
+    /* ErrorDetail API */
+    virtual SBuf brief() const override;
+    virtual SBuf verbose(const HttpRequestPointer &) const override;
+
+private:
+    int completionCode; ///< FTP reply completion code
+};
+
 /// Common code for FTP server control and data channels.
 /// Does not own the channel descriptor, which is managed by Ftp::Client.
 class Channel
diff -u -r -N squid-5.0.5/src/clients/FtpGateway.cc squid-5.0.6/src/clients/FtpGateway.cc
--- squid-5.0.5/src/clients/FtpGateway.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/clients/FtpGateway.cc	2021-05-10 21:02:34.000000000 +1200
@@ -2433,8 +2433,8 @@
 
     Http::StatusCode sc = ftpState->failedHttpStatus(error_code);
     const auto ftperr = new ErrorState(error_code, sc, ftpState->fwd->request, ftpState->fwd->al);
-    ftpState->failed(error_code, code, ftperr);
-    ftperr->detailError(code);
+    ftpState->failed(error_code, 0, ftperr);
+    ftperr->detailError(new Ftp::ErrorDetail(code));
     HttpReply *newrep = ftperr->BuildHttpReply();
     delete ftperr;
 
@@ -2514,8 +2514,7 @@
     else
         err.ftp.reply = xstrdup("");
 
-    // TODO: interpret as FTP-specific error code
-    err.detailError(code);
+    err.detailError(new Ftp::ErrorDetail(code));
 
     ftpState->entry->replaceHttpReply(err.BuildHttpReply());
 
diff -u -r -N squid-5.0.5/src/clients/FtpRelay.cc squid-5.0.6/src/clients/FtpRelay.cc
--- squid-5.0.5/src/clients/FtpRelay.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/clients/FtpRelay.cc	2021-05-10 21:02:34.000000000 +1200
@@ -14,6 +14,7 @@
 #include "client_side.h"
 #include "clients/forward.h"
 #include "clients/FtpClient.h"
+#include "error/SysErrorDetail.h"
 #include "ftp/Elements.h"
 #include "ftp/Parsing.h"
 #include "http/Stream.h"
@@ -298,7 +299,7 @@
     const Http::StatusCode httpStatus = failedHttpStatus(error);
     HttpReply *const reply = createHttpReply(httpStatus);
     entry->replaceHttpReply(reply);
-    fwd->request->detailError(error, xerrno);
+    fwd->request->detailError(error, SysErrorDetail::NewIfAny(xerrno));
 }
 
 void
diff -u -r -N squid-5.0.5/src/client_side.cc squid-5.0.6/src/client_side.cc
--- squid-5.0.5/src/client_side.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/client_side.cc	2021-05-10 21:02:34.000000000 +1200
@@ -76,6 +76,7 @@
 #include "comm/TcpAcceptor.h"
 #include "comm/Write.h"
 #include "CommCalls.h"
+#include "error/ExceptionErrorDetail.h"
 #include "errorpage.h"
 #include "fd.h"
 #include "fde.h"
@@ -105,6 +106,8 @@
 #include "profiler/Profiler.h"
 #include "proxyp/Header.h"
 #include "proxyp/Parser.h"
+#include "sbuf/Stream.h"
+#include "security/Io.h"
 #include "security/NegotiationHistory.h"
 #include "servers/forward.h"
 #include "SquidConfig.h"
@@ -175,7 +178,6 @@
 static void clientListenerConnectionOpened(AnyP::PortCfgPointer &s, const Ipc::FdNoteId portTypeNote, const Subscription::Pointer &sub);
 
 static IOACB httpAccept;
-static CTCB clientLifetimeTimeout;
 #if USE_IDENT
 static IDCB clientIdentDone;
 #endif
@@ -315,7 +317,7 @@
 {
     clientUpdateStatCounters(logType);
 
-    if (request->errType != ERR_NONE)
+    if (request->error)
         ++ statCounter.client_http.errors;
 
     clientUpdateStatHistCounters(logType,
@@ -372,8 +374,7 @@
     // TODO: avoid losses by keeping these stats in a shared history object?
     if (aLogEntry->request) {
         aLogEntry->request->dnsWait = request->dnsWait;
-        aLogEntry->request->errType = request->errType;
-        aLogEntry->request->errDetail = request->errDetail;
+        aLogEntry->request->error = request->error;
     }
 }
 
@@ -586,21 +587,38 @@
 }
 #endif
 
+void
+ConnStateData::resetReadTimeout(const time_t timeout)
+{
+    typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
+    AsyncCall::Pointer callback = JobCallback(33, 5, TimeoutDialer, this, ConnStateData::requestTimeout);
+    commSetConnTimeout(clientConnection, timeout, callback);
+}
+
+void
+ConnStateData::extendLifetime()
+{
+    typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
+    AsyncCall::Pointer callback = JobCallback(5, 4, TimeoutDialer, this, ConnStateData::lifetimeTimeout);
+    commSetConnTimeout(clientConnection, Config.Timeout.lifetime, callback);
+}
+
 // cleans up before destructor is called
 void
 ConnStateData::swanSong()
 {
     debugs(33, 2, HERE << clientConnection);
-    checkLogging();
 
     flags.readMore = false;
     clientdbEstablished(clientConnection->remote, -1);  /* decrement */
-    pipeline.terminateAll(0);
+
+    terminateAll(ERR_NONE, LogTagsErrors());
+    checkLogging();
 
     // XXX: Closing pinned conn is too harsh: The Client may want to continue!
     unpinConnection(true);
 
-    Server::swanSong(); // closes the client connection
+    Server::swanSong();
 
 #if USE_AUTH
     // NP: do this bit after closing the connections to avoid side effects from unwanted TCP RST
@@ -610,6 +628,31 @@
     flags.swanSang = true;
 }
 
+void
+ConnStateData::callException(const std::exception &ex)
+{
+    Server::callException(ex); // logs ex and stops the job
+
+    ErrorDetail::Pointer errorDetail;
+    if (const auto tex = dynamic_cast<const TextException*>(&ex))
+        errorDetail = new ExceptionErrorDetail(tex->id());
+    else
+        errorDetail = new ExceptionErrorDetail(Here().id());
+    updateError(ERR_GATEWAY_FAILURE, errorDetail);
+}
+
+void
+ConnStateData::updateError(const Error &error)
+{
+    if (const auto context = pipeline.front()) {
+        const auto http = context->http;
+        assert(http);
+        http->updateError(error);
+    } else {
+        bareError.update(error);
+    }
+}
+
 bool
 ConnStateData::isOpen() const
 {
@@ -735,8 +778,8 @@
  * warning: assumes that HTTP headers for individual ranges at the
  *          time of the actuall assembly will be exactly the same as
  *          the headers when clientMRangeCLen() is called */
-int
-ClientHttpRequest::mRangeCLen()
+int64_t
+ClientHttpRequest::mRangeCLen() const
 {
     int64_t clen = 0;
     MemBuf mb;
@@ -864,10 +907,7 @@
     /**
      * Set the timeout BEFORE calling readSomeData().
      */
-    typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
-    AsyncCall::Pointer timeoutCall = JobCallback(33, 5,
-                                     TimeoutDialer, this, ConnStateData::requestTimeout);
-    commSetConnTimeout(clientConnection, clientConnection->timeLeft(idleTimeout()), timeoutCall);
+    resetReadTimeout(clientConnection->timeLeft(idleTimeout()));
 
     readSomeData();
     /** Please don't do anything with the FD past here! */
@@ -1413,21 +1453,22 @@
 }
 
 bool
-ConnStateData::connFinishedWithConn(int size)
+ConnStateData::shouldCloseOnEof() const
 {
-    if (size == 0) {
-        if (pipeline.empty() && inBuf.isEmpty()) {
-            /* no current or pending requests */
-            debugs(33, 4, HERE << clientConnection << " closed");
-            return true;
-        } else if (!Config.onoff.half_closed_clients) {
-            /* admin doesn't want to support half-closed client sockets */
-            debugs(33, 3, HERE << clientConnection << " aborted (half_closed_clients disabled)");
-            pipeline.terminateAll(0);
-            return true;
-        }
+    if (pipeline.empty() && inBuf.isEmpty()) {
+        debugs(33, 4, "yes, without active requests and unparsed input");
+        return true;
+    }
+
+    if (!Config.onoff.half_closed_clients) {
+        debugs(33, 3, "yes, without half_closed_clients");
+        return true;
     }
 
+    // Squid currently tries to parse (possibly again) a partially received
+    // request after an EOF with half_closed_clients. To give that last parse in
+    // afterClientRead() a chance, we ignore partially parsed requests here.
+    debugs(33, 3, "no, honoring half_closed_clients");
     return false;
 }
 
@@ -1487,7 +1528,7 @@
         repContext->setReplyToStoreEntry(sslServerBump->entry, "delayed SslBump error");
 
         // Get error details from the fake certificate-peeking request.
-        http->request->detailError(sslServerBump->request->errType, sslServerBump->request->errDetail);
+        http->request->error.update(sslServerBump->request->error);
         context->pullData();
         return true;
     }
@@ -1524,10 +1565,10 @@
                 // Create an error object and fill it
                 const auto err = new ErrorState(ERR_SECURE_CONNECT_FAIL, Http::scServiceUnavailable, request, http->al);
                 err->src_addr = clientConnection->remote;
-                Ssl::ErrorDetail *errDetail = new Ssl::ErrorDetail(
+                const Security::ErrorDetail::Pointer errDetail = new Security::ErrorDetail(
                     SQUID_X509_V_ERR_DOMAIN_MISMATCH,
-                    srvCert.get(), nullptr);
-                err->detail = errDetail;
+                    srvCert, nullptr);
+                updateError(ERR_SECURE_CONNECT_FAIL, errDetail);
                 repContext->setReplyToError(request->method, err);
                 assert(context->http->out.offset == 0);
                 context->pullData();
@@ -1755,6 +1796,20 @@
     clientProcessRequestFinished(conn, request);
 }
 
+void
+ConnStateData::add(const Http::StreamPointer &context)
+{
+    debugs(33, 3, context << " to " << pipeline.count() << '/' << pipeline.nrequests);
+    if (bareError) {
+        debugs(33, 5, "assigning " << bareError);
+        assert(context);
+        assert(context->http);
+        context->http->updateError(bareError);
+        bareError.clear();
+    }
+    pipeline.add(context);
+}
+
 int
 ConnStateData::pipelinePrefetchMax() const
 {
@@ -1873,11 +1928,7 @@
         return;
 
     receivedFirstByte_ = true;
-    // Set timeout to Config.Timeout.request
-    typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
-    AsyncCall::Pointer timeoutCall =  JobCallback(33, 5,
-                                      TimeoutDialer, this, ConnStateData::requestTimeout);
-    commSetConnTimeout(clientConnection, Config.Timeout.request, timeoutCall);
+    resetReadTimeout(Config.Timeout.request);
 }
 
 /**
@@ -1924,11 +1975,7 @@
 
         if (Http::StreamPointer context = parseOneRequest()) {
             debugs(33, 5, clientConnection << ": done parsing a request");
-
-            AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "clientLifetimeTimeout",
-                                             CommTimeoutCbPtrFun(clientLifetimeTimeout, context->http));
-            commSetConnTimeout(clientConnection, Config.Timeout.lifetime, timeoutCall);
-
+            extendLifetime();
             context->registerWithConn();
 
 #if USE_OPENSSL
@@ -1973,14 +2020,9 @@
     if (!clientParseRequests()) {
         if (!isOpen())
             return;
-        /*
-         * If the client here is half closed and we failed
-         * to parse a request, close the connection.
-         * The above check with connFinishedWithConn() only
-         * succeeds _if_ the buffer is empty which it won't
-         * be if we have an incomplete request.
-         * XXX: This duplicates ConnStateData::kick
-         */
+        // We may get here if the client half-closed after sending a partial
+        // request. See doClientRead() and shouldCloseOnEof().
+        // XXX: This partially duplicates ConnStateData::kick().
         if (pipeline.empty() && commIsHalfClosed(clientConnection->fd)) {
             debugs(33, 5, clientConnection << ": half-closed connection, no completed request parsed, connection closing.");
             clientConnection->close();
@@ -2148,6 +2190,7 @@
         return;
 
     const err_type error = receivedFirstByte_ ? ERR_REQUEST_PARSE_TIMEOUT : ERR_REQUEST_START_TIMEOUT;
+    updateError(error);
     if (tunnelOnError(HttpRequestMethod(), error))
         return;
 
@@ -2163,16 +2206,15 @@
     io.conn->close();
 }
 
-static void
-clientLifetimeTimeout(const CommTimeoutCbParams &io)
+void
+ConnStateData::lifetimeTimeout(const CommTimeoutCbParams &io)
 {
-    ClientHttpRequest *http = static_cast<ClientHttpRequest *>(io.data);
-    debugs(33, DBG_IMPORTANT, "WARNING: Closing client connection due to lifetime timeout");
-    debugs(33, DBG_IMPORTANT, "\t" << http->uri);
-    if (const auto conn = http->getConn())
-        conn->pipeline.terminateAll(ETIMEDOUT);
-    if (Comm::IsConnOpen(io.conn))
-        io.conn->close();
+    debugs(33, DBG_IMPORTANT, "WARNING: Closing client connection due to lifetime timeout" <<
+           Debug::Extra << "connection: " << io.conn);
+
+    LogTagsErrors lte;
+    lte.timedout = true;
+    terminateAll(ERR_LIFETIME_EXP, lte);
 }
 
 ConnStateData::ConnStateData(const MasterXaction::Pointer &xact) :
@@ -2339,93 +2381,32 @@
     return false;
 }
 
-/**
- *
- * \retval 1 on success
- * \retval 0 when needs more data
- * \retval -1 on error
- */
-static int
-tlsAttemptHandshake(ConnStateData *conn, PF *callback)
-{
-    // TODO: maybe throw instead of returning -1
-    // see https://github.com/squid-cache/squid/pull/81#discussion_r153053278
-    int fd = conn->clientConnection->fd;
-    auto session = fd_table[fd].ssl.get();
-
-    errno = 0;
-
-#if USE_OPENSSL
-    const auto ret = SSL_accept(session);
-    if (ret > 0)
-        return 1;
-
-    const int xerrno = errno;
-    const auto ssl_error = SSL_get_error(session, ret);
-
-    switch (ssl_error) {
-
-    case SSL_ERROR_WANT_READ:
-        Comm::SetSelect(fd, COMM_SELECT_READ, callback, (callback ? conn : nullptr), 0);
-        return 0;
-
-    case SSL_ERROR_WANT_WRITE:
-        Comm::SetSelect(fd, COMM_SELECT_WRITE, callback, (callback ? conn : nullptr), 0);
-        return 0;
-
-    case SSL_ERROR_SYSCALL:
-        if (ret == 0) {
-            debugs(83, 2, "Error negotiating SSL connection on FD " << fd << ": Aborted by client: " << ssl_error);
-        } else {
-            debugs(83, (xerrno == ECONNRESET) ? 1 : 2, "Error negotiating SSL connection on FD " << fd << ": " <<
-                   (xerrno == 0 ? Security::ErrorString(ssl_error) : xstrerr(xerrno)));
-        }
-        break;
-
-    case SSL_ERROR_ZERO_RETURN:
-        debugs(83, DBG_IMPORTANT, "Error negotiating SSL connection on FD " << fd << ": Closed by client");
-        break;
-
-    default:
-        debugs(83, DBG_IMPORTANT, "Error negotiating SSL connection on FD " <<
-               fd << ": " << Security::ErrorString(ssl_error) <<
-               " (" << ssl_error << "/" << ret << ")");
-    }
-
-#elif USE_GNUTLS
-
-    const auto x = gnutls_handshake(session);
-    if (x == GNUTLS_E_SUCCESS)
-        return 1;
-
-    if (gnutls_error_is_fatal(x)) {
-        debugs(83, 2, "Error negotiating TLS on " << conn->clientConnection << ": Aborted by client: " << Security::ErrorString(x));
-
-    } else if (x == GNUTLS_E_INTERRUPTED || x == GNUTLS_E_AGAIN) {
-        const auto ioAction = (gnutls_record_get_direction(session)==0 ? COMM_SELECT_READ : COMM_SELECT_WRITE);
-        Comm::SetSelect(fd, ioAction, callback, (callback ? conn : nullptr), 0);
-        return 0;
-    }
-
-#else
-    // Performing TLS handshake should never be reachable without a TLS/SSL library.
-    (void)session; // avoid compiler and static analysis complaints
-    fatal("FATAL: HTTPS not supported by this Squid.");
-#endif
-
-    return -1;
-}
-
 /** negotiate an SSL connection */
 static void
 clientNegotiateSSL(int fd, void *data)
 {
     ConnStateData *conn = (ConnStateData *)data;
 
-    const int ret = tlsAttemptHandshake(conn, clientNegotiateSSL);
-    if (ret <= 0) {
-        if (ret < 0) // An error
-            conn->clientConnection->close();
+    const auto handshakeResult = Security::Accept(*conn->clientConnection);
+    switch (handshakeResult.category) {
+    case Security::IoResult::ioSuccess:
+        break;
+
+    case Security::IoResult::ioWantRead:
+        Comm::SetSelect(conn->clientConnection->fd, COMM_SELECT_READ, clientNegotiateSSL, conn, 0);
+        return;
+
+    case Security::IoResult::ioWantWrite:
+        Comm::SetSelect(conn->clientConnection->fd, COMM_SELECT_WRITE, clientNegotiateSSL, conn, 0);
+        return;
+
+    case Security::IoResult::ioError:
+        debugs(83, (handshakeResult.important ? DBG_IMPORTANT : 2), "ERROR: " << handshakeResult.errorDescription <<
+               " while accepting a TLS connection on " << conn->clientConnection << ": " << handshakeResult.errorDetail);
+        // TODO: No ConnStateData::tunnelOnError() on this forward-proxy code
+        // path because we cannot know the intended connection target?
+        conn->updateError(ERR_SECURE_ACCEPT_FAIL, handshakeResult.errorDetail);
+        conn->clientConnection->close();
         return;
     }
 
@@ -2501,6 +2482,15 @@
     debugs(83, 2, "Client certificate requesting not yet implemented.");
 #endif
 
+    // If we are called, then bumped CONNECT has succeeded. Finalize it.
+    if (auto xact = conn->pipeline.front()) {
+        if (xact->http && xact->http->request && xact->http->request->method == Http::METHOD_CONNECT)
+            xact->finished();
+        // cannot proceed with encryption if requests wait for plain responses
+        Must(conn->pipeline.empty());
+    }
+    /* careful: finished() above frees request, host, etc. */
+
     conn->readSomeData();
 }
 
@@ -2517,10 +2507,7 @@
     if (!ctx || !httpsCreate(connState, ctx))
         return;
 
-    typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
-    AsyncCall::Pointer timeoutCall = JobCallback(33, 5, TimeoutDialer,
-                                     connState, ConnStateData::requestTimeout);
-    commSetConnTimeout(details, Config.Timeout.request, timeoutCall);
+    connState->resetReadTimeout(Config.Timeout.request);
 
     Comm::SetSelect(details->fd, COMM_SELECT_READ, clientNegotiateSSL, connState, 0);
 }
@@ -2622,6 +2609,7 @@
         acl_checklist->al->cache.port = port;
         acl_checklist->al->cache.caddr = log_addr;
         acl_checklist->al->proxyProtocolHeader = proxyProtocolHeader_;
+        acl_checklist->al->updateError(bareError);
         HTTPMSGUNLOCK(acl_checklist->al->request);
         acl_checklist->al->request = request;
         HTTPMSGLOCK(acl_checklist->al->request);
@@ -2798,15 +2786,6 @@
 void
 ConnStateData::getSslContextStart()
 {
-    // If we are called, then CONNECT has succeeded. Finalize it.
-    if (auto xact = pipeline.front()) {
-        if (xact->http && xact->http->request && xact->http->request->method == Http::METHOD_CONNECT)
-            xact->finished();
-        // cannot proceed with encryption if requests wait for plain responses
-        Must(pipeline.empty());
-    }
-    /* careful: finished() above frees request, host, etc. */
-
     if (port->secure.generateHostCertificates) {
         Ssl::CertificateProperties certProperties;
         buildSslCertGenerationParams(certProperties);
@@ -2889,10 +2868,7 @@
     // bumped intercepted conns should already have Config.Timeout.request set
     // but forwarded connections may only have Config.Timeout.lifetime. [Re]set
     // to make sure the connection does not get stuck on non-SSL clients.
-    typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
-    AsyncCall::Pointer timeoutCall = JobCallback(33, 5, TimeoutDialer,
-                                     this, ConnStateData::requestTimeout);
-    commSetConnTimeout(clientConnection, Config.Timeout.request, timeoutCall);
+    resetReadTimeout(Config.Timeout.request);
 
     switchedToHttps_ = true;
 
@@ -2941,10 +2917,7 @@
 
     // commSetConnTimeout() was called for this request before we switched.
     // Fix timeout to request_start_timeout
-    typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
-    AsyncCall::Pointer timeoutCall =  JobCallback(33, 5,
-                                      TimeoutDialer, this, ConnStateData::requestTimeout);
-    commSetConnTimeout(clientConnection, Config.Timeout.request_start_timeout, timeoutCall);
+    resetReadTimeout(Config.Timeout.request_start_timeout);
     // Also reset receivedFirstByte_ flag to allow this timeout work in the case we have
     // a bumbed "connect" request on non transparent port.
     receivedFirstByte_ = false;
@@ -2969,7 +2942,9 @@
     receivedFirstByte();
     fd_note(clientConnection->fd, "Parsing TLS handshake");
 
-    bool unsupportedProtocol = false;
+    // stops being nil if we fail to parse the handshake
+    ErrorDetail::Pointer parseErrorDetails;
+
     try {
         if (!tlsParser.parseHello(inBuf)) {
             // need more data to finish parsing
@@ -2977,9 +2952,14 @@
             return;
         }
     }
-    catch (const std::exception &ex) {
-        debugs(83, 2, "error on FD " << clientConnection->fd << ": " << ex.what());
-        unsupportedProtocol = true;
+    catch (const TextException &ex) {
+        debugs(83, 2, "exception: " << ex);
+        parseErrorDetails = new ExceptionErrorDetail(ex.id());
+    }
+    catch (...) {
+        debugs(83, 2, "exception: " << CurrentException);
+        static const auto d = MakeNamedErrorDetail("TLS_ACCEPT_PARSE");
+        parseErrorDetails = d;
     }
 
     parsingTlsHandshake = false;
@@ -3000,13 +2980,12 @@
     // We should disable read/write handlers
     Comm::ResetSelect(clientConnection->fd);
 
-    if (unsupportedProtocol) {
+    if (parseErrorDetails) {
         Http::StreamPointer context = pipeline.front();
         Must(context && context->http);
         HttpRequest::Pointer request = context->http->request;
         debugs(83, 5, "Got something other than TLS Client Hello. Cannot SslBump.");
-        sslBumpMode = Ssl::bumpSplice;
-        context->http->al->ssl.bumpMode = Ssl::bumpSplice;
+        updateError(ERR_PROTOCOL_UNKNOWN, parseErrorDetails);
         if (!clientTunnelOnError(this, context, request, HttpRequestMethod(), ERR_PROTOCOL_UNKNOWN))
             clientConnection->close();
         return;
@@ -3130,17 +3109,15 @@
     bio->setReadBufData(inBuf);
     bio->hold(true);
 
-    // Here squid should have all of the client hello message so the
-    // tlsAttemptHandshake() should return 0.
-    // This block exist only to force openSSL parse client hello and detect
-    // ERR_SECURE_ACCEPT_FAIL error, which should be checked and splice if required.
-    if (tlsAttemptHandshake(this, nullptr) < 0) {
-        debugs(83, 2, "TLS handshake failed.");
-        HttpRequest::Pointer request(http ? http->request : nullptr);
-        if (!clientTunnelOnError(this, context, request, HttpRequestMethod(), ERR_SECURE_ACCEPT_FAIL))
-            clientConnection->close();
-        return;
-    }
+    // We have successfully parsed client Hello, but our TLS handshake parser is
+    // forgiving. Now we use a TLS library to parse the same bytes, so that we
+    // can honor on_unsupported_protocol if needed. If there are no errors, we
+    // expect Security::Accept() to ask us to write (our) TLS server Hello. We
+    // also allow an ioWantRead result in case some fancy TLS extension that
+    // Squid does not yet understand requires reading post-Hello client bytes.
+    const auto handshakeResult = Security::Accept(*clientConnection);
+    if (!handshakeResult.wantsIo())
+        return handleSslBumpHandshakeError(handshakeResult);
 
     // We need to reset inBuf here, to be used by incoming requests in the case
     // of SSL bump
@@ -3150,6 +3127,43 @@
     FwdState::Start(clientConnection, sslServerBump->entry, sslServerBump->request.getRaw(), http ? http->al : NULL);
 }
 
+/// process a problematic Security::Accept() result on the SslBump code path
+void
+ConnStateData::handleSslBumpHandshakeError(const Security::IoResult &handshakeResult)
+{
+    auto errCategory = ERR_NONE;
+
+    switch (handshakeResult.category) {
+    case Security::IoResult::ioSuccess: {
+        static const auto d = MakeNamedErrorDetail("TLS_ACCEPT_UNEXPECTED_SUCCESS");
+        updateError(errCategory = ERR_GATEWAY_FAILURE, d);
+        break;
+    }
+
+    case Security::IoResult::ioWantRead: {
+        static const auto d = MakeNamedErrorDetail("TLS_ACCEPT_UNEXPECTED_READ");
+        updateError(errCategory = ERR_GATEWAY_FAILURE, d);
+        break;
+    }
+
+    case Security::IoResult::ioWantWrite: {
+        static const auto d = MakeNamedErrorDetail("TLS_ACCEPT_UNEXPECTED_WRITE");
+        updateError(errCategory = ERR_GATEWAY_FAILURE, d);
+        break;
+    }
+
+    case Security::IoResult::ioError:
+        debugs(83, (handshakeResult.important ? DBG_IMPORTANT : 2), "ERROR: " << handshakeResult.errorDescription <<
+               " while SslBump-accepting a TLS connection on " << clientConnection << ": " << handshakeResult.errorDetail);
+        updateError(errCategory = ERR_SECURE_ACCEPT_FAIL, handshakeResult.errorDetail);
+        break;
+
+    }
+
+    if (!tunnelOnError(HttpRequestMethod(), errCategory))
+        clientConnection->close();
+}
+
 void
 ConnStateData::doPeekAndSpliceStep()
 {
@@ -3207,7 +3221,13 @@
         connectHost = clientConnection->local.toStr(ip, sizeof(ip));
         connectPort = clientConnection->local.port();
     } else {
+        // Typical cases are malformed HTTP requests on http_port and malformed
+        // TLS handshakes on non-bumping https_port. TODO: Discover these
+        // problems earlier so that they can be classified/detailed better.
         debugs(33, 2, "Not able to compute URL, abort request tunneling for " << reason);
+        // TODO: throw when nonBlockingCheck() callbacks gain job protections
+        static const auto d = MakeNamedErrorDetail("TUNNEL_TARGET");
+        updateError(ERR_INVALID_REQ, d);
         return false;
     }
 
@@ -3268,11 +3288,7 @@
 
     stream->flags.parsed_ok = 1; // Do we need it?
     stream->mayUseConnection(true);
-
-    AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "clientLifetimeTimeout",
-                                     CommTimeoutCbPtrFun(clientLifetimeTimeout, stream->http));
-    commSetConnTimeout(clientConnection, Config.Timeout.lifetime, timeoutCall);
-
+    extendLifetime();
     stream->registerWithConn();
 
     MasterXaction::Pointer mx = new MasterXaction(XactionInitiator::initClient);
@@ -3985,21 +4001,45 @@
 }
 
 void
-ConnStateData::checkLogging()
+ConnStateData::terminateAll(const Error &error, const LogTagsErrors &lte)
 {
-    // if we are parsing request body, its request is responsible for logging
-    if (bodyPipe)
-        return;
+    debugs(33, 3, pipeline.count() << '/' << pipeline.nrequests << " after " << error);
 
-    // a request currently using this connection is responsible for logging
-    if (!pipeline.empty() && pipeline.back()->mayUseConnection())
-        return;
+    if (pipeline.empty()) {
+        bareError.update(error); // XXX: bareLogTagsErrors
+    } else {
+        // We terminate the current CONNECT/PUT/etc. context below, logging any
+        // error details, but that context may leave unparsed bytes behind.
+        // Consume them to stop checkLogging() from logging them again later.
+        const auto intputToConsume =
+#if USE_OPENSSL
+            parsingTlsHandshake ? "TLS handshake" : // more specific than CONNECT
+#endif
+            bodyPipe ? "HTTP request body" :
+            pipeline.back()->mayUseConnection() ? "HTTP CONNECT" :
+            nullptr;
 
-    /* Either we are waiting for the very first transaction, or
-     * we are done with the Nth transaction and are waiting for N+1st.
-     * XXX: We assume that if anything was added to inBuf, then it could
-     * only be consumed by actions already covered by the above checks.
-     */
+        while (const auto context = pipeline.front()) {
+            context->noteIoError(error, lte);
+            context->finished(); // cleanup and self-deregister
+            assert(context != pipeline.front());
+        }
+
+        if (intputToConsume && !inBuf.isEmpty()) {
+            debugs(83, 5, "forgetting client " << intputToConsume << " bytes: " << inBuf.length());
+            inBuf.clear();
+        }
+    }
+
+    clientConnection->close();
+}
+
+/// log the last (attempt at) transaction if nobody else did
+void
+ConnStateData::checkLogging()
+{
+    // to simplify our logic, we assume that terminateAll() has been called
+    assert(pipeline.empty());
 
     // do not log connections that closed after a transaction (it is normal)
     // TODO: access_log needs ACLs to match received-no-bytes connections
@@ -4011,6 +4051,7 @@
     http.req_sz = inBuf.length();
     // XXX: Or we died while waiting for the pinned connection to become idle.
     http.setErrorUri("error:transaction-end-before-headers");
+    http.updateError(bareError);
 }
 
 bool
diff -u -r -N squid-5.0.5/src/client_side.h squid-5.0.6/src/client_side.h
--- squid-5.0.5/src/client_side.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/client_side.h	2021-05-10 21:02:34.000000000 +1200
@@ -11,9 +11,11 @@
 #ifndef SQUID_CLIENTSIDE_H
 #define SQUID_CLIENTSIDE_H
 
+#include "acl/forward.h"
 #include "base/RunnersRegistry.h"
 #include "clientStreamForward.h"
 #include "comm.h"
+#include "error/Error.h"
 #include "helper/forward.h"
 #include "http/forward.h"
 #include "HttpControlMsg.h"
@@ -26,6 +28,7 @@
 #include "auth/UserRequest.h"
 #endif
 #if USE_OPENSSL
+#include "security/forward.h"
 #include "security/Handshake.h"
 #include "ssl/support.h"
 #endif
@@ -157,6 +160,11 @@
     /// note response sending error and close as soon as we read the request
     void stopSending(const char *error);
 
+    /// (re)sets timeout for receiving more bytes from the client
+    void resetReadTimeout(time_t timeout);
+    /// (re)sets client_lifetime timeout
+    void extendLifetime();
+
     void expectNoForwarding(); ///< cleans up virgin request [body] forwarding state
 
     /* BodyPipe API */
@@ -220,11 +228,13 @@
     void clientReadFtpData(const CommIoCbParams &io);
     void connStateClosed(const CommCloseCbParams &io);
     void requestTimeout(const CommTimeoutCbParams &params);
+    void lifetimeTimeout(const CommTimeoutCbParams &params);
 
     // AsyncJob API
     virtual void start();
     virtual bool doneAll() const { return BodyProducer::doneAll() && false;}
     virtual void swanSong();
+    virtual void callException(const std::exception &);
 
     /// Changes state so that we close the connection and quit after serving
     /// the client-side-detected error response instead of getting stuck.
@@ -293,6 +303,9 @@
 #endif
     char *prepareTlsSwitchingURL(const Http1::RequestParserPointer &hp);
 
+    /// registers a newly created stream
+    void add(const Http::StreamPointer &context);
+
     /// handle a control message received by context from a peer and call back
     virtual bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) = 0;
 
@@ -341,6 +354,17 @@
 
     const ProxyProtocol::HeaderPointer &proxyProtocolHeader() const { return proxyProtocolHeader_; }
 
+    /// if necessary, stores new error information (if any)
+    void updateError(const Error &);
+
+    /// emplacement/convenience wrapper for updateError(const Error &)
+    void updateError(const err_type c, const ErrorDetailPointer &d) { updateError(Error(c, d)); }
+
+    // Exposed to be accessible inside the ClientHttpRequest constructor.
+    // TODO: Remove. Make sure there is always a suitable ALE instead.
+    /// a problem that occurred without a request (e.g., while parsing headers)
+    Error bareError;
+
 protected:
     void startDechunkingRequest();
     void finishDechunkingRequest(bool withSuccess);
@@ -393,8 +417,10 @@
 
 private:
     /* ::Server API */
-    virtual bool connFinishedWithConn(int size);
-    virtual void checkLogging();
+    virtual void terminateAll(const Error &, const LogTagsErrors &);
+    virtual bool shouldCloseOnEof() const;
+
+    void checkLogging();
 
     void clientAfterReadingRequests();
     bool concurrentRequestQueueFilled() const;
@@ -413,6 +439,7 @@
     /// Attempts to add a given TLS context to the cache, replacing the old
     /// same-key context, if any
     void storeTlsContextToCache(const SBuf &cacheKey, Security::ContextPointer &ctx);
+    void handleSslBumpHandshakeError(const Security::IoResult &);
 #endif
 
     /// whether PROXY protocol header is still expected
diff -u -r -N squid-5.0.5/src/client_side_reply.cc squid-5.0.6/src/client_side_reply.cc
--- squid-5.0.5/src/client_side_reply.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/client_side_reply.cc	2021-05-10 21:02:34.000000000 +1200
@@ -1574,7 +1574,7 @@
 #endif
 
     const bool maySendChunkedReply = !request->multipartRangeRequest() &&
-                                     reply->sline.protocol == AnyP::PROTO_HTTP && // response is HTTP
+                                     reply->sline.version.protocol == AnyP::PROTO_HTTP && // response is HTTP
                                      (request->http_ver >= Http::ProtocolVersion(1,1));
 
     /* Check whether we should send keep-alive */
@@ -1658,7 +1658,7 @@
 
     http->al->reply = reply;
 
-    if (reply->sline.protocol == AnyP::PROTO_HTTP) {
+    if (reply->sline.version.protocol == AnyP::PROTO_HTTP) {
         /* RFC 2616 requires us to advertise our version (but only on real HTTP traffic) */
         reply->sline.version = Http::ProtocolVersion();
     }
diff -u -r -N squid-5.0.5/src/client_side_request.cc squid-5.0.6/src/client_side_request.cc
--- squid-5.0.5/src/client_side_request.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/client_side_request.cc	2021-05-10 21:02:34.000000000 +1200
@@ -28,7 +28,7 @@
 #include "clientStream.h"
 #include "comm/Connection.h"
 #include "comm/Write.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
 #include "errorpage.h"
 #include "fd.h"
 #include "fde.h"
@@ -157,7 +157,7 @@
     maxReplyBodySize_(0),
     entry_(NULL),
     loggingEntry_(NULL),
-    conn_(NULL)
+    conn_(cbdataReference(aConn))
 #if USE_OPENSSL
     , sslBumpNeed_(Ssl::bumpEnd)
 #endif
@@ -166,7 +166,6 @@
     , request_satisfaction_offset(0)
 #endif
 {
-    setConn(aConn);
     al = new AccessLogEntry;
     CodeContext::Reset(al);
     al->cache.start_time = current_time;
@@ -175,6 +174,7 @@
         al->cache.port = aConn->port;
         al->cache.caddr = aConn->log_addr;
         al->proxyProtocolHeader = aConn->proxyProtocolHeader();
+        al->updateError(aConn->bareError);
 
 #if USE_OPENSSL
         if (aConn->clientConnection != NULL && aConn->clientConnection->isOpen()) {
@@ -285,7 +285,7 @@
     loggingEntry(NULL);
 
     if (request)
-        checkFailureRatio(request->errType, al->hier.code);
+        checkFailureRatio(request->error.category, al->hier.code);
 
     freeResources();
 
@@ -1088,9 +1088,6 @@
              * iter up at this point.
              */
             node->readBuffer.offset = request->range->lowestOffset(0);
-            http->range_iter.pos = request->range->begin();
-            http->range_iter.end = request->range->end();
-            http->range_iter.valid = true;
         }
     }
 
@@ -1208,7 +1205,8 @@
     switch (reply.result) {
     case Helper::TimedOut:
         if (Config.onUrlRewriteTimeout.action != toutActBypass) {
-            http->calloutsError(ERR_GATEWAY_FAILURE, ERR_DETAIL_REDIRECTOR_TIMEDOUT);
+            static const auto d = MakeNamedErrorDetail("REDIRECTOR_TIMEDOUT");
+            http->calloutsError(ERR_GATEWAY_FAILURE, d);
             debugs(85, DBG_IMPORTANT, "ERROR: URL rewrite helper: Timedout");
         }
         break;
@@ -1622,6 +1620,15 @@
 
 #endif
 
+void
+ClientHttpRequest::updateError(const Error &error)
+{
+    if (request)
+        request->error.update(error);
+    else
+        al->updateError(error);
+}
+
 bool
 ClientHttpRequest::gotEnough() const
 {
@@ -1947,6 +1954,30 @@
     al->setVirginUrlForMissingRequest(errorUri);
 }
 
+// XXX: This should not be a _request_ method. Move range_iter elsewhere.
+int64_t
+ClientHttpRequest::prepPartialResponseGeneration()
+{
+    assert(request);
+    assert(request->range);
+
+    range_iter.pos = request->range->begin();
+    range_iter.end = request->range->end();
+    range_iter.debt_size = 0;
+    const auto multipart = request->range->specs.size() > 1;
+    if (multipart)
+        range_iter.boundary = rangeBoundaryStr();
+    range_iter.valid = true; // TODO: Remove.
+    range_iter.updateSpec(); // TODO: Refactor to initialize rather than update.
+
+    assert(range_iter.pos != range_iter.end);
+    const auto &firstRange = *range_iter.pos;
+    assert(firstRange);
+    out.offset = firstRange->offset;
+
+    return multipart ? mRangeCLen() : firstRange->length;
+}
+
 #if USE_ADAPTATION
 /// Initiate an asynchronous adaptation transaction which will call us back.
 void
@@ -1979,10 +2010,12 @@
         handleAdaptationBlock(answer);
         break;
 
-    case Adaptation::Answer::akError:
-        handleAdaptationFailure(ERR_DETAIL_CLT_REQMOD_ABORT, !answer.final);
+    case Adaptation::Answer::akError: {
+        static const auto d = MakeNamedErrorDetail("CLT_REQMOD_ABORT");
+        handleAdaptationFailure(d, !answer.final);
         break;
     }
+    }
 }
 
 void
@@ -2033,7 +2066,8 @@
 void
 ClientHttpRequest::handleAdaptationBlock(const Adaptation::Answer &answer)
 {
-    request->detailError(ERR_ACCESS_DENIED, ERR_DETAIL_REQMOD_BLOCK);
+    static const auto d = MakeNamedErrorDetail("REQMOD_BLOCK");
+    request->detailError(ERR_ACCESS_DENIED, d);
     AclMatchedName = answer.ruleId.termedBuf();
     assert(calloutContext);
     calloutContext->clientAccessCheckDone(ACCESS_DENIED);
@@ -2114,17 +2148,19 @@
 
     debugs(85,3, HERE << "REQMOD body production failed");
     if (request_satisfaction_mode) { // too late to recover or serve an error
-        request->detailError(ERR_ICAP_FAILURE, ERR_DETAIL_CLT_REQMOD_RESP_BODY);
+        static const auto d = MakeNamedErrorDetail("CLT_REQMOD_RESP_BODY");
+        request->detailError(ERR_ICAP_FAILURE, d);
         const Comm::ConnectionPointer c = getConn()->clientConnection;
         Must(Comm::IsConnOpen(c));
         c->close(); // drastic, but we may be writing a response already
     } else {
-        handleAdaptationFailure(ERR_DETAIL_CLT_REQMOD_REQ_BODY);
+        static const auto d = MakeNamedErrorDetail("CLT_REQMOD_REQ_BODY");
+        handleAdaptationFailure(d);
     }
 }
 
 void
-ClientHttpRequest::handleAdaptationFailure(int errDetail, bool bypassable)
+ClientHttpRequest::handleAdaptationFailure(const ErrorDetail::Pointer &errDetail, bool bypassable)
 {
     debugs(85,3, HERE << "handleAdaptationFailure(" << bypassable << ")");
 
@@ -2170,7 +2206,7 @@
 
 // XXX: modify and use with ClientRequestContext::clientAccessCheckDone too.
 void
-ClientHttpRequest::calloutsError(const err_type error, const int errDetail)
+ClientHttpRequest::calloutsError(const err_type error, const ErrorDetail::Pointer &errDetail)
 {
     // The original author of the code also wanted to pass an errno to
     // setReplyToError, but it seems unlikely that the errno reflects the
diff -u -r -N squid-5.0.5/src/client_side_request.h squid-5.0.6/src/client_side_request.h
--- squid-5.0.5/src/client_side_request.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/client_side_request.h	2021-05-10 21:02:34.000000000 +1200
@@ -65,12 +65,6 @@
     ConnStateData * getConn() const {
         return (cbdataReferenceValid(conn_) ? conn_ : nullptr);
     }
-    void setConn(ConnStateData *aConn) {
-        if (conn_ != aConn) {
-            cbdataReferenceDone(conn_);
-            conn_ = cbdataReference(aConn);
-        }
-    }
 
     /// Initializes the current request with the virgin request.
     /// Call this method when the virgin request becomes known.
@@ -149,7 +143,7 @@
 
     dlink_node active;
     dlink_list client_stream;
-    int mRangeCLen();
+    int64_t mRangeCLen() const;
 
     ClientRequestContext *calloutContext;
     void doCallouts();
@@ -166,8 +160,16 @@
     /// neither the current request nor the parsed request URI are known
     void setErrorUri(const char *errorUri);
 
+    /// Prepares to satisfy a Range request with a generated HTTP 206 response.
+    /// Initializes range_iter state to allow raw range_iter access.
+    /// \returns Content-Length value for the future response; never negative
+    int64_t prepPartialResponseGeneration();
+
     /// Build an error reply. For use with the callouts.
-    void calloutsError(const err_type error, const int errDetail);
+    void calloutsError(const err_type error, const ErrorDetail::Pointer &errDetail);
+
+    /// if necessary, stores new error information (if any)
+    void updateError(const Error &error);
 
 #if USE_ADAPTATION
     // AsyncJob virtual methods
@@ -216,7 +218,7 @@
 private:
     /// Handles an adaptation client request failure.
     /// Bypasses the error if possible, or build an error reply.
-    void handleAdaptationFailure(int errDetail, bool bypassable = false);
+    void handleAdaptationFailure(const ErrorDetail::Pointer &errDetail, bool bypassable = false);
 
     // Adaptation::Initiator API
     virtual void noteAdaptationAnswer(const Adaptation::Answer &answer);
diff -u -r -N squid-5.0.5/src/comm/Makefile.am squid-5.0.6/src/comm/Makefile.am
--- squid-5.0.5/src/comm/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/comm/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,7 @@
 noinst_LTLIBRARIES = libcomm.la
 
 ## Library holding comm socket handlers
-libcomm_la_SOURCES= \
+libcomm_la_SOURCES = \
 	AcceptLimiter.cc \
 	AcceptLimiter.h \
 	ConnOpener.cc \
@@ -19,7 +19,6 @@
 	Connection.cc \
 	Connection.h \
 	Flag.h \
-	forward.h \
 	IoCallback.cc \
 	IoCallback.h \
 	Loops.h \
@@ -36,5 +35,5 @@
 	UdpOpenDialer.h \
 	Write.cc \
 	Write.h \
-	\
-	comm_internal.h
+	comm_internal.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/comm/Makefile.in squid-5.0.6/src/comm/Makefile.in
--- squid-5.0.5/src/comm/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/comm/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -744,7 +744,6 @@
 	Connection.cc \
 	Connection.h \
 	Flag.h \
-	forward.h \
 	IoCallback.cc \
 	IoCallback.h \
 	Loops.h \
@@ -761,8 +760,8 @@
 	UdpOpenDialer.h \
 	Write.cc \
 	Write.h \
-	\
-	comm_internal.h
+	comm_internal.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/comm/Read.cc squid-5.0.6/src/comm/Read.cc
--- squid-5.0.5/src/comm/Read.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/comm/Read.cc	2021-05-10 21:02:34.000000000 +1200
@@ -101,6 +101,7 @@
     } else if (retval == 0) { // remote closure (somewhat less) common
         // Note - read 0 == socket EOF, which is a valid read.
         params.flag = Comm::ENDFILE;
+        params.size = 0;
 
     } else if (retval < 0) { // connection errors are worst-case
         debugs(5, 3, params.conn << " Comm::COMM_ERROR: " << xstrerr(params.xerrno));
@@ -108,6 +109,7 @@
             params.flag =  Comm::INPROGRESS;
         else
             params.flag =  Comm::COMM_ERROR;
+        params.size = 0;
     }
 
     return params.flag;
diff -u -r -N squid-5.0.5/src/comm/TcpAcceptor.cc squid-5.0.6/src/comm/TcpAcceptor.cc
--- squid-5.0.5/src/comm/TcpAcceptor.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/comm/TcpAcceptor.cc	2021-05-10 21:02:34.000000000 +1200
@@ -382,7 +382,13 @@
     }
 
     Must(sock >= 0);
+
+    // Sync with Comm ASAP so that abandoned details can properly close().
+    // XXX : these are not all HTTP requests. use a note about type and ip:port details->
+    // so we end up with a uniform "(HTTP|FTP-data|HTTPS|...) remote-ip:remote-port"
+    fd_open(sock, FD_SOCKET, "HTTP Request");
     details->fd = sock;
+
     details->remote = *gai;
 
     // lookup the local-end details of this new connection
@@ -426,11 +432,6 @@
         }
     }
 
-    /* fdstat update */
-    // XXX : these are not all HTTP requests. use a note about type and ip:port details->
-    // so we end up with a uniform "(HTTP|FTP-data|HTTPS|...) remote-ip:remote-port"
-    fd_open(sock, FD_SOCKET, "HTTP Request");
-
     fde *F = &fd_table[sock];
     details->remote.toStr(F->ipaddr,MAX_IPSTRLEN);
     F->remote_port = details->remote.port();
diff -u -r -N squid-5.0.5/src/DiskIO/AIO/Makefile.am squid-5.0.6/src/DiskIO/AIO/Makefile.am
--- squid-5.0.5/src/DiskIO/AIO/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/DiskIO/AIO/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,13 +11,13 @@
 noinst_LTLIBRARIES = libAIO.la
 
 libAIO_la_SOURCES = \
-	async_io.h \
 	AIODiskFile.cc \
 	AIODiskFile.h \
 	AIODiskIOModule.cc \
 	AIODiskIOModule.h \
 	AIODiskIOStrategy.cc \
-	AIODiskIOStrategy.h
+	AIODiskIOStrategy.h \
+	async_io.h
 
 if ENABLE_WIN32_AIO
 libAIO_la_SOURCES += \
diff -u -r -N squid-5.0.5/src/DiskIO/AIO/Makefile.in squid-5.0.6/src/DiskIO/AIO/Makefile.in
--- squid-5.0.5/src/DiskIO/AIO/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/src/DiskIO/AIO/Makefile.in	2021-05-10 22:57:52.000000000 +1200
@@ -168,9 +168,9 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libAIO_la_LIBADD =
-am__libAIO_la_SOURCES_DIST = async_io.h AIODiskFile.cc AIODiskFile.h \
+am__libAIO_la_SOURCES_DIST = AIODiskFile.cc AIODiskFile.h \
 	AIODiskIOModule.cc AIODiskIOModule.h AIODiskIOStrategy.cc \
-	AIODiskIOStrategy.h aio_win32.cc aio_win32.h
+	AIODiskIOStrategy.h async_io.h aio_win32.cc aio_win32.h
 @ENABLE_WIN32_AIO_TRUE@am__objects_1 = aio_win32.lo
 am_libAIO_la_OBJECTS = AIODiskFile.lo AIODiskIOModule.lo \
 	AIODiskIOStrategy.lo $(am__objects_1)
@@ -738,9 +738,9 @@
 COMPAT_LIB = $(top_builddir)/compat/libcompatsquid.la $(LIBPROFILER)
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libAIO.la
-libAIO_la_SOURCES = async_io.h AIODiskFile.cc AIODiskFile.h \
-	AIODiskIOModule.cc AIODiskIOModule.h AIODiskIOStrategy.cc \
-	AIODiskIOStrategy.h $(am__append_2)
+libAIO_la_SOURCES = AIODiskFile.cc AIODiskFile.h AIODiskIOModule.cc \
+	AIODiskIOModule.h AIODiskIOStrategy.cc AIODiskIOStrategy.h \
+	async_io.h $(am__append_2)
 @ENABLE_WIN32_AIO_FALSE@EXTRA_DIST = \
 @ENABLE_WIN32_AIO_FALSE@	aio_win32.cc \
 @ENABLE_WIN32_AIO_FALSE@	aio_win32.h
diff -u -r -N squid-5.0.5/src/DiskIO/DiskDaemon/Makefile.am squid-5.0.6/src/DiskIO/DiskDaemon/Makefile.am
--- squid-5.0.5/src/DiskIO/DiskDaemon/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/DiskIO/DiskDaemon/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -12,15 +12,15 @@
 libexec_PROGRAMS = diskd
 
 libDiskDaemon_la_SOURCES = \
-	diomsg.h \
+	DiskDaemonDiskIOModule.cc \
+	DiskDaemonDiskIOModule.h \
 	DiskdAction.cc \
 	DiskdAction.h \
 	DiskdFile.cc \
 	DiskdFile.h \
 	DiskdIOStrategy.cc \
 	DiskdIOStrategy.h \
-	DiskDaemonDiskIOModule.cc \
-	DiskDaemonDiskIOModule.h
+	diomsg.h
 
 diskd_SOURCES = diskd.cc
 nodist_diskd_SOURCES = time.cc
diff -u -r -N squid-5.0.5/src/DiskIO/DiskDaemon/Makefile.in squid-5.0.6/src/DiskIO/DiskDaemon/Makefile.in
--- squid-5.0.5/src/DiskIO/DiskDaemon/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/src/DiskIO/DiskDaemon/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -168,8 +168,8 @@
 PROGRAMS = $(libexec_PROGRAMS)
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libDiskDaemon_la_LIBADD =
-am_libDiskDaemon_la_OBJECTS = DiskdAction.lo DiskdFile.lo \
-	DiskdIOStrategy.lo DiskDaemonDiskIOModule.lo
+am_libDiskDaemon_la_OBJECTS = DiskDaemonDiskIOModule.lo DiskdAction.lo \
+	DiskdFile.lo DiskdIOStrategy.lo
 libDiskDaemon_la_OBJECTS = $(am_libDiskDaemon_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -748,15 +748,15 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libDiskDaemon.la
 libDiskDaemon_la_SOURCES = \
-	diomsg.h \
+	DiskDaemonDiskIOModule.cc \
+	DiskDaemonDiskIOModule.h \
 	DiskdAction.cc \
 	DiskdAction.h \
 	DiskdFile.cc \
 	DiskdFile.h \
 	DiskdIOStrategy.cc \
 	DiskdIOStrategy.h \
-	DiskDaemonDiskIOModule.cc \
-	DiskDaemonDiskIOModule.h
+	diomsg.h
 
 diskd_SOURCES = diskd.cc
 nodist_diskd_SOURCES = time.cc
diff -u -r -N squid-5.0.5/src/DiskIO/DiskThreads/Makefile.am squid-5.0.6/src/DiskIO/DiskThreads/Makefile.am
--- squid-5.0.5/src/DiskIO/DiskThreads/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/DiskIO/DiskThreads/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,6 @@
 noinst_LTLIBRARIES = libDiskThreads.la
 
 libDiskThreads_la_SOURCES = \
-	async_io.cc \
 	CommIO.cc \
 	CommIO.h \
 	DiskThreads.h \
@@ -20,7 +19,8 @@
 	DiskThreadsDiskIOModule.cc \
 	DiskThreadsDiskIOModule.h \
 	DiskThreadsIOStrategy.cc \
-	DiskThreadsIOStrategy.h
+	DiskThreadsIOStrategy.h \
+	async_io.cc
 
 if ENABLE_WIN32_AIOPS
 libDiskThreads_la_SOURCES += aiops_win32.cc
diff -u -r -N squid-5.0.5/src/DiskIO/DiskThreads/Makefile.in squid-5.0.6/src/DiskIO/DiskThreads/Makefile.in
--- squid-5.0.5/src/DiskIO/DiskThreads/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/src/DiskIO/DiskThreads/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -166,16 +166,16 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libDiskThreads_la_LIBADD =
-am__libDiskThreads_la_SOURCES_DIST = async_io.cc CommIO.cc CommIO.h \
-	DiskThreads.h DiskThreadsDiskFile.cc DiskThreadsDiskFile.h \
+am__libDiskThreads_la_SOURCES_DIST = CommIO.cc CommIO.h DiskThreads.h \
+	DiskThreadsDiskFile.cc DiskThreadsDiskFile.h \
 	DiskThreadsDiskIOModule.cc DiskThreadsDiskIOModule.h \
-	DiskThreadsIOStrategy.cc DiskThreadsIOStrategy.h \
+	DiskThreadsIOStrategy.cc DiskThreadsIOStrategy.h async_io.cc \
 	aiops_win32.cc aiops.cc
 @ENABLE_WIN32_AIOPS_TRUE@am__objects_1 = aiops_win32.lo
 @ENABLE_WIN32_AIOPS_FALSE@am__objects_2 = aiops.lo
-am_libDiskThreads_la_OBJECTS = async_io.lo CommIO.lo \
-	DiskThreadsDiskFile.lo DiskThreadsDiskIOModule.lo \
-	DiskThreadsIOStrategy.lo $(am__objects_1) $(am__objects_2)
+am_libDiskThreads_la_OBJECTS = CommIO.lo DiskThreadsDiskFile.lo \
+	DiskThreadsDiskIOModule.lo DiskThreadsIOStrategy.lo \
+	async_io.lo $(am__objects_1) $(am__objects_2)
 libDiskThreads_la_OBJECTS = $(am_libDiskThreads_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -742,10 +742,10 @@
 COMPAT_LIB = $(top_builddir)/compat/libcompatsquid.la $(LIBPROFILER)
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libDiskThreads.la
-libDiskThreads_la_SOURCES = async_io.cc CommIO.cc CommIO.h \
-	DiskThreads.h DiskThreadsDiskFile.cc DiskThreadsDiskFile.h \
+libDiskThreads_la_SOURCES = CommIO.cc CommIO.h DiskThreads.h \
+	DiskThreadsDiskFile.cc DiskThreadsDiskFile.h \
 	DiskThreadsDiskIOModule.cc DiskThreadsDiskIOModule.h \
-	DiskThreadsIOStrategy.cc DiskThreadsIOStrategy.h \
+	DiskThreadsIOStrategy.cc DiskThreadsIOStrategy.h async_io.cc \
 	$(am__append_2) $(am__append_3)
 @ENABLE_WIN32_AIOPS_FALSE@EXTRA_DIST = aiops_win32.cc
 @ENABLE_WIN32_AIOPS_TRUE@EXTRA_DIST = aiops.cc
diff -u -r -N squid-5.0.5/src/DiskIO/IpcIo/IpcIoFile.cc squid-5.0.6/src/DiskIO/IpcIo/IpcIoFile.cc
--- squid-5.0.5/src/DiskIO/IpcIo/IpcIoFile.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/DiskIO/IpcIo/IpcIoFile.cc	2021-05-10 21:02:34.000000000 +1200
@@ -23,6 +23,7 @@
 #include "ipc/Messages.h"
 #include "ipc/Port.h"
 #include "ipc/Queue.h"
+#include "ipc/StrandCoord.h"
 #include "ipc/StrandSearch.h"
 #include "ipc/UdsOp.h"
 #include "sbuf/SBuf.h"
@@ -122,20 +123,13 @@
 
         queue->localRateLimit().store(config.ioRate);
 
-        Ipc::HereIamMessage ann(Ipc::StrandCoord(KidIdentifier, myPid));
-        ann.strand.tag = dbName;
-        Ipc::TypedMsgHdr message;
-        ann.pack(message);
-        SendMessage(Ipc::Port::CoordinatorAddr(), message);
+        Ipc::StrandMessage::NotifyCoordinator(Ipc::mtRegisterStrand, dbName.termedBuf());
 
         ioRequestor->ioCompletedNotification();
         return;
     }
 
-    Ipc::StrandSearchRequest request;
-    request.requestorId = KidIdentifier;
-    request.tag = dbName;
-
+    const Ipc::StrandSearchRequest request(dbName);
     Ipc::TypedMsgHdr msg;
     request.pack(msg);
     Ipc::SendMessage(Ipc::Port::CoordinatorAddr(), msg);
@@ -147,7 +141,7 @@
 }
 
 void
-IpcIoFile::openCompleted(const Ipc::StrandSearchResponse *const response)
+IpcIoFile::openCompleted(const Ipc::StrandMessage *const response)
 {
     Must(diskId < 0); // we do not know our disker yet
 
@@ -434,7 +428,7 @@
 
 /// called when coordinator responds to worker open request
 void
-IpcIoFile::HandleOpenResponse(const Ipc::StrandSearchResponse &response)
+IpcIoFile::HandleOpenResponse(const Ipc::StrandMessage &response)
 {
     debugs(47, 7, HERE << "coordinator response to open request");
     for (IpcIoFileList::iterator i = WaitingForOpen.begin();
diff -u -r -N squid-5.0.5/src/DiskIO/IpcIo/IpcIoFile.h squid-5.0.6/src/DiskIO/IpcIo/IpcIoFile.h
--- squid-5.0.5/src/DiskIO/IpcIo/IpcIoFile.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/DiskIO/IpcIo/IpcIoFile.h	2021-05-10 21:02:34.000000000 +1200
@@ -82,7 +82,7 @@
     virtual bool ioInProgress() const;
 
     /// handle open response from coordinator
-    static void HandleOpenResponse(const Ipc::StrandSearchResponse &response);
+    static void HandleOpenResponse(const Ipc::StrandMessage &);
 
     /// handle queue push notifications from worker or disker
     static void HandleNotification(const Ipc::TypedMsgHdr &msg);
@@ -91,7 +91,7 @@
 
 protected:
     friend class IpcIoPendingRequest;
-    void openCompleted(const Ipc::StrandSearchResponse *const response);
+    void openCompleted(const Ipc::StrandMessage *);
     void readCompleted(ReadRequest *readRequest, IpcIoMsg *const response);
     void writeCompleted(WriteRequest *writeRequest, const IpcIoMsg *const response);
     bool canWait() const;
diff -u -r -N squid-5.0.5/src/dns/Makefile.am squid-5.0.6/src/dns/Makefile.am
--- squid-5.0.5/src/dns/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/dns/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,9 +11,9 @@
 noinst_LTLIBRARIES = libdns.la
 
 libdns_la_SOURCES = \
-	forward.h \
 	LookupDetails.cc \
 	LookupDetails.h \
+	forward.h \
 	rfc1035.cc \
 	rfc1035.h \
 	rfc2671.cc \
diff -u -r -N squid-5.0.5/src/dns/Makefile.in squid-5.0.6/src/dns/Makefile.in
--- squid-5.0.5/src/dns/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/dns/Makefile.in	2021-05-10 22:57:54.000000000 +1200
@@ -731,9 +731,9 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libdns.la
 libdns_la_SOURCES = \
-	forward.h \
 	LookupDetails.cc \
 	LookupDetails.h \
+	forward.h \
 	rfc1035.cc \
 	rfc1035.h \
 	rfc2671.cc \
diff -u -r -N squid-5.0.5/src/err_detail_type.h squid-5.0.6/src/err_detail_type.h
--- squid-5.0.5/src/err_detail_type.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/err_detail_type.h	1970-01-01 12:00:00.000000000 +1200
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-#ifndef _SQUID_ERR_DETAIL_H
-#define  _SQUID_ERR_DETAIL_H
-
-typedef enum {
-    ERR_DETAIL_NONE,
-    ERR_DETAIL_START = 100000, // to avoid clashes with most OS error numbers
-    ERR_DETAIL_REDIRECTOR_TIMEDOUT = ERR_DETAIL_START, // External redirector request timed-out
-    ERR_DETAIL_CLT_REQMOD_ABORT, // client-facing code detected transaction abort
-    ERR_DETAIL_CLT_REQMOD_REQ_BODY, // client-facing code detected REQMOD request body adaptation failure
-    ERR_DETAIL_CLT_REQMOD_RESP_BODY, // client-facing code detected REQMOD satisfaction reply body failure
-    ERR_DETAIL_SRV_REQMOD_REQ_BODY, // server-facing code detected REQMOD request body abort
-    ERR_DETAIL_ICAP_RESPMOD_EARLY, // RESPMOD failed w/o store entry
-    ERR_DETAIL_ICAP_RESPMOD_LATE,  // RESPMOD failed with a store entry
-    ERR_DETAIL_REQMOD_BLOCK, // REQMOD denied client access
-    ERR_DETAIL_RESPMOD_BLOCK_EARLY, // RESPMOD denied client access to HTTP response, before any part of the response was sent
-    ERR_DETAIL_RESPMOD_BLOCK_LATE, // RESPMOD denied client access to HTTP response, after [a part of] the response was sent
-    ERR_DETAIL_ICAP_XACT_START, // transaction start failure
-    ERR_DETAIL_ICAP_XACT_SSL_START, // transaction start failure
-    ERR_DETAIL_ICAP_XACT_BODY_CONSUMER_ABORT, // transaction body consumer gone
-    ERR_DETAIL_ICAP_INIT_GONE, // initiator gone
-    ERR_DETAIL_ICAP_XACT_CLOSE, // ICAP connection closed unexpectedly
-    ERR_DETAIL_ICAP_XACT_OTHER, // other ICAP transaction errors
-    ERR_DETAIL_EXCEPTION_OTHER, //other errors ( eg std C++ lib errors)
-    ERR_DETAIL_MAX,
-    ERR_DETAIL_EXCEPTION_START = 110000 // offset for exception ID details
-} err_detail_type;
-
-extern const char *err_detail_type_str[];
-
-inline
-const char *errorDetailName(int errDetailId)
-{
-    if (errDetailId < ERR_DETAIL_START)
-        return "SYSERR";
-
-    if (errDetailId < ERR_DETAIL_MAX)
-        return err_detail_type_str[errDetailId-ERR_DETAIL_START+2];
-
-    if (errDetailId >=ERR_DETAIL_EXCEPTION_START)
-        return "EXCEPTION";
-
-    return "UNKNOWN";
-}
-
-#endif
-
diff -u -r -N squid-5.0.5/src/error/Detail.cc squid-5.0.6/src/error/Detail.cc
--- squid-5.0.5/src/error/Detail.cc	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/Detail.cc	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#include "squid.h"
+#include "error/Detail.h"
+#include "HttpRequest.h"
+#include "sbuf/SBuf.h"
+#include "sbuf/Stream.h"
+
+/// details an error by tying it to a uniquely named circumstance
+class NamedErrorDetail: public ErrorDetail
+{
+public:
+    // convert from c-string to SBuf to simplify creation and optimize usage
+    /// \param aName must not contain characters that require quoting in access logs or HTML
+    explicit NamedErrorDetail(const char *aName): name(aName) {}
+
+    /* ErrorDetail API */
+    virtual SBuf brief() const override { return name; }
+    virtual SBuf verbose(const HttpRequestPointer &) const override { return name; }
+
+private:
+    /// distinguishes us from all other NamedErrorDetail objects
+    SBuf name;
+};
+
+/* ErrorDetail */
+
+std::ostream &
+operator <<(std::ostream &os, const ErrorDetail &detail)
+{
+    os << detail.brief();
+    return os;
+}
+
+std::ostream &
+operator <<(std::ostream &os, const ErrorDetail::Pointer &detail)
+{
+    if (detail)
+        os << *detail;
+    else
+        os << "[no details]";
+    return os;
+}
+
+/* NamedErrorDetail */
+
+ErrorDetail::Pointer
+MakeNamedErrorDetail(const char *name)
+{
+    return new NamedErrorDetail(name);
+}
+
diff -u -r -N squid-5.0.5/src/error/Detail.h squid-5.0.6/src/error/Detail.h
--- squid-5.0.5/src/error/Detail.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/Detail.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef _SQUID_SRC_ERROR_DETAIL_H
+#define _SQUID_SRC_ERROR_DETAIL_H
+
+#include "base/Here.h"
+#include "base/RefCount.h"
+#include "error/forward.h"
+#include "http/forward.h"
+#include "mem/forward.h"
+#include "sbuf/forward.h"
+
+/// interface for supplying additional information about a transaction failure
+class ErrorDetail: public RefCountable
+{
+public:
+    using Pointer = ErrorDetailPointer;
+
+    virtual ~ErrorDetail() {}
+
+    /// \returns a single "token" summarizing available details
+    /// suitable as an access.log field and similar output processed by programs
+    virtual SBuf brief() const = 0;
+
+    /// \returns all available details; may be customized for the given request
+    /// suitable for error pages and other output meant for human consumption
+    virtual SBuf verbose(const HttpRequestPointer &) const = 0;
+};
+
+/// creates a new NamedErrorDetail object with a unique name
+/// \see NamedErrorDetail::Name for naming restrictions
+ErrorDetail::Pointer MakeNamedErrorDetail(const char *name);
+
+/// dump the given ErrorDetail (for debugging)
+std::ostream &operator <<(std::ostream &os, const ErrorDetail &);
+
+/// dump the given ErrorDetail pointer which may be nil (for debugging)
+std::ostream &operator <<(std::ostream &os, const ErrorDetail::Pointer &);
+
+#endif /* _SQUID_SRC_ERROR_DETAIL_H */
+
diff -u -r -N squid-5.0.5/src/error/Error.cc squid-5.0.6/src/error/Error.cc
--- squid-5.0.5/src/error/Error.cc	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/Error.cc	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+/* DEBUG: section 04    Error Management */
+
+#include "squid.h"
+#include "Debug.h"
+#include "error/Error.h"
+
+void
+Error::update(const Error &recent)
+{
+    if (*this)
+        debugs(4, 5, "old: " << *this);
+    if (!recent)
+        return; // no changes
+    debugs(4, 3, "recent: " << recent);
+    // checking category and detail separately may cause inconsistency, but
+    // may result in more details available if they only become available later
+    if (category == ERR_NONE)
+        category = recent.category; // may still be ERR_NONE
+    if (!detail)
+        detail = recent.detail; // may still be nil
+}
+
+std::ostream &
+operator <<(std::ostream &os, const Error &error)
+{
+    os << errorTypeName(error.category);
+    if (error.detail)
+        os << '/' << *error.detail;
+    return os;
+}
+
diff -u -r -N squid-5.0.5/src/error/Error.h squid-5.0.6/src/error/Error.h
--- squid-5.0.5/src/error/Error.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/Error.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef _SQUID_SRC_ERROR_ERROR_H
+#define _SQUID_SRC_ERROR_ERROR_H
+
+#include "error/Detail.h"
+#include "error/forward.h"
+
+#include <iosfwd>
+
+/// a transaction problem
+class Error {
+public:
+    Error() = default;
+    Error(const err_type c): category(c) {} ///< support implicit conversions
+    Error(const err_type c, const ErrorDetailPointer &d): category(c), detail(d) {}
+
+    explicit operator bool() const { return category != ERR_NONE; }
+
+    /// if necessary, stores the given error information (if any)
+    void update(const Error &);
+
+    /// convenience wrapper for update(Error)
+    void update(const err_type c, const ErrorDetailPointer &d) { update(Error(c, d)); }
+
+    /// switch to the default "no error information" state
+    void clear() { *this = Error(); }
+
+    err_type category = ERR_NONE; ///< primary error classification (or ERR_NONE)
+    ErrorDetailPointer detail; ///< additional details about the error
+};
+
+extern const char *err_type_str[];
+
+inline
+err_type
+errorTypeByName(const char *name)
+{
+    for (int i = 0; i < ERR_MAX; ++i)
+        if (strcmp(name, err_type_str[i]) == 0)
+            return (err_type)i;
+    return ERR_MAX;
+}
+
+inline
+const char *
+errorTypeName(err_type err)
+{
+    if (err < ERR_NONE || err >= ERR_MAX)
+        return "UNKNOWN";
+    return err_type_str[err];
+}
+
+std::ostream &operator <<(std::ostream &os, const Error &error);
+
+#endif /* _SQUID_SRC_ERROR_ERROR_H */
+
diff -u -r -N squid-5.0.5/src/error/ExceptionErrorDetail.h squid-5.0.6/src/error/ExceptionErrorDetail.h
--- squid-5.0.5/src/error/ExceptionErrorDetail.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/ExceptionErrorDetail.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef _SQUID_SRC_ERROR_EXCEPTIONERRORDETAIL_H
+#define _SQUID_SRC_ERROR_EXCEPTIONERRORDETAIL_H
+
+#include "error/Detail.h"
+#include "sbuf/SBuf.h"
+#include "sbuf/Stream.h"
+
+/// offset for exception ID details, for backward compatibility
+#define SQUID_EXCEPTION_START_BASE 110000
+
+/// Details a failure reported via a C++ exception. Stores exception ID which
+/// scripts/calc-must-ids.sh can map to a relevant source code location.
+class ExceptionErrorDetail: public ErrorDetail
+{
+    MEMPROXY_CLASS(ExceptionErrorDetail);
+
+public:
+    explicit ExceptionErrorDetail(const SourceLocationId id): exceptionId(SQUID_EXCEPTION_START_BASE + id) {}
+
+    /* ErrorDetail API */
+    virtual SBuf brief() const override {
+        return ToSBuf("exception=", std::hex, exceptionId);
+    }
+
+    virtual SBuf verbose(const HttpRequestPointer &) const override {
+        return ToSBuf("Exception (ID=", std::hex, exceptionId, ')');
+    }
+
+private:
+    SourceLocationId exceptionId; ///< identifies the thrower or catcher
+};
+
+#endif /* _SQUID_SRC_ERROR_EXCEPTIONERRORDETAIL_H */
+
diff -u -r -N squid-5.0.5/src/error/forward.h squid-5.0.6/src/error/forward.h
--- squid-5.0.5/src/error/forward.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/forward.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef _SQUID_SRC_ERROR_FORWARD_H
+#define _SQUID_SRC_ERROR_FORWARD_H
+
+#include "base/forward.h"
+
+typedef enum {
+    ERR_NONE,
+
+    /* Access Permission Errors.  Prefix new with ERR_ACCESS_ */
+    ERR_ACCESS_DENIED,
+    ERR_CACHE_ACCESS_DENIED,
+    ERR_CACHE_MGR_ACCESS_DENIED,
+    ERR_FORWARDING_DENIED,
+    ERR_NO_RELAY,
+    ERR_CANNOT_FORWARD,
+
+    /* TCP Errors. */
+    ERR_READ_TIMEOUT,
+    ERR_LIFETIME_EXP,
+    ERR_READ_ERROR,
+    ERR_WRITE_ERROR,
+    ERR_CONNECT_FAIL,
+    ERR_SECURE_CONNECT_FAIL,
+    ERR_SOCKET_FAILURE,
+
+    /* DNS Errors */
+    ERR_DNS_FAIL,
+    ERR_URN_RESOLVE,
+
+    /* HTTP Errors */
+    ERR_ONLY_IF_CACHED_MISS,    /* failure to satisfy only-if-cached request */
+    ERR_TOO_BIG,
+    ERR_INVALID_RESP,
+    ERR_UNSUP_HTTPVERSION,     /* HTTP version is not supported */
+    ERR_INVALID_REQ,
+    ERR_UNSUP_REQ,
+    ERR_INVALID_URL,
+    ERR_ZERO_SIZE_OBJECT,
+    ERR_PRECONDITION_FAILED,
+    ERR_CONFLICT_HOST,
+
+    /* FTP Errors */
+    ERR_FTP_DISABLED,
+    ERR_FTP_UNAVAILABLE,
+    ERR_FTP_FAILURE,
+    ERR_FTP_PUT_ERROR,
+    ERR_FTP_NOT_FOUND,
+    ERR_FTP_FORBIDDEN,
+    ERR_FTP_PUT_CREATED,        /* !error,a note that the file was created */
+    ERR_FTP_PUT_MODIFIED,       /* modified, !created */
+
+    /* ESI Errors */
+    ERR_ESI,                    /* Failure to perform ESI processing */
+
+    /* ICAP Errors */
+    ERR_ICAP_FAILURE,
+
+    /* Squid problem */
+    ERR_GATEWAY_FAILURE,
+
+    /* Special Cases */
+    ERR_DIR_LISTING,            /* Display of remote directory (FTP, Gopher) */
+    ERR_SQUID_SIGNATURE,        /* not really an error */
+    ERR_SHUTTING_DOWN,
+    ERR_PROTOCOL_UNKNOWN,
+
+    // NOTE: error types defined below TCP_RESET are optional and do not generate
+    //       a log warning if the files are missing
+    TCP_RESET,                  // Send TCP RST packet instead of error page
+
+    ERR_CLIENT_GONE, // No client to send the error page to
+    ERR_SECURE_ACCEPT_FAIL, // Rejects the SSL connection intead of error page
+    ERR_REQUEST_START_TIMEOUT, // Aborts the connection instead of error page
+    ERR_REQUEST_PARSE_TIMEOUT, // Aborts the connection instead of error page
+    ERR_RELAY_REMOTE, // Sends server reply instead of error page
+
+    /* Cache Manager GUI can install a manager index/home page */
+    MGR_INDEX,
+
+    ERR_MAX
+} err_type;
+
+class Error;
+class ErrorDetail;
+
+typedef RefCount<ErrorDetail> ErrorDetailPointer;
+
+#endif /* _SQUID_SRC_ERROR_FORWARD_H */
+
diff -u -r -N squid-5.0.5/src/error/Makefile.am squid-5.0.6/src/error/Makefile.am
--- squid-5.0.5/src/error/Makefile.am	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,33 @@
+## Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
+
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
+
+categories.cc: forward.h $(top_srcdir)/src/mk-string-arrays.awk
+	$(AWK) -f $(top_srcdir)/src/mk-string-arrays.awk ifile=error/forward.h < $(srcdir)/forward.h > $@ || ($(RM) -f $@ && exit 1)
+
+BUILT_SOURCES = \
+	categories.cc
+
+noinst_LTLIBRARIES = liberror.la
+
+liberror_la_SOURCES = \
+	Detail.cc \
+	Detail.h \
+	Error.cc \
+	Error.h \
+	ExceptionErrorDetail.h \
+	SysErrorDetail.h \
+	forward.h
+
+nodist_liberror_la_SOURCES = \
+	$(BUILT_SOURCES)
+
+CLEANFILES += \
+	$(BUILT_SOURCES)
+
diff -u -r -N squid-5.0.5/src/error/Makefile.in squid-5.0.6/src/error/Makefile.in
--- squid-5.0.5/src/error/Makefile.in	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -0,0 +1,1254 @@
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS =
+@ENABLE_LOADABLE_MODULES_TRUE@am__append_1 = $(INCLTDL)
+subdir = src/error
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude/ax_with_prog.m4 \
+	$(top_srcdir)/acinclude/init.m4 \
+	$(top_srcdir)/acinclude/squid-util.m4 \
+	$(top_srcdir)/acinclude/compiler-flags.m4 \
+	$(top_srcdir)/acinclude/os-deps.m4 \
+	$(top_srcdir)/acinclude/krb5.m4 $(top_srcdir)/acinclude/pam.m4 \
+	$(top_srcdir)/acinclude/pkg.m4 $(top_srcdir)/acinclude/tdb.m4 \
+	$(top_srcdir)/acinclude/lib-checks.m4 \
+	$(top_srcdir)/acinclude/ax_cxx_compile_stdcxx_11.m4 \
+	$(top_srcdir)/acinclude/ax_cxx_0x_types.m4 \
+	$(top_srcdir)/src/auth/basic/helpers.m4 \
+	$(top_srcdir)/src/auth/basic/DB/required.m4 \
+	$(top_srcdir)/src/auth/basic/LDAP/required.m4 \
+	$(top_srcdir)/src/auth/basic/NCSA/required.m4 \
+	$(top_srcdir)/src/auth/basic/NIS/required.m4 \
+	$(top_srcdir)/src/auth/basic/PAM/required.m4 \
+	$(top_srcdir)/src/auth/basic/POP3/required.m4 \
+	$(top_srcdir)/src/auth/basic/RADIUS/required.m4 \
+	$(top_srcdir)/src/auth/basic/SASL/required.m4 \
+	$(top_srcdir)/src/auth/basic/SMB/required.m4 \
+	$(top_srcdir)/src/auth/basic/SMB_LM/required.m4 \
+	$(top_srcdir)/src/auth/basic/SSPI/required.m4 \
+	$(top_srcdir)/src/auth/basic/fake/required.m4 \
+	$(top_srcdir)/src/auth/basic/getpwnam/required.m4 \
+	$(top_srcdir)/src/auth/digest/helpers.m4 \
+	$(top_srcdir)/src/auth/digest/eDirectory/required.m4 \
+	$(top_srcdir)/src/auth/digest/file/required.m4 \
+	$(top_srcdir)/src/auth/digest/LDAP/required.m4 \
+	$(top_srcdir)/src/auth/negotiate/helpers.m4 \
+	$(top_srcdir)/src/auth/negotiate/SSPI/required.m4 \
+	$(top_srcdir)/src/auth/negotiate/kerberos/required.m4 \
+	$(top_srcdir)/src/auth/negotiate/wrapper/required.m4 \
+	$(top_srcdir)/src/auth/ntlm/helpers.m4 \
+	$(top_srcdir)/src/auth/ntlm/fake/required.m4 \
+	$(top_srcdir)/src/auth/ntlm/SMB_LM/required.m4 \
+	$(top_srcdir)/src/auth/ntlm/SSPI/required.m4 \
+	$(top_srcdir)/src/log/helpers.m4 \
+	$(top_srcdir)/src/log/DB/required.m4 \
+	$(top_srcdir)/src/log/file/required.m4 \
+	$(top_srcdir)/src/acl/external/helpers.m4 \
+	$(top_srcdir)/src/acl/external/AD_group/required.m4 \
+	$(top_srcdir)/src/acl/external/LDAP_group/required.m4 \
+	$(top_srcdir)/src/acl/external/LM_group/required.m4 \
+	$(top_srcdir)/src/acl/external/delayer/required.m4 \
+	$(top_srcdir)/src/acl/external/SQL_session/required.m4 \
+	$(top_srcdir)/src/acl/external/eDirectory_userip/required.m4 \
+	$(top_srcdir)/src/acl/external/file_userip/required.m4 \
+	$(top_srcdir)/src/acl/external/kerberos_ldap_group/required.m4 \
+	$(top_srcdir)/src/acl/external/kerberos_sid_group/required.m4 \
+	$(top_srcdir)/src/acl/external/session/required.m4 \
+	$(top_srcdir)/src/acl/external/time_quota/required.m4 \
+	$(top_srcdir)/src/acl/external/unix_group/required.m4 \
+	$(top_srcdir)/src/acl/external/wbinfo_group/required.m4 \
+	$(top_srcdir)/src/http/url_rewriters/helpers.m4 \
+	$(top_srcdir)/src/http/url_rewriters/fake/required.m4 \
+	$(top_srcdir)/src/http/url_rewriters/LFS/required.m4 \
+	$(top_srcdir)/src/security/cert_validators/helpers.m4 \
+	$(top_srcdir)/src/security/cert_validators/fake/required.m4 \
+	$(top_srcdir)/src/security/cert_generators/helpers.m4 \
+	$(top_srcdir)/src/security/cert_generators/file/required.m4 \
+	$(top_srcdir)/src/store/id_rewriters/helpers.m4 \
+	$(top_srcdir)/src/store/id_rewriters/file/required.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/include/autoconf.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+liberror_la_LIBADD =
+am_liberror_la_OBJECTS = Detail.lo Error.lo
+am__objects_1 = categories.lo
+nodist_liberror_la_OBJECTS = $(am__objects_1)
+liberror_la_OBJECTS = $(am_liberror_la_OBJECTS) \
+	$(nodist_liberror_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = 
+depcomp = $(SHELL) $(top_srcdir)/cfgaux/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/Detail.Plo ./$(DEPDIR)/Error.Plo \
+	./$(DEPDIR)/categories.Plo
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(liberror_la_SOURCES) $(nodist_liberror_la_SOURCES)
+DIST_SOURCES = $(liberror_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+am__tty_colors = { \
+  $(am__tty_colors_dummy); \
+  if test "X$(AM_COLOR_TESTS)" = Xno; then \
+    am__color_tests=no; \
+  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+    am__color_tests=yes; \
+  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+    am__color_tests=yes; \
+  fi; \
+  if test $$am__color_tests = yes; then \
+    red='[0;31m'; \
+    grn='[0;32m'; \
+    lgn='[1;32m'; \
+    blu='[1;34m'; \
+    mgn='[0;35m'; \
+    brg='[1m'; \
+    std='[m'; \
+  fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__recheck_rx = ^[ 	]*:recheck:[ 	]*
+am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
+am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+  recheck = 1; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+        { \
+          if ((getline line2 < ($$0 ".log")) < 0) \
+	    recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+        { \
+          recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+        { \
+          break; \
+        } \
+    }; \
+  if (recheck) \
+    print $$0; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+  print "fatal: making $@: " msg | "cat >&2"; \
+  exit 1; \
+} \
+function rst_section(header) \
+{ \
+  print header; \
+  len = length(header); \
+  for (i = 1; i <= len; i = i + 1) \
+    printf "="; \
+  printf "\n\n"; \
+} \
+{ \
+  copy_in_global_log = 1; \
+  global_test_result = "RUN"; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+         fatal("failed to read from " $$0 ".trs"); \
+      if (line ~ /$(am__global_test_result_rx)/) \
+        { \
+          sub("$(am__global_test_result_rx)", "", line); \
+          sub("[ 	]*$$", "", line); \
+          global_test_result = line; \
+        } \
+      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+        copy_in_global_log = 0; \
+    }; \
+  if (copy_in_global_log) \
+    { \
+      rst_section(global_test_result ": " $$0); \
+      while ((rc = (getline line < ($$0 ".log"))) != 0) \
+      { \
+        if (rc < 0) \
+          fatal("failed to read from " $$0 ".log"); \
+        print line; \
+      }; \
+      printf "\n"; \
+    }; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+  --color-tests "$$am__color_tests" \
+  --enable-hard-errors "$$am__enable_hard_errors" \
+  --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test.  Creates the
+# directory for the log if needed.  Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log.  Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup);					\
+$(am__vpath_adj_setup) $(am__vpath_adj)			\
+$(am__tty_colors);					\
+srcdir=$(srcdir); export srcdir;			\
+case "$@" in						\
+  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
+    *) am__odir=.;; 					\
+esac;							\
+test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
+  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
+if test -f "./$$f"; then dir=./;			\
+elif test -f "$$f"; then dir=;				\
+else dir="$(srcdir)/"; fi;				\
+tst=$$dir$$f; log='$@'; 				\
+if test -n '$(DISABLE_HARD_ERRORS)'; then		\
+  am__enable_hard_errors=no; 				\
+else							\
+  am__enable_hard_errors=yes; 				\
+fi; 							\
+case " $(XFAIL_TESTS) " in				\
+  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
+    am__expect_failure=yes;;				\
+  *)							\
+    am__expect_failure=no;;				\
+esac; 							\
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed).  The result is saved in the shell variable
+# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+  bases='$(TEST_LOGS)'; \
+  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+  bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/cfgaux/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+  case '$@' in \
+    */*) \
+      case '$*' in \
+        */*) b='$*';; \
+          *) b=`echo '$@' | sed 's/\.log$$//'`; \
+       esac;; \
+    *) \
+      b='$*';; \
+  esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/cfgaux/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+	$(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/cfgaux/depcomp \
+	$(top_srcdir)/cfgaux/test-driver $(top_srcdir)/src/Common.am \
+	$(top_srcdir)/src/TestHeaders.am
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADAPTATION_LIBS = @ADAPTATION_LIBS@
+AIOLIB = @AIOLIB@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AR_R = @AR_R@
+ATOMICLIB = @ATOMICLIB@
+AUTH_LIBS_TO_BUILD = @AUTH_LIBS_TO_BUILD@
+AUTH_MODULES = @AUTH_MODULES@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASIC_AUTH_HELPERS = @BASIC_AUTH_HELPERS@
+BUILDCXX = @BUILDCXX@
+BUILDCXXFLAGS = @BUILDCXXFLAGS@
+BZR = @BZR@
+CACHE_EFFECTIVE_USER = @CACHE_EFFECTIVE_USER@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CGIEXT = @CGIEXT@
+CHMOD = @CHMOD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CRYPTLIB = @CRYPTLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_HOSTS = @DEFAULT_HOSTS@
+DEFAULT_LOG_DIR = @DEFAULT_LOG_DIR@
+DEFAULT_PID_FILE = @DEFAULT_PID_FILE@
+DEFAULT_SWAP_DIR = @DEFAULT_SWAP_DIR@
+
+# Make ./configure location settings above available to the code
+DEFS = @DEFS@ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" \
+	-DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" \
+	-DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\"
+DEPDIR = @DEPDIR@
+DIGEST_AUTH_HELPERS = @DIGEST_AUTH_HELPERS@
+DISK_LIBS = @DISK_LIBS@
+DISK_MODULES = @DISK_MODULES@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EPOLL_LIBS = @EPOLL_LIBS@
+EUILIB = @EUILIB@
+EXEEXT = @EXEEXT@
+EXPATLIB = @EXPATLIB@
+EXTERNAL_ACL_HELPERS = @EXTERNAL_ACL_HELPERS@
+EXT_LIBECAP_CFLAGS = @EXT_LIBECAP_CFLAGS@
+EXT_LIBECAP_LIBS = @EXT_LIBECAP_LIBS@
+FALSE = @FALSE@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_CXX11 = @HAVE_CXX11@
+INCLTDL = @INCLTDL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KRB5INCS = @KRB5INCS@
+KRB5LIBS = @KRB5LIBS@
+LBERLIB = @LBERLIB@
+LD = @LD@
+LDAPLIB = @LDAPLIB@
+LDAPSEARCH = @LDAPSEARCH@
+LDFLAGS = @LDFLAGS@
+LIBADD_DL = @LIBADD_DL@
+LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
+LIBADD_DLOPEN = @LIBADD_DLOPEN@
+LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
+LIBBDB_LIBS = @LIBBDB_LIBS@
+LIBCPPUNIT_CFLAGS = @LIBCPPUNIT_CFLAGS@
+LIBCPPUNIT_LIBS = @LIBCPPUNIT_LIBS@
+LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
+LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@
+LIBLTDL = @LIBLTDL@
+LIBOBJS = @LIBOBJS@
+LIBOPENSSL_CFLAGS = @LIBOPENSSL_CFLAGS@
+LIBOPENSSL_LIBS = @LIBOPENSSL_LIBS@
+LIBPTHREADS = @LIBPTHREADS@
+LIBS = @LIBS@
+LIBSASL = @LIBSASL@
+LIBTDB_CFLAGS = @LIBTDB_CFLAGS@
+LIBTDB_LIBS = @LIBTDB_LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
+LIB_KRB5_CFLAGS = @LIB_KRB5_CFLAGS@
+LIB_KRB5_LIBS = @LIB_KRB5_LIBS@
+LINUXDOC = @LINUXDOC@
+LIPO = @LIPO@
+LN = @LN@
+LN_S = @LN_S@
+LOG_DAEMON_HELPERS = @LOG_DAEMON_HELPERS@
+LTDLDEPS = @LTDLDEPS@
+LTDLINCL = @LTDLINCL@
+LTDLOPEN = @LTDLOPEN@
+LTLIBOBJS = @LTLIBOBJS@
+LT_ARGZ_H = @LT_ARGZ_H@
+LT_CONFIG_H = @LT_CONFIG_H@
+LT_DLLOADERS = @LT_DLLOADERS@
+LT_DLPREOPEN = @LT_DLPREOPEN@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MINGW_LIBS = @MINGW_LIBS@
+MKDIR = @MKDIR@
+MKDIR_P = @MKDIR_P@
+MV = @MV@
+NEGOTIATE_AUTH_HELPERS = @NEGOTIATE_AUTH_HELPERS@
+NETTLELIB = @NETTLELIB@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTLM_AUTH_HELPERS = @NTLM_AUTH_HELPERS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PO2HTML = @PO2HTML@
+PO2TEXT = @PO2TEXT@
+POD2MAN = @POD2MAN@
+RANLIB = @RANLIB@
+REGEXLIB = @REGEXLIB@
+REPL_LIBS = @REPL_LIBS@
+REPL_OBJS = @REPL_OBJS@
+REPL_POLICIES = @REPL_POLICIES@
+RM = @RM@
+SECURITY_CERTGEN_HELPERS = @SECURITY_CERTGEN_HELPERS@
+SECURITY_CERTV_HELPERS = @SECURITY_CERTV_HELPERS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SH = @SH@
+SHELL = @SHELL@
+SMBCLIENT = @SMBCLIENT@
+SNMPLIB = @SNMPLIB@
+SQUID_CFLAGS = @SQUID_CFLAGS@
+SQUID_CXXFLAGS = @SQUID_CXXFLAGS@
+SSLLIB = @SSLLIB@
+STOREID_REWRITE_HELPERS = @STOREID_REWRITE_HELPERS@
+STORE_LIBS_TO_ADD = @STORE_LIBS_TO_ADD@
+STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@
+STORE_TESTS = @STORE_TESTS@
+STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
+TR = @TR@
+TRUE = @TRUE@
+URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@
+VERSION = @VERSION@
+WBINFO = @WBINFO@
+WIN32_PSAPI = @WIN32_PSAPI@
+XMLLIB = @XMLLIB@
+XTRA_LIBS = @XTRA_LIBS@
+XTRA_OBJS = @XTRA_OBJS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+krb5_config = @krb5_config@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+ltdl_LIBOBJS = @ltdl_LIBOBJS@
+ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sys_symbol_underscore = @sys_symbol_underscore@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+DEFAULT_HTTP_PORT = 3128
+DEFAULT_ICP_PORT = 3130
+DEFAULT_PREFIX = $(prefix)
+DEFAULT_CONFIG_DIR = $(sysconfdir)
+DEFAULT_CONFIG_FILE = $(DEFAULT_CONFIG_DIR)/squid.conf
+DEFAULT_MIME_TABLE = $(DEFAULT_CONFIG_DIR)/mime.conf
+DEFAULT_SSL_CRTD = $(libexecdir)/`echo security_file_certgen | sed '$(transform);s/$$/$(EXEEXT)/'`
+DEFAULT_LOG_PREFIX = $(DEFAULT_LOG_DIR)
+DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log
+DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log
+DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log
+DEFAULT_NETDB_FILE = $(DEFAULT_SWAP_DIR)/netdb.state
+DEFAULT_SSL_DB_DIR = $(DEFAULT_SWAP_DIR)/ssl_db
+DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
+DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'`
+DEFAULT_LOGFILED = $(libexecdir)/`echo log_file_daemon | sed '$(transform);s/$$/$(EXEEXT)/'`
+DEFAULT_DISKD = $(libexecdir)/`echo diskd | sed '$(transform);s/$$/$(EXEEXT)/'`
+DEFAULT_ICON_DIR = $(datadir)/icons
+DEFAULT_ERROR_DIR = $(datadir)/errors
+AM_CFLAGS = $(SQUID_CFLAGS)
+AM_CXXFLAGS = $(SQUID_CXXFLAGS)
+CLEANFILES = testHeaders $(BUILT_SOURCES)
+TESTS = testHeaders
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
+	-I$(top_srcdir)/lib -I$(top_srcdir)/src \
+	-I$(top_builddir)/include $(LIBCPPUNIT_CFLAGS) $(KRB5INCS) \
+	$(am__append_1)
+@ENABLE_XPROF_STATS_FALSE@LIBPROFILER = 
+@ENABLE_XPROF_STATS_TRUE@LIBPROFILER = $(top_builddir)/lib/profiler/libprofiler.la
+COMPAT_LIB = $(top_builddir)/compat/libcompatsquid.la $(LIBPROFILER)
+subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
+BUILT_SOURCES = \
+	categories.cc
+
+noinst_LTLIBRARIES = liberror.la
+liberror_la_SOURCES = \
+	Detail.cc \
+	Detail.h \
+	Error.cc \
+	Error.h \
+	ExceptionErrorDetail.h \
+	SysErrorDetail.h \
+	forward.h
+
+nodist_liberror_la_SOURCES = \
+	$(BUILT_SOURCES)
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/src/Common.am $(top_srcdir)/src/TestHeaders.am $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/error/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign src/error/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	esac;
+$(top_srcdir)/src/Common.am $(top_srcdir)/src/TestHeaders.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
+liberror.la: $(liberror_la_OBJECTS) $(liberror_la_DEPENDENCIES) $(EXTRA_liberror_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(CXXLINK)  $(liberror_la_OBJECTS) $(liberror_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Detail.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Error.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/categories.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cc.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+	rm -f $< $@
+	$(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+	@:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+	@$(am__set_TESTS_bases); \
+	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+	redo_bases=`for i in $$bases; do \
+	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+	            done`; \
+	if test -n "$$redo_bases"; then \
+	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+	  if $(am__make_dryrun); then :; else \
+	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+	  fi; \
+	fi; \
+	if test -n "$$am__remaking_logs"; then \
+	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+	       "recursion detected" >&2; \
+	elif test -n "$$redo_logs"; then \
+	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+	fi; \
+	if $(am__make_dryrun); then :; else \
+	  st=0;  \
+	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+	  for i in $$redo_bases; do \
+	    test -f $$i.trs && test -r $$i.trs \
+	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+	    test -f $$i.log && test -r $$i.log \
+	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+	  done; \
+	  test $$st -eq 0 || exit 1; \
+	fi
+	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+	ws='[ 	]'; \
+	results=`for b in $$bases; do echo $$b.trs; done`; \
+	test -n "$$results" || results=/dev/null; \
+	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
+	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
+	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
+	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
+	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+	  success=true; \
+	else \
+	  success=false; \
+	fi; \
+	br='==================='; br=$$br$$br$$br$$br; \
+	result_count () \
+	{ \
+	    if test x"$$1" = x"--maybe-color"; then \
+	      maybe_colorize=yes; \
+	    elif test x"$$1" = x"--no-color"; then \
+	      maybe_colorize=no; \
+	    else \
+	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	    fi; \
+	    shift; \
+	    desc=$$1 count=$$2; \
+	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
+	      color_start=$$3 color_end=$$std; \
+	    else \
+	      color_start= color_end=; \
+	    fi; \
+	    echo "$${color_start}# $$desc $$count$${color_end}"; \
+	}; \
+	create_testsuite_report () \
+	{ \
+	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
+	  result_count $$1 "PASS: " $$pass  "$$grn"; \
+	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
+	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+	  result_count $$1 "FAIL: " $$fail  "$$red"; \
+	  result_count $$1 "XPASS:" $$xpass "$$red"; \
+	  result_count $$1 "ERROR:" $$error "$$mgn"; \
+	}; \
+	{								\
+	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
+	    $(am__rst_title);						\
+	  create_testsuite_report --no-color;				\
+	  echo;								\
+	  echo ".. contents:: :depth: 2";				\
+	  echo;								\
+	  for b in $$bases; do echo $$b; done				\
+	    | $(am__create_global_log);					\
+	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
+	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
+	if $$success; then						\
+	  col="$$grn";							\
+	 else								\
+	  col="$$red";							\
+	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
+	fi;								\
+	echo "$${col}$$br$${std}"; 					\
+	echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}";	\
+	echo "$${col}$$br$${std}"; 					\
+	create_testsuite_report --maybe-color;				\
+	echo "$$col$$br$$std";						\
+	if $$success; then :; else					\
+	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
+	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
+	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
+	  fi;								\
+	  echo "$$col$$br$$std";					\
+	fi;								\
+	$$success || exit 1
+
+check-TESTS: $(check_PROGRAMS)
+	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
+	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	@set +e; $(am__set_TESTS_bases); \
+	log_list=`for i in $$bases; do echo $$i.log; done`; \
+	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+	exit $$?;
+recheck: all $(check_PROGRAMS)
+	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	@set +e; $(am__set_TESTS_bases); \
+	bases=`for i in $$bases; do echo $$i; done \
+	         | $(am__list_recheck_tests)` || exit 1; \
+	log_list=`for i in $$bases; do echo $$i.log; done`; \
+	log_list=`echo $$log_list`; \
+	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+	        am__force_recheck=am--force-recheck \
+	        TEST_LOGS="$$log_list"; \
+	exit $$?
+testHeaders.log: testHeaders
+	@p='testHeaders'; \
+	b='testHeaders'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+	@p='$<'; \
+	$(am__set_b); \
+	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@	@p='$<'; \
+@am__EXEEXT_TRUE@	$(am__set_b); \
+@am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+	clean-noinstLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+		-rm -f ./$(DEPDIR)/Detail.Plo
+	-rm -f ./$(DEPDIR)/Error.Plo
+	-rm -f ./$(DEPDIR)/categories.Plo
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+		-rm -f ./$(DEPDIR)/Detail.Plo
+	-rm -f ./$(DEPDIR)/Error.Plo
+	-rm -f ./$(DEPDIR)/categories.Plo
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check check-am install install-am install-exec \
+	install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
+	check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
+	clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am recheck tags tags-am uninstall \
+	uninstall-am
+
+.PRECIOUS: Makefile
+
+
+$(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h
+
+testHeaders: $(srcdir)/*.h
+	$(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" $^ || exit 1
+
+.PHONY: testHeaders
+
+categories.cc: forward.h $(top_srcdir)/src/mk-string-arrays.awk
+	$(AWK) -f $(top_srcdir)/src/mk-string-arrays.awk ifile=error/forward.h < $(srcdir)/forward.h > $@ || ($(RM) -f $@ && exit 1)
+
+# 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-5.0.5/src/error/SysErrorDetail.h squid-5.0.6/src/error/SysErrorDetail.h
--- squid-5.0.5/src/error/SysErrorDetail.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/error/SysErrorDetail.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef _SQUID_SRC_ERROR_SYSERRORDETAIL_H
+#define _SQUID_SRC_ERROR_SYSERRORDETAIL_H
+
+#include "error/Detail.h"
+#include "sbuf/SBuf.h"
+#include "sbuf/Stream.h"
+
+/// system call failure detail based on standard errno(3)/strerror(3) APIs
+class SysErrorDetail: public ErrorDetail
+{
+    MEMPROXY_CLASS(SysErrorDetail);
+
+public:
+    /// \returns a pointer to a SysErrorDetail instance (or nil for lost errnos)
+    static ErrorDetail::Pointer NewIfAny(const int errorNo)
+    {
+        // we could optimize by caching results for (frequently used?) errnos
+        return errorNo ? new SysErrorDetail(errorNo) : nullptr;
+    }
+
+    static SBuf Brief(int errorNo) {
+        return SysErrorDetail(errorNo).brief();
+    }
+
+    /* ErrorDetail API */
+    virtual SBuf brief() const override {
+        return ToSBuf("errno=", errorNo);
+    }
+
+    virtual SBuf verbose(const HttpRequestPointer &) const override {
+        return SBuf(strerror(errorNo));
+    }
+
+private:
+    // hidden by NewIfAny() to avoid creating SysErrorDetail from zero errno
+    explicit SysErrorDetail(const int anErrorNo): errorNo(anErrorNo) {}
+
+    int errorNo; ///< errno(3) set by the last failed system call or equivalent
+};
+
+#endif /* _SQUID_SRC_ERROR_SYSERRORDETAIL_H */
+
diff -u -r -N squid-5.0.5/src/errorpage.cc squid-5.0.6/src/errorpage.cc
--- squid-5.0.5/src/errorpage.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/errorpage.cc	2021-05-10 21:02:34.000000000 +1200
@@ -14,7 +14,8 @@
 #include "clients/forward.h"
 #include "comm/Connection.h"
 #include "comm/Write.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
+#include "error/SysErrorDetail.h"
 #include "errorpage.h"
 #include "fde.h"
 #include "format/Format.h"
@@ -169,6 +170,10 @@
         "reset"
     },
     {
+        ERR_CLIENT_GONE,
+        "unexpected client disconnect"
+    },
+    {
         ERR_SECURE_ACCEPT_FAIL,
         "secure accept fail"
     },
@@ -712,9 +717,7 @@
 {
     assert(entry->mem_obj != NULL);
     assert (entry->isEmpty());
-    debugs(4, 4, "Creating an error page for entry " << entry <<
-           " with errorstate " << err <<
-           " page id " << err->page_id);
+    debugs(4, 4, "storing " << err << " in " << *entry);
 
     if (entry->store_status != STORE_PENDING) {
         debugs(4, 2, "Skipping error page due to store_status: " << entry->store_status);
@@ -796,9 +799,6 @@
     if (err_language != Config.errorDefaultLanguage)
 #endif
         safe_free(err_language);
-#if USE_OPENSSL
-    delete detail;
-#endif
 }
 
 int
@@ -962,18 +962,13 @@
     case 'D':
         if (!build.allowRecursion)
             p = "%D";  // if recursion is not allowed, do not convert
-#if USE_OPENSSL
-        // currently only SSL error details implemented
         else if (detail) {
-            detail->useRequest(request.getRaw());
-            const String &errDetail = detail->toString();
-            if (errDetail.size() > 0) {
-                const auto compiledDetail = compileBody(errDetail.termedBuf(), false);
-                mb.append(compiledDetail.rawContent(), compiledDetail.length());
-                do_quote = 0;
-            }
+            auto rawDetail = detail->verbose(request);
+            // XXX: Performance regression. c_str() reallocates
+            const auto compiledDetail = compileBody(rawDetail.c_str(), false);
+            mb.append(compiledDetail.rawContent(), compiledDetail.length());
+            do_quote = 0;
         }
-#endif
         if (!mb.contentSize())
             mb.append("[No Error Detail]", 17);
         break;
@@ -1204,13 +1199,12 @@
         break;
 
     case 'x':
-#if USE_OPENSSL
-        if (detail)
-            mb.appendf("%s", detail->errorName());
-        else
-#endif
-            if (!building_deny_info_url)
-                p = "[Unknown Error Code]";
+        if (detail) {
+            const auto brief = detail->brief();
+            mb.append(brief.rawContent(), brief.length());
+        } else if (!building_deny_info_url) {
+            p = "[Unknown Error Code]";
+        }
         break;
 
     case 'z':
@@ -1351,17 +1345,10 @@
     // Make sure error codes get back to the client side for logging and
     // error tracking.
     if (request) {
-        int edc = ERR_DETAIL_NONE; // error detail code
-#if USE_OPENSSL
         if (detail)
-            edc = detail->errorNo();
+            request->detailError(type, detail);
         else
-#endif
-            if (detailCode)
-                edc = detailCode;
-            else
-                edc = xerrno;
-        request->detailError(type, edc);
+            request->detailError(type, SysErrorDetail::NewIfAny(xerrno));
     }
 
     return rep;
@@ -1399,7 +1386,7 @@
     if (!Config.errorDirectory)
         err_language = Config.errorDefaultLanguage;
 #endif
-    debugs(4, 2, "No existing error page language negotiated for " << errorPageName(page_id) << ". Using default error file.");
+    debugs(4, 2, "No existing error page language negotiated for " << this << ". Using default error file.");
     return compileBody(error_text[page_id], true);
 }
 
@@ -1534,3 +1521,13 @@
     anErr.validate();
 }
 
+std::ostream &
+operator <<(std::ostream &os, const ErrorState *err)
+{
+    if (err)
+        os << errorPageName(err->page_id);
+    else
+        os << "[none]";
+    return os;
+}
+
diff -u -r -N squid-5.0.5/src/errorpage.h squid-5.0.6/src/errorpage.h
--- squid-5.0.5/src/errorpage.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/errorpage.h	2021-05-10 21:02:34.000000000 +1200
@@ -13,8 +13,8 @@
 
 #include "cbdata.h"
 #include "comm/forward.h"
-#include "err_detail_type.h"
-#include "err_type.h"
+#include "error/Detail.h"
+#include "error/forward.h"
 #include "http/forward.h"
 #include "http/StatusCode.h"
 #include "ip/Address.h"
@@ -23,9 +23,6 @@
 #include "SquidString.h"
 /* auth/UserRequest.h is empty unless USE_AUTH is defined */
 #include "auth/UserRequest.h"
-#if USE_OPENSSL
-#include "ssl/ErrorDetail.h"
-#endif
 
 /// error page callback
 typedef void ERCB(int fd, void *, size_t);
@@ -109,7 +106,7 @@
     HttpReply *BuildHttpReply(void);
 
     /// set error type-specific detail code
-    void detailError(int dCode) {detailCode = dCode;}
+    void detailError(const ErrorDetail::Pointer &dCode) { detail = dCode; }
 
     /// ensures that a future BuildHttpReply() is likely to succeed
     void validate();
@@ -200,12 +197,11 @@
 
     AccessLogEntryPointer ale; ///< transaction details (or nil)
 
-#if USE_OPENSSL
-    Ssl::ErrorDetail *detail = nullptr;
-#endif
+    // TODO: Replace type, xerrno and detail with Error while adding a virtual
+    // Error::Detail::sysError() method to extract errno in detailError().
     /// type-specific detail about the transaction error;
-    /// overwrites xerrno; overwritten by detail, if any.
-    int detailCode = ERR_DETAIL_NONE;
+    /// overwrites xerrno;
+    ErrorDetail::Pointer detail;
 
     HttpReplyPointer response_;
 
@@ -355,5 +351,7 @@
  */
 bool strHdrAcptLangGetItem(const String &hdr, char *lang, int langLen, size_t &pos);
 
+std::ostream &operator <<(std::ostream &, const ErrorState *);
+
 #endif /* SQUID_ERRORPAGE_H */
 
diff -u -r -N squid-5.0.5/src/err_type.h squid-5.0.6/src/err_type.h
--- squid-5.0.5/src/err_type.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/err_type.h	1970-01-01 12:00:00.000000000 +1200
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-#ifndef _SQUID_ERR_TYPE_H
-#define _SQUID_ERR_TYPE_H
-
-typedef enum {
-    ERR_NONE,
-
-    /* Access Permission Errors.  Prefix new with ERR_ACCESS_ */
-    ERR_ACCESS_DENIED,
-    ERR_CACHE_ACCESS_DENIED,
-    ERR_CACHE_MGR_ACCESS_DENIED,
-    ERR_FORWARDING_DENIED,
-    ERR_NO_RELAY,
-    ERR_CANNOT_FORWARD,
-
-    /* TCP Errors. */
-    ERR_READ_TIMEOUT,
-    ERR_LIFETIME_EXP,
-    ERR_READ_ERROR,
-    ERR_WRITE_ERROR,
-    ERR_CONNECT_FAIL,
-    ERR_SECURE_CONNECT_FAIL,
-    ERR_SOCKET_FAILURE,
-
-    /* DNS Errors */
-    ERR_DNS_FAIL,
-    ERR_URN_RESOLVE,
-
-    /* HTTP Errors */
-    ERR_ONLY_IF_CACHED_MISS,    /* failure to satisfy only-if-cached request */
-    ERR_TOO_BIG,
-    ERR_INVALID_RESP,
-    ERR_UNSUP_HTTPVERSION,     /* HTTP version is not supported */
-    ERR_INVALID_REQ,
-    ERR_UNSUP_REQ,
-    ERR_INVALID_URL,
-    ERR_ZERO_SIZE_OBJECT,
-    ERR_PRECONDITION_FAILED,
-    ERR_CONFLICT_HOST,
-
-    /* FTP Errors */
-    ERR_FTP_DISABLED,
-    ERR_FTP_UNAVAILABLE,
-    ERR_FTP_FAILURE,
-    ERR_FTP_PUT_ERROR,
-    ERR_FTP_NOT_FOUND,
-    ERR_FTP_FORBIDDEN,
-    ERR_FTP_PUT_CREATED,        /* !error,a note that the file was created */
-    ERR_FTP_PUT_MODIFIED,       /* modified, !created */
-
-    /* ESI Errors */
-    ERR_ESI,                    /* Failure to perform ESI processing */
-
-    /* ICAP Errors */
-    ERR_ICAP_FAILURE,
-
-    /* Squid problem */
-    ERR_GATEWAY_FAILURE,
-
-    /* Special Cases */
-    ERR_DIR_LISTING,            /* Display of remote directory (FTP, Gopher) */
-    ERR_SQUID_SIGNATURE,        /* not really an error */
-    ERR_SHUTTING_DOWN,
-    ERR_PROTOCOL_UNKNOWN,
-
-    // NOTE: error types defined below TCP_RESET are optional and do not generate
-    //       a log warning if the files are missing
-    TCP_RESET,                  // Send TCP RST packet instead of error page
-
-    ERR_SECURE_ACCEPT_FAIL, // Rejects the SSL connection intead of error page
-    ERR_REQUEST_START_TIMEOUT, // Aborts the connection instead of error page
-    ERR_REQUEST_PARSE_TIMEOUT, // Aborts the connection instead of error page
-    ERR_RELAY_REMOTE, // Sends server reply instead of error page
-
-    /* Cache Manager GUI can install a manager index/home page */
-    MGR_INDEX,
-
-    ERR_MAX
-} err_type;
-
-extern const char *err_type_str[];
-
-inline
-err_type
-errorTypeByName(const char *name)
-{
-    for (int i = 0; i < ERR_MAX; ++i)
-        if (strcmp(name, err_type_str[i]) == 0)
-            return (err_type)i;
-    return ERR_MAX;
-}
-
-inline
-const char *
-errorTypeName(err_type err)
-{
-    if (err < ERR_NONE || err >= ERR_MAX)
-        return "UNKNOWN";
-    return err_type_str[err];
-}
-
-#endif /* _SQUID_ERR_TYPE_H */
-
diff -u -r -N squid-5.0.5/src/esi/Context.h squid-5.0.6/src/esi/Context.h
--- squid-5.0.5/src/esi/Context.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/esi/Context.h	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,7 @@
 #define SQUID_ESICONTEXT_H
 
 #include "clientStream.h"
-#include "err_type.h"
+#include "error/forward.h"
 #include "esi/Element.h"
 #include "esi/Esi.h"
 #include "esi/Parser.h"
diff -u -r -N squid-5.0.5/src/esi/Makefile.am squid-5.0.6/src/esi/Makefile.am
--- squid-5.0.5/src/esi/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/esi/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -25,12 +25,12 @@
 endif
 
 libesi_la_SOURCES = \
+	$(ESI_PARSER_SOURCES) \
 	Assign.cc \
 	Assign.h \
 	Attempt.h \
 	Context.cc \
 	Context.h \
-	$(ESI_PARSER_SOURCES) \
 	Element.h \
 	Esi.cc \
 	Esi.h \
diff -u -r -N squid-5.0.5/src/esi/Makefile.in squid-5.0.6/src/esi/Makefile.in
--- squid-5.0.5/src/esi/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/esi/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -172,16 +172,16 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libesi_la_LIBADD =
-am__libesi_la_SOURCES_DIST = Assign.cc Assign.h Attempt.h Context.cc \
-	Context.h ExpatParser.cc ExpatParser.h Libxml2Parser.cc \
-	Libxml2Parser.h Element.h Esi.cc Esi.h Except.h Expression.cc \
-	Expression.h Include.cc Include.h Literal.h Module.cc Module.h \
-	Parser.cc Parser.h Segment.cc Segment.h Sequence.cc Sequence.h \
-	Var.h VarState.cc VarState.h
+am__libesi_la_SOURCES_DIST = ExpatParser.cc ExpatParser.h \
+	Libxml2Parser.cc Libxml2Parser.h Assign.cc Assign.h Attempt.h \
+	Context.cc Context.h Element.h Esi.cc Esi.h Except.h \
+	Expression.cc Expression.h Include.cc Include.h Literal.h \
+	Module.cc Module.h Parser.cc Parser.h Segment.cc Segment.h \
+	Sequence.cc Sequence.h Var.h VarState.cc VarState.h
 @ENABLE_LIBEXPAT_TRUE@am__objects_1 = ExpatParser.lo
 @ENABLE_LIBXML2_TRUE@am__objects_2 = Libxml2Parser.lo
 am__objects_3 = $(am__objects_1) $(am__objects_2)
-am_libesi_la_OBJECTS = Assign.lo Context.lo $(am__objects_3) Esi.lo \
+am_libesi_la_OBJECTS = $(am__objects_3) Assign.lo Context.lo Esi.lo \
 	Expression.lo Include.lo Module.lo Parser.lo Segment.lo \
 	Sequence.lo VarState.lo
 libesi_la_OBJECTS = $(am_libesi_la_OBJECTS)
@@ -753,12 +753,12 @@
 noinst_LTLIBRARIES = libesi.la
 ESI_PARSER_SOURCES = $(am__append_2) $(am__append_3)
 libesi_la_SOURCES = \
+	$(ESI_PARSER_SOURCES) \
 	Assign.cc \
 	Assign.h \
 	Attempt.h \
 	Context.cc \
 	Context.h \
-	$(ESI_PARSER_SOURCES) \
 	Element.h \
 	Esi.cc \
 	Esi.h \
diff -u -r -N squid-5.0.5/src/eui/Makefile.am squid-5.0.6/src/eui/Makefile.am
--- squid-5.0.5/src/eui/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/eui/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,11 +11,11 @@
 noinst_LTLIBRARIES = libeui.la
 
 libeui_la_SOURCES = \
-	Config.h \
 	Config.cc \
-	Eui48.h \
+	Config.h \
 	Eui48.cc \
-	Eui64.h \
-	Eui64.cc
+	Eui48.h \
+	Eui64.cc \
+	Eui64.h
 
 libeui_la_LIBADD = $(EUILIB)
diff -u -r -N squid-5.0.5/src/eui/Makefile.in squid-5.0.6/src/eui/Makefile.in
--- squid-5.0.5/src/eui/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/eui/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -730,12 +730,12 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libeui.la
 libeui_la_SOURCES = \
-	Config.h \
 	Config.cc \
-	Eui48.h \
+	Config.h \
 	Eui48.cc \
-	Eui64.h \
-	Eui64.cc
+	Eui48.h \
+	Eui64.cc \
+	Eui64.h
 
 libeui_la_LIBADD = $(EUILIB)
 all: all-am
diff -u -r -N squid-5.0.5/src/format/Format.cc squid-5.0.6/src/format/Format.cc
--- squid-5.0.5/src/format/Format.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/format/Format.cc	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,7 @@
 #include "base64.h"
 #include "client_side.h"
 #include "comm/Connection.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
 #include "errorpage.h"
 #include "fde.h"
 #include "format/Format.h"
@@ -986,29 +986,17 @@
             break;
 
         case LFT_SQUID_ERROR:
-            if (al->request && al->request->errType != ERR_NONE)
-                out = errorPageName(al->request->errType);
+            if (const auto error = al->error())
+                out = errorPageName(error->category);
             break;
 
         case LFT_SQUID_ERROR_DETAIL:
-#if USE_OPENSSL
-            if (al->request && al->request->errType == ERR_SECURE_CONNECT_FAIL) {
-                out = Ssl::GetErrorName(al->request->errDetail, true);
-            } else
-#endif
-                if (al->request && al->request->errDetail != ERR_DETAIL_NONE) {
-                    if (al->request->errDetail > ERR_DETAIL_START && al->request->errDetail < ERR_DETAIL_MAX)
-                        out = errorDetailName(al->request->errDetail);
-                    else {
-                        if (al->request->errDetail >= ERR_DETAIL_EXCEPTION_START)
-                            sb.appendf("%s=0x%X",
-                                       errorDetailName(al->request->errDetail), (uint32_t) al->request->errDetail);
-                        else
-                            sb.appendf("%s=%d",
-                                       errorDetailName(al->request->errDetail), al->request->errDetail);
-                        out = sb.c_str();
-                    }
+            if (const auto error = al->error()) {
+                if (const auto detail = error->detail) {
+                    sb = detail->brief();
+                    out = sb.c_str();
                 }
+            }
             break;
 
         case LFT_SQUID_HIERARCHY:
diff -u -r -N squid-5.0.5/src/fs/Makefile.am squid-5.0.6/src/fs/Makefile.am
--- squid-5.0.5/src/fs/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/fs/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -19,39 +19,41 @@
 	diskd/StoreFSdiskd.cc
 
 libufs_la_SOURCES = \
-	ufs/StoreFSufs.h \
+	ufs/RebuildState.cc \
+	ufs/RebuildState.h \
 	ufs/StoreFSufs.cc \
+	ufs/StoreFSufs.h \
+	ufs/StoreSearchUFS.cc \
+	ufs/StoreSearchUFS.h \
 	ufs/UFSStoreState.cc \
-	ufs/UFSSwapDir.cc \
-	ufs/UFSSwapDir.h \
+	ufs/UFSStoreState.h \
 	ufs/UFSStrategy.cc \
 	ufs/UFSStrategy.h \
-	ufs/UFSStoreState.h \
-	ufs/StoreSearchUFS.h \
-	ufs/StoreSearchUFS.cc \
-	ufs/UFSSwapLogParser.h \
+	ufs/UFSSwapDir.cc \
+	ufs/UFSSwapDir.h \
 	ufs/UFSSwapLogParser.cc \
-	ufs/RebuildState.h \
-	ufs/RebuildState.cc
+	ufs/UFSSwapLogParser.h
 
 librock_la_SOURCES = \
-	rock/forward.h \
 	rock/RockDbCell.cc \
 	rock/RockDbCell.h \
 	rock/RockHeaderUpdater.cc \
 	rock/RockHeaderUpdater.h \
-	rock/RockIoState.cc \
-	rock/RockIoState.h \
 	rock/RockIoRequests.cc \
 	rock/RockIoRequests.h \
+	rock/RockIoState.cc \
+	rock/RockIoState.h \
 	rock/RockRebuild.cc \
 	rock/RockRebuild.h \
 	rock/RockStoreFileSystem.cc \
 	rock/RockStoreFileSystem.h \
 	rock/RockSwapDir.cc \
-	rock/RockSwapDir.h
+	rock/RockSwapDir.h \
+	rock/forward.h
 
-libfs_la_SOURCES = Module.cc Module.h
+libfs_la_SOURCES = \
+	Module.cc \
+	Module.h
 libfs_la_LIBADD =  $(STORE_LIBS_TO_BUILD)
 libfs_la_DEPENDENCIES = $(STORE_LIBS_TO_BUILD)
 
diff -u -r -N squid-5.0.5/src/fs/Makefile.in squid-5.0.6/src/fs/Makefile.in
--- squid-5.0.5/src/fs/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/fs/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -179,13 +179,13 @@
 libfs_la_OBJECTS = $(am_libfs_la_OBJECTS)
 librock_la_LIBADD =
 am_librock_la_OBJECTS = rock/RockDbCell.lo rock/RockHeaderUpdater.lo \
-	rock/RockIoState.lo rock/RockIoRequests.lo rock/RockRebuild.lo \
+	rock/RockIoRequests.lo rock/RockIoState.lo rock/RockRebuild.lo \
 	rock/RockStoreFileSystem.lo rock/RockSwapDir.lo
 librock_la_OBJECTS = $(am_librock_la_OBJECTS)
 libufs_la_LIBADD =
-am_libufs_la_OBJECTS = ufs/StoreFSufs.lo ufs/UFSStoreState.lo \
-	ufs/UFSSwapDir.lo ufs/UFSStrategy.lo ufs/StoreSearchUFS.lo \
-	ufs/UFSSwapLogParser.lo ufs/RebuildState.lo
+am_libufs_la_OBJECTS = ufs/RebuildState.lo ufs/StoreFSufs.lo \
+	ufs/StoreSearchUFS.lo ufs/UFSStoreState.lo ufs/UFSStrategy.lo \
+	ufs/UFSSwapDir.lo ufs/UFSSwapLogParser.lo
 libufs_la_OBJECTS = $(am_libufs_la_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -768,39 +768,42 @@
 	diskd/StoreFSdiskd.cc
 
 libufs_la_SOURCES = \
-	ufs/StoreFSufs.h \
+	ufs/RebuildState.cc \
+	ufs/RebuildState.h \
 	ufs/StoreFSufs.cc \
+	ufs/StoreFSufs.h \
+	ufs/StoreSearchUFS.cc \
+	ufs/StoreSearchUFS.h \
 	ufs/UFSStoreState.cc \
-	ufs/UFSSwapDir.cc \
-	ufs/UFSSwapDir.h \
+	ufs/UFSStoreState.h \
 	ufs/UFSStrategy.cc \
 	ufs/UFSStrategy.h \
-	ufs/UFSStoreState.h \
-	ufs/StoreSearchUFS.h \
-	ufs/StoreSearchUFS.cc \
-	ufs/UFSSwapLogParser.h \
+	ufs/UFSSwapDir.cc \
+	ufs/UFSSwapDir.h \
 	ufs/UFSSwapLogParser.cc \
-	ufs/RebuildState.h \
-	ufs/RebuildState.cc
+	ufs/UFSSwapLogParser.h
 
 librock_la_SOURCES = \
-	rock/forward.h \
 	rock/RockDbCell.cc \
 	rock/RockDbCell.h \
 	rock/RockHeaderUpdater.cc \
 	rock/RockHeaderUpdater.h \
-	rock/RockIoState.cc \
-	rock/RockIoState.h \
 	rock/RockIoRequests.cc \
 	rock/RockIoRequests.h \
+	rock/RockIoState.cc \
+	rock/RockIoState.h \
 	rock/RockRebuild.cc \
 	rock/RockRebuild.h \
 	rock/RockStoreFileSystem.cc \
 	rock/RockStoreFileSystem.h \
 	rock/RockSwapDir.cc \
-	rock/RockSwapDir.h
+	rock/RockSwapDir.h \
+	rock/forward.h
+
+libfs_la_SOURCES = \
+	Module.cc \
+	Module.h
 
-libfs_la_SOURCES = Module.cc Module.h
 libfs_la_LIBADD = $(STORE_LIBS_TO_BUILD)
 libfs_la_DEPENDENCIES = $(STORE_LIBS_TO_BUILD)
 all: all-am
@@ -892,10 +895,10 @@
 	rock/$(DEPDIR)/$(am__dirstamp)
 rock/RockHeaderUpdater.lo: rock/$(am__dirstamp) \
 	rock/$(DEPDIR)/$(am__dirstamp)
-rock/RockIoState.lo: rock/$(am__dirstamp) \
-	rock/$(DEPDIR)/$(am__dirstamp)
 rock/RockIoRequests.lo: rock/$(am__dirstamp) \
 	rock/$(DEPDIR)/$(am__dirstamp)
+rock/RockIoState.lo: rock/$(am__dirstamp) \
+	rock/$(DEPDIR)/$(am__dirstamp)
 rock/RockRebuild.lo: rock/$(am__dirstamp) \
 	rock/$(DEPDIR)/$(am__dirstamp)
 rock/RockStoreFileSystem.lo: rock/$(am__dirstamp) \
@@ -911,16 +914,16 @@
 ufs/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) ufs/$(DEPDIR)
 	@: > ufs/$(DEPDIR)/$(am__dirstamp)
+ufs/RebuildState.lo: ufs/$(am__dirstamp) ufs/$(DEPDIR)/$(am__dirstamp)
 ufs/StoreFSufs.lo: ufs/$(am__dirstamp) ufs/$(DEPDIR)/$(am__dirstamp)
+ufs/StoreSearchUFS.lo: ufs/$(am__dirstamp) \
+	ufs/$(DEPDIR)/$(am__dirstamp)
 ufs/UFSStoreState.lo: ufs/$(am__dirstamp) \
 	ufs/$(DEPDIR)/$(am__dirstamp)
-ufs/UFSSwapDir.lo: ufs/$(am__dirstamp) ufs/$(DEPDIR)/$(am__dirstamp)
 ufs/UFSStrategy.lo: ufs/$(am__dirstamp) ufs/$(DEPDIR)/$(am__dirstamp)
-ufs/StoreSearchUFS.lo: ufs/$(am__dirstamp) \
-	ufs/$(DEPDIR)/$(am__dirstamp)
+ufs/UFSSwapDir.lo: ufs/$(am__dirstamp) ufs/$(DEPDIR)/$(am__dirstamp)
 ufs/UFSSwapLogParser.lo: ufs/$(am__dirstamp) \
 	ufs/$(DEPDIR)/$(am__dirstamp)
-ufs/RebuildState.lo: ufs/$(am__dirstamp) ufs/$(DEPDIR)/$(am__dirstamp)
 
 libufs.la: $(libufs_la_OBJECTS) $(libufs_la_DEPENDENCIES) $(EXTRA_libufs_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(CXXLINK)  $(libufs_la_OBJECTS) $(libufs_la_LIBADD) $(LIBS)
diff -u -r -N squid-5.0.5/src/FwdState.cc squid-5.0.6/src/FwdState.cc
--- squid-5.0.5/src/FwdState.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/FwdState.cc	2021-05-10 21:02:34.000000000 +1200
@@ -59,7 +59,6 @@
 #if USE_OPENSSL
 #include "ssl/cert_validate_message.h"
 #include "ssl/Config.h"
-#include "ssl/ErrorDetail.h"
 #include "ssl/helper.h"
 #include "ssl/ServerBump.h"
 #include "ssl/support.h"
diff -u -r -N squid-5.0.5/src/FwdState.h squid-5.0.6/src/FwdState.h
--- squid-5.0.5/src/FwdState.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/FwdState.h	2021-05-10 21:02:34.000000000 +1200
@@ -16,7 +16,7 @@
 #include "comm.h"
 #include "comm/Connection.h"
 #include "comm/ConnOpener.h"
-#include "err_type.h"
+#include "error/forward.h"
 #include "fde.h"
 #include "http/StatusCode.h"
 #include "ip/Address.h"
@@ -41,14 +41,6 @@
 typedef CbcPointer<HappyConnOpener> HappyConnOpenerPointer;
 class HappyConnOpenerAnswer;
 
-#if USE_OPENSSL
-namespace Ssl
-{
-class ErrorDetail;
-class CertValidationResponse;
-};
-#endif
-
 /// Sets initial TOS value and Netfilter for the future outgoing connection.
 /// Updates the given Connection object, not the future transport connection.
 void GetMarkingsToServer(HttpRequest * request, Comm::Connection &conn);
diff -u -r -N squid-5.0.5/src/gopher.cc squid-5.0.6/src/gopher.cc
--- squid-5.0.5/src/gopher.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/gopher.cc	2021-05-10 21:02:34.000000000 +1200
@@ -740,7 +740,10 @@
 
     assert(buf == gopherState->replybuf);
 
-    if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) {
+    // XXX: Should update delayId, statCounter, etc. before bailing
+    if (!entry->isAccepting()) {
+        debugs(10, 3, "terminating due to bad " << *entry);
+        // TODO: Do not abuse connection for triggering cleanup.
         gopherState->serverConn->close();
         return;
     }
@@ -837,6 +840,13 @@
         statCounter.server.other.kbytes_out += size;
     }
 
+    if (!entry->isAccepting()) {
+        debugs(10, 3, "terminating due to bad " << *entry);
+        // TODO: Do not abuse connection for triggering cleanup.
+        gopherState->serverConn->close();
+        return;
+    }
+
     if (errflag) {
         const auto err = new ErrorState(ERR_WRITE_ERROR, Http::scServiceUnavailable, gopherState->fwd->request, gopherState->fwd->al);
         err->xerrno = xerrno;
diff -u -r -N squid-5.0.5/src/helper/Makefile.am squid-5.0.6/src/helper/Makefile.am
--- squid-5.0.5/src/helper/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/helper/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -13,12 +13,12 @@
 libhelper_la_SOURCES = \
 	ChildConfig.cc \
 	ChildConfig.h \
-	forward.h \
 	Reply.cc \
 	Reply.h \
 	Request.h \
-	ResultCode.h \
+	ReservationId.cc \
 	ReservationId.h \
-	ReservationId.cc
+	ResultCode.h \
+	forward.h
 
 EXTRA_DIST= protocol_defines.h
diff -u -r -N squid-5.0.5/src/helper/Makefile.in squid-5.0.6/src/helper/Makefile.in
--- squid-5.0.5/src/helper/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/helper/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -731,13 +731,13 @@
 libhelper_la_SOURCES = \
 	ChildConfig.cc \
 	ChildConfig.h \
-	forward.h \
 	Reply.cc \
 	Reply.h \
 	Request.h \
-	ResultCode.h \
+	ReservationId.cc \
 	ReservationId.h \
-	ReservationId.cc
+	ResultCode.h \
+	forward.h
 
 EXTRA_DIST = protocol_defines.h
 all: all-am
diff -u -r -N squid-5.0.5/src/http/Makefile.am squid-5.0.6/src/http/Makefile.am
--- squid-5.0.5/src/http/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -16,14 +16,13 @@
 libhttp_la_SOURCES = \
 	ContentLengthInterpreter.cc \
 	ContentLengthInterpreter.h \
-	forward.h \
 	Message.cc \
 	Message.h \
 	MethodType.cc \
 	MethodType.h \
 	ProtocolVersion.h \
-	RegisteredHeaders.h \
 	RegisteredHeaders.cc \
+	RegisteredHeaders.h \
 	RegisteredHeadersHash.cci \
 	RequestMethod.cc \
 	RequestMethod.h \
@@ -33,7 +32,8 @@
 	StatusLine.cc \
 	StatusLine.h \
 	Stream.cc \
-	Stream.h
+	Stream.h \
+	forward.h
 
 libhttp_la_LIBADD= one/libhttp1.la
 
diff -u -r -N squid-5.0.5/src/http/Makefile.in squid-5.0.6/src/http/Makefile.in
--- squid-5.0.5/src/http/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/http/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -778,14 +778,13 @@
 libhttp_la_SOURCES = \
 	ContentLengthInterpreter.cc \
 	ContentLengthInterpreter.h \
-	forward.h \
 	Message.cc \
 	Message.h \
 	MethodType.cc \
 	MethodType.h \
 	ProtocolVersion.h \
-	RegisteredHeaders.h \
 	RegisteredHeaders.cc \
+	RegisteredHeaders.h \
 	RegisteredHeadersHash.cci \
 	RequestMethod.cc \
 	RequestMethod.h \
@@ -795,7 +794,8 @@
 	StatusLine.cc \
 	StatusLine.h \
 	Stream.cc \
-	Stream.h
+	Stream.h \
+	forward.h
 
 libhttp_la_LIBADD = one/libhttp1.la
 EXTRA_DIST = RegisteredHeadersHash.gperf
diff -u -r -N squid-5.0.5/src/http/one/Makefile.am squid-5.0.6/src/http/one/Makefile.am
--- squid-5.0.5/src/http/one/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/one/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,6 @@
 noinst_LTLIBRARIES = libhttp1.la
 
 libhttp1_la_SOURCES = \
-	forward.h \
 	Parser.cc \
 	Parser.h \
 	RequestParser.cc \
@@ -21,4 +20,5 @@
 	TeChunkedParser.cc \
 	TeChunkedParser.h \
 	Tokenizer.cc \
-	Tokenizer.h
+	Tokenizer.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/http/one/Makefile.in squid-5.0.6/src/http/one/Makefile.in
--- squid-5.0.5/src/http/one/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/http/one/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -731,7 +731,6 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libhttp1.la
 libhttp1_la_SOURCES = \
-	forward.h \
 	Parser.cc \
 	Parser.h \
 	RequestParser.cc \
@@ -741,7 +740,8 @@
 	TeChunkedParser.cc \
 	TeChunkedParser.h \
 	Tokenizer.cc \
-	Tokenizer.h
+	Tokenizer.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/http/one/ResponseParser.cc squid-5.0.6/src/http/one/ResponseParser.cc
--- squid-5.0.5/src/http/one/ResponseParser.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/one/ResponseParser.cc	2021-05-10 21:02:34.000000000 +1200
@@ -12,6 +12,7 @@
 #include "http/ProtocolVersion.h"
 #include "parser/Tokenizer.h"
 #include "profiler/Profiler.h"
+#include "sbuf/Stream.h"
 #include "SquidConfig.h"
 
 const SBuf Http::One::ResponseParser::IcyMagic("ICY ");
@@ -47,46 +48,27 @@
 // NP: we found the protocol version and consumed it already.
 // just need the status code and reason phrase
 int
-Http::One::ResponseParser::parseResponseStatusAndReason(Tokenizer &tok, const CharacterSet &WspDelim)
+Http::One::ResponseParser::parseResponseStatusAndReason(Tokenizer &tok)
 {
-    if (!completedStatus_) {
-        debugs(74, 9, "seek status-code in: " << tok.remaining().substr(0,10) << "...");
-        /* RFC 7230 section 3.1.2 - status code is 3 DIGIT octets.
-         * There is no limit on what those octets may be.
-         * 000 through 999 are all valid.
-         */
-        int64_t statusValue;
-        if (tok.int64(statusValue, 10, false, 3) && tok.skipOne(WspDelim)) {
-
-            debugs(74, 6, "found int64 status-code=" << statusValue);
-            statusCode_ = static_cast<Http::StatusCode>(statusValue);
-
+    try {
+        if (!completedStatus_) {
+            debugs(74, 9, "seek status-code in: " << tok.remaining().substr(0,10) << "...");
+            ParseResponseStatus(tok, statusCode_);
             buf_ = tok.remaining(); // resume checkpoint
             completedStatus_ = true;
-
-        } else if (tok.atEnd()) {
-            debugs(74, 6, "Parser needs more data");
-            return 0; // need more to be sure we have it all
-
-        } else {
-            debugs(74, 6, "invalid status-line. invalid code.");
-            return -1; // invalid status, a single SP terminator required
         }
         // NOTE: any whitespace after the single SP is part of the reason phrase.
-    }
 
-    /* RFC 7230 says we SHOULD ignore the reason phrase content
-     * but it has a definite valid vs invalid character set.
-     * We interpret the SHOULD as ignoring absence and syntax, but
-     * producing an error if it contains an invalid octet.
-     */
-
-    debugs(74, 9, "seek reason-phrase in: " << tok.remaining().substr(0,50) << "...");
-
-    // if we got here we are still looking for reason-phrase bytes
-    static const CharacterSet phraseChars = CharacterSet::WSP + CharacterSet::VCHAR + CharacterSet::OBSTEXT;
-    (void)tok.prefix(reasonPhrase_, phraseChars); // optional, no error if missing
-    try {
+        /* RFC 7230 says we SHOULD ignore the reason phrase content
+         * but it has a definite valid vs invalid character set.
+         * We interpret the SHOULD as ignoring absence and syntax, but
+         * producing an error if it contains an invalid octet.
+         */
+
+        debugs(74, 9, "seek reason-phrase in: " << tok.remaining().substr(0,50) << "...");
+        // if we got here we are still looking for reason-phrase bytes
+        static const CharacterSet phraseChars = CharacterSet::WSP + CharacterSet::VCHAR + CharacterSet::OBSTEXT;
+        (void)tok.prefix(reasonPhrase_, phraseChars); // optional, no error if missing
         skipLineTerminator(tok);
         buf_ = tok.remaining(); // resume checkpoint
         debugs(74, DBG_DATA, Raw("leftovers", buf_.rawContent(), buf_.length()));
@@ -100,6 +82,30 @@
     return -1;
 }
 
+void
+Http::One::ResponseParser::ParseResponseStatus(Tokenizer &tok, StatusCode &code)
+{
+    int64_t statusValue;
+    if (tok.int64(statusValue, 10, false, 3) && tok.skipOne(Parser::DelimiterCharacters())) {
+        debugs(74, 6, "raw status-code=" << statusValue);
+        code = static_cast<StatusCode>(statusValue); // may be invalid
+
+        // RFC 7230 Section 3.1.2 says status-code is exactly three DIGITs
+        if (code <= 99)
+            throw TextException(ToSBuf("status-code too short: ", code), Here());
+
+        // Codes with a non-standard first digit (a.k.a. response class) are
+        // considered semantically invalid per the following HTTP WG discussion:
+        // https://lists.w3.org/Archives/Public/ietf-http-wg/2010AprJun/0354.html
+        if (code >= 600)
+            throw TextException(ToSBuf("status-code from an invalid response class: ", code), Here());
+    } else if (tok.atEnd()) {
+        throw InsufficientInput();
+    } else {
+        throw TextException("syntactically invalid status-code area", Here());
+    }
+}
+
 /**
  * Attempt to parse the method field out of an HTTP message status-line.
  *
@@ -120,13 +126,11 @@
 {
     Tokenizer tok(buf_);
 
-    const CharacterSet &WspDelim = DelimiterCharacters();
-
     if (msgProtocol_.protocol != AnyP::PROTO_NONE) {
         debugs(74, 6, "continue incremental parse for " << msgProtocol_);
         debugs(74, DBG_DATA, "parse remaining buf={length=" << tok.remaining().length() << ", data='" << tok.remaining() << "'}");
         // we already found the magic, but not the full line. keep going.
-        return parseResponseStatusAndReason(tok, WspDelim);
+        return parseResponseStatusAndReason(tok);
 
     } else if (tok.skip(Http1magic)) {
         debugs(74, 6, "found prefix magic " << Http1magic);
@@ -134,6 +138,7 @@
 
         // magic contains major version, still need to find minor DIGIT
         int64_t verMinor;
+        const auto &WspDelim = DelimiterCharacters();
         if (tok.int64(verMinor, 10, false, 1) && tok.skipOne(WspDelim)) {
             msgProtocol_.protocol = AnyP::PROTO_HTTP;
             msgProtocol_.major = 1;
@@ -143,7 +148,7 @@
 
             debugs(74, DBG_DATA, "parse remaining buf={length=" << tok.remaining().length() << ", data='" << tok.remaining() << "'}");
             buf_ = tok.remaining(); // resume checkpoint
-            return parseResponseStatusAndReason(tok, WspDelim);
+            return parseResponseStatusAndReason(tok);
 
         } else if (tok.atEnd())
             return 0; // need more to be sure we have it all
@@ -157,7 +162,7 @@
         // NP: ICY has no /major.minor details
         debugs(74, DBG_DATA, "parse remaining buf={length=" << tok.remaining().length() << ", data='" << tok.remaining() << "'}");
         buf_ = tok.remaining(); // resume checkpoint
-        return parseResponseStatusAndReason(tok, WspDelim);
+        return parseResponseStatusAndReason(tok);
     } else if (buf_.length() < Http1magic.length() && Http1magic.startsWith(buf_)) {
         debugs(74, 7, Raw("valid HTTP/1 prefix", buf_.rawContent(), buf_.length()));
         return 0;
diff -u -r -N squid-5.0.5/src/http/one/ResponseParser.h squid-5.0.6/src/http/one/ResponseParser.h
--- squid-5.0.5/src/http/one/ResponseParser.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/one/ResponseParser.h	2021-05-10 21:02:34.000000000 +1200
@@ -45,9 +45,14 @@
     Http::StatusCode messageStatus() const { return statusCode_;}
     SBuf reasonPhrase() const { return reasonPhrase_;}
 
+    /// extracts response status-code and the following delimiter; validates status-code
+    /// \param[out] code syntactically valid status-code (unchanged on syntax errors)
+    /// \throws InsuffientInput and other exceptions on syntax and validation errors
+    static void ParseResponseStatus(Tokenizer &, StatusCode &code);
+
 private:
     int parseResponseFirstLine();
-    int parseResponseStatusAndReason(Tokenizer&, const CharacterSet &);
+    int parseResponseStatusAndReason(Tokenizer &);
 
     /// magic prefix for identifying ICY response messages
     static const SBuf IcyMagic;
diff -u -r -N squid-5.0.5/src/http/RegisteredHeaders.cc squid-5.0.6/src/http/RegisteredHeaders.cc
--- squid-5.0.5/src/http/RegisteredHeaders.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/RegisteredHeaders.cc	2021-05-10 21:02:34.000000000 +1200
@@ -37,7 +37,7 @@
 const HeaderTableRecord&
 HeaderLookupTable_t::lookup (const char *buf, const std::size_t len) const {
     const HeaderTableRecord *r = HttpHeaderHashTable::lookup(buf, len);
-    if (!r)
+    if (!r || r->id == Http::HdrType::OTHER)
         return BadHdr;
     return *r;
 }
diff -u -r -N squid-5.0.5/src/http/RegisteredHeadersHash.cci squid-5.0.6/src/http/RegisteredHeadersHash.cci
--- squid-5.0.5/src/http/RegisteredHeadersHash.cci	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/RegisteredHeadersHash.cci	2021-05-10 21:02:34.000000000 +1200
@@ -41,8 +41,8 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 #line 24 "RegisteredHeadersHash.gperf"
-struct HeaderTableRecord;
-        enum
+class HeaderTableRecord;
+    enum
 {
     TOTAL_KEYWORDS = 89,
     MIN_WORD_LENGTH = 2,
@@ -103,7 +103,7 @@
 private:
     static inline unsigned int HttpHeaderHash (const char *str, size_t len);
 public:
-    static const struct HeaderTableRecord *lookup (const char *str, size_t len);
+    static const class HeaderTableRecord *lookup (const char *str, size_t len);
 };
 
 inline unsigned int
@@ -172,7 +172,7 @@
     0, 10, 15
 };
 
-static const struct HeaderTableRecord HttpHeaderDefinitionsTable[] =
+static const class HeaderTableRecord HttpHeaderDefinitionsTable[] =
 {
     {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
     {""}, {""}, {""}, {""},
@@ -365,7 +365,7 @@
     {"Accept-Encoding", Http::HdrType::ACCEPT_ENCODING, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader|HdrKind::ReplyHeader}
 };
 
-const struct HeaderTableRecord *
+const class HeaderTableRecord *
 HttpHeaderHashTable::lookup (const char *str, size_t len)
 {
     if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
diff -u -r -N squid-5.0.5/src/http/RegisteredHeadersHash.gperf squid-5.0.6/src/http/RegisteredHeadersHash.gperf
--- squid-5.0.5/src/http/RegisteredHeadersHash.gperf	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/RegisteredHeadersHash.gperf	2021-05-10 21:02:34.000000000 +1200
@@ -21,7 +21,7 @@
 %global-table
 %ignore-case
 %struct-type 
-struct HeaderTableRecord;
+class HeaderTableRecord;
 %%
 Accept, Http::HdrType::ACCEPT, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader
 Accept-Charset, Http::HdrType::ACCEPT_CHARSET, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader
diff -u -r -N squid-5.0.5/src/http/StatusLine.cc squid-5.0.6/src/http/StatusLine.cc
--- squid-5.0.5/src/http/StatusLine.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/StatusLine.cc	2021-05-10 21:02:34.000000000 +1200
@@ -11,7 +11,12 @@
 #include "squid.h"
 #include "base/Packable.h"
 #include "Debug.h"
+#include "http/one/ResponseParser.h"
 #include "http/StatusLine.h"
+#include "parser/forward.h"
+#include "parser/Tokenizer.h"
+
+#include <algorithm>
 
 void
 Http::StatusLine::init()
@@ -29,7 +34,6 @@
 void
 Http::StatusLine::set(const AnyP::ProtocolVersion &newVersion, const Http::StatusCode newStatus, const char *newReason)
 {
-    protocol = AnyP::PROTO_HTTP;
     version = newVersion;
     status_ = newStatus;
     /* Note: no xstrdup for 'reason', assumes constant 'reasons' */
@@ -53,7 +57,7 @@
     if (packedStatus == Http::scNone) {
         static unsigned int reports = 0;
         if (++reports <= 100)
-            debugs(57, DBG_IMPORTANT, "BUG: Generated response lacks status code");
+            debugs(57, DBG_IMPORTANT, "BUG: the internalized response lacks status-code");
         packedStatus = Http::scInternalServerError;
         packedReason = Http::StatusCodeString(packedStatus); // ignore custom reason_ (if any)
     }
@@ -64,7 +68,7 @@
     static const char *IcyStatusLineFormat = "ICY %3d %s\r\n";
 
     /* handle ICY protocol status line specially. Pass on the bad format. */
-    if (protocol == AnyP::PROTO_ICY) {
+    if (version.protocol == AnyP::PROTO_ICY) {
         debugs(57, 9, "packing sline " << this << " using " << p << ":");
         debugs(57, 9, "FORMAT=" << IcyStatusLineFormat );
         debugs(57, 9, "ICY " << packedStatus << " " << packedReason);
@@ -78,12 +82,8 @@
     p->appendf(Http1StatusLineFormat, version.major, version.minor, packedStatus, packedReason);
 }
 
-/*
- * Parse character string.
- * XXX: Note 'end' currently unused, so NULL-termination assumed.
- */
 bool
-Http::StatusLine::parse(const String &protoPrefix, const char *start, const char * /*end*/)
+Http::StatusLine::parse(const String &protoPrefix, const char *start, const char *end)
 {
     status_ = Http::scInvalidHeader;    /* Squid header parsing error */
 
@@ -92,7 +92,7 @@
 
     if (protoPrefix.cmp("ICY", 3) == 0) {
         debugs(57, 3, "Invalid HTTP identifier. Detected ICY protocol instead.");
-        protocol = AnyP::PROTO_ICY;
+        version = AnyP::ProtocolVersion(AnyP::PROTO_ICY, 1, 0);
         start += protoPrefix.size();
     } else if (protoPrefix.caseCmp(start, protoPrefix.size()) == 0) {
 
@@ -114,8 +114,25 @@
     if (!(start = strchr(start, ' ')))
         return false;
 
-    // XXX: should we be using xstrtoui() or xatoui() ?
-    status_ = static_cast<Http::StatusCode>(atoi(++start));
+    ++start; // skip SP between HTTP-version and status-code
+
+    assert(start <= end);
+    const auto stdStatusAreaLength = 4; // status-code length plus SP
+    const auto unparsedLength = end - start;
+    const auto statusAreaLength = std::min<size_t>(stdStatusAreaLength, unparsedLength);
+
+    static SBuf statusBuf;
+    statusBuf.assign(start, statusAreaLength);
+    Parser::Tokenizer tok(statusBuf);
+    try {
+        One::ResponseParser::ParseResponseStatus(tok, status_);
+    } catch (const Parser::InsufficientInput &) {
+        debugs(57, 7, "need more; have " << unparsedLength);
+        return false;
+    } catch (...) {
+        debugs(57, 3, "cannot parse status-code area: " << CurrentException);
+        return false;
+    }
 
     // XXX check if the given 'reason' is the default status string, if not save to reason_
 
diff -u -r -N squid-5.0.5/src/http/StatusLine.h squid-5.0.6/src/http/StatusLine.h
--- squid-5.0.5/src/http/StatusLine.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/StatusLine.h	2021-05-10 21:02:34.000000000 +1200
@@ -20,7 +20,7 @@
 {
 
 /**
- * Holds the values parsed from an HTTP reply status line.
+ * Holds the values parsed from an HTTP-like reply status line.
  *
  * For example: HTTP/1.1 200 OK
  */
@@ -59,22 +59,14 @@
 public:
     /* public, read only */
 
-    /**
-     * By rights protocol name should be a constant "HTTP", with no need for this field to exist.
-     * However there are protocols which violate HTTP by sending their own custom formats
-     * back with other protocol names (ICY streaming format being the current major problem).
-     */
-    // XXX: protocol is part of AnyP::ProtocolVersion. We should be able to use version.protocol instead now.
-    AnyP::ProtocolType protocol;
-
     AnyP::ProtocolVersion version;     ///< breakdown of protocol version label: (HTTP/ICY) and (0.9/1.0/1.1)
 
 private:
     /// status code. ie 100 ... 200 ... 404 ... 599
-    Http::StatusCode status_;
+    Http::StatusCode status_ = scNone;
 
     /// points to a _constant_ string (default or supplied), never free()d
-    const char *reason_;
+    const char *reason_ = nullptr;
 };
 
 } // namespace Http
diff -u -r -N squid-5.0.5/src/http/Stream.cc squid-5.0.6/src/http/Stream.cc
--- squid-5.0.5/src/http/Stream.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/Stream.cc	2021-05-10 21:02:34.000000000 +1200
@@ -54,7 +54,7 @@
     assert(!connRegistered_);
     assert(getConn());
     connRegistered_ = true;
-    getConn()->pipeline.add(Http::StreamPointer(this));
+    getConn()->add(this);
 }
 
 bool
@@ -171,12 +171,13 @@
             return start;
         }
 
-    } else if (reply && reply->contentRange()) {
+    } else if (const auto cr = reply ? reply->contentRange() : nullptr) {
         /* request does not have ranges, but reply does */
         /* TODO: should use range_iter_pos on reply, as soon as reply->content_range
          *        becomes HttpHdrRange rather than HttpHdrRangeSpec.
          */
-        return http->out.offset + reply->contentRange()->spec.offset;
+        if (cr->spec.offset != HttpHdrRangeSpec::UnknownPosition)
+            return http->out.offset + cr->spec.offset;
     }
 
     return http->out.offset;
@@ -240,6 +241,10 @@
 
             // did we get at least what we expected, based on range specs?
 
+            // this Content-Range does not tell us how many bytes to expect
+            if (bytesExpected == HttpHdrRangeSpec::UnknownPosition)
+                return STREAM_NONE;
+
             if (bytesSent == bytesExpected) // got everything
                 return STREAM_COMPLETE;
 
@@ -470,59 +475,27 @@
     } else {
         /* XXX: TODO: Review, this unconditional set may be wrong. */
         rep->sline.set(rep->sline.version, Http::scPartialContent);
-        // web server responded with a valid, but unexpected range.
-        // will (try-to) forward as-is.
-        //TODO: we should cope with multirange request/responses
-        // TODO: review, since rep->content_range is always nil here.
-        bool replyMatchRequest = contentRange != nullptr ?
-                                 request->range->contains(contentRange->spec) :
-                                 true;
+
+        // before range_iter accesses
+        const auto actual_clen = http->prepPartialResponseGeneration();
+
         const int spec_count = http->request->range->specs.size();
-        int64_t actual_clen = -1;
 
         debugs(33, 3, "range spec count: " << spec_count <<
                " virgin clen: " << rep->content_length);
         assert(spec_count > 0);
         /* append appropriate header(s) */
         if (spec_count == 1) {
-            if (!replyMatchRequest) {
-                hdr->putContRange(contentRange);
-                actual_clen = rep->content_length;
-                //http->range_iter.pos = rep->content_range->spec.begin();
-                (*http->range_iter.pos)->offset = contentRange->spec.offset;
-                (*http->range_iter.pos)->length = contentRange->spec.length;
-
-            } else {
-                HttpHdrRange::iterator pos = http->request->range->begin();
-                assert(*pos);
-                /* append Content-Range */
-
-                if (!contentRange) {
-                    /* No content range, so this was a full object we are
-                     * sending parts of.
-                     */
-                    httpHeaderAddContRange(hdr, **pos, rep->content_length);
-                }
-
-                /* set new Content-Length to the actual number of bytes
-                 * transmitted in the message-body */
-                actual_clen = (*pos)->length;
-            }
+            const auto singleSpec = *http->request->range->begin();
+            assert(singleSpec);
+            httpHeaderAddContRange(hdr, *singleSpec, rep->content_length);
         } else {
             /* multipart! */
-            /* generate boundary string */
-            http->range_iter.boundary = http->rangeBoundaryStr();
             /* delete old Content-Type, add ours */
             hdr->delById(Http::HdrType::CONTENT_TYPE);
             httpHeaderPutStrf(hdr, Http::HdrType::CONTENT_TYPE,
                               "multipart/byteranges; boundary=\"" SQUIDSTRINGPH "\"",
                               SQUIDSTRINGPRINT(http->range_iter.boundary));
-            /* Content-Length is not required in multipart responses
-             * but it is always nice to have one */
-            actual_clen = http->mRangeCLen();
-
-            /* http->out needs to start where we want data at */
-            http->out.offset = http->range_iter.currentSpec()->offset;
         }
 
         /* replace Content-Length header */
@@ -530,9 +503,6 @@
         hdr->delById(Http::HdrType::CONTENT_LENGTH);
         hdr->putInt64(Http::HdrType::CONTENT_LENGTH, actual_clen);
         debugs(33, 3, "actual content length: " << actual_clen);
-
-        /* And start the range iter off */
-        http->range_iter.updateSpec();
     }
 }
 
@@ -560,12 +530,11 @@
 
 /// remembers the abnormal connection termination for logging purposes
 void
-Http::Stream::noteIoError(const int xerrno)
+Http::Stream::noteIoError(const Error &error, const LogTagsErrors &lte)
 {
     if (http) {
-        http->logType.err.timedout = (xerrno == ETIMEDOUT);
-        // aborted even if xerrno is zero (which means read abort/eof)
-        http->logType.err.aborted = (xerrno != ETIMEDOUT);
+        http->updateError(error);
+        http->logType.err.update(lte);
     }
 }
 
diff -u -r -N squid-5.0.5/src/http/Stream.h squid-5.0.6/src/http/Stream.h
--- squid-5.0.5/src/http/Stream.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http/Stream.h	2021-05-10 21:02:34.000000000 +1200
@@ -116,7 +116,7 @@
     ConnStateData *getConn() const;
 
     /// update state to reflect I/O error
-    void noteIoError(const int xerrno);
+    void noteIoError(const Error &, const LogTagsErrors &);
 
     /// cleanup when the transaction has finished. may destroy 'this'
     void finished();
diff -u -r -N squid-5.0.5/src/http/url_rewriters/LFS/url_lfs_rewrite.8 squid-5.0.6/src/http/url_rewriters/LFS/url_lfs_rewrite.8
--- squid-5.0.5/src/http/url_rewriters/LFS/url_lfs_rewrite.8	2021-02-08 13:46:40.000000000 +1300
+++ squid-5.0.6/src/http/url_rewriters/LFS/url_lfs_rewrite.8	2021-05-10 23:02:24.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "URL_LFS_REWRITE 8"
-.TH URL_LFS_REWRITE 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH URL_LFS_REWRITE 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/http.cc squid-5.0.6/src/http.cc
--- squid-5.0.5/src/http.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/http.cc	2021-05-10 21:02:34.000000000 +1200
@@ -24,7 +24,7 @@
 #include "comm/Read.h"
 #include "comm/Write.h"
 #include "CommRead.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
 #include "errorpage.h"
 #include "fd.h"
 #include "fde.h"
@@ -67,15 +67,6 @@
 #include "DelayPools.h"
 #endif
 
-#define SQUID_ENTER_THROWING_CODE() try {
-#define SQUID_EXIT_THROWING_CODE(status) \
-    status = true; \
-    } \
-    catch (const std::exception &e) { \
-    debugs (11, 1, "Exception error:" << e.what()); \
-    status = false; \
-    }
-
 CBDATA_CLASS_INIT(HttpStateData);
 
 static const char *const crlf = "\r\n";
@@ -687,6 +678,9 @@
             hp = new Http1::ResponseParser;
 
         bool parsedOk = hp->parse(inBuf);
+        // remember the actual received status-code before returning on errors,
+        // overwriting any previously stored value from earlier forwarding attempts
+        request->hier.peer_reply_status = hp->messageStatus(); // may still be scNone
 
         // sync the buffers after parsing.
         inBuf = hp->remaining();
@@ -736,18 +730,11 @@
     // XXX: RFC 7230 indicates we MAY ignore the reason phrase,
     //      and use an empty string on unknown status.
     //      We do that now to avoid performance regression from using SBuf::c_str()
-    newrep->sline.set(Http::ProtocolVersion(1,1), hp->messageStatus() /* , hp->reasonPhrase() */);
-    newrep->sline.protocol = newrep->sline.version.protocol = hp->messageProtocol().protocol;
-    newrep->sline.version.major = hp->messageProtocol().major;
-    newrep->sline.version.minor = hp->messageProtocol().minor;
+    newrep->sline.set(hp->messageProtocol(), hp->messageStatus() /* , hp->reasonPhrase() */);
 
     // parse headers
     if (!newrep->parseHeader(*hp)) {
-        // XXX: when Http::ProtocolVersion is a function, remove this hack. just set with messageProtocol()
-        newrep->sline.set(Http::ProtocolVersion(), Http::scInvalidHeader);
-        newrep->sline.version.protocol = hp->messageProtocol().protocol;
-        newrep->sline.version.major = hp->messageProtocol().major;
-        newrep->sline.version.minor = hp->messageProtocol().minor;
+        newrep->sline.set(hp->messageProtocol(), Http::scInvalidHeader);
         debugs(11, 2, "error parsing response headers mime block");
     }
 
@@ -758,14 +745,14 @@
 
     newrep->removeStaleWarnings();
 
-    if (newrep->sline.protocol == AnyP::PROTO_HTTP && Http::Is1xx(newrep->sline.status())) {
+    if (newrep->sline.version.protocol == AnyP::PROTO_HTTP && Http::Is1xx(newrep->sline.status())) {
         handle1xx(newrep);
         ctx_exit(ctx);
         return;
     }
 
     flags.chunked = false;
-    if (newrep->sline.protocol == AnyP::PROTO_HTTP && newrep->header.chunked()) {
+    if (newrep->sline.version.protocol == AnyP::PROTO_HTTP && newrep->header.chunked()) {
         flags.chunked = true;
         httpChunkDecoder = new Http1::TeChunkedParser;
     }
@@ -782,8 +769,6 @@
 
     processSurrogateControl (vrep);
 
-    request->hier.peer_reply_status = newrep->sline.status();
-
     ctx_exit(ctx);
 }
 
@@ -1329,6 +1314,11 @@
         Must(!flags.headers_parsed);
     }
 
+    if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) {
+        abortTransaction("store entry aborted while we were waiting for processReply()");
+        return;
+    }
+
     if (!flags.headers_parsed) { // have not parsed headers yet?
         PROF_start(HttpStateData_processReplyHeader);
         processReplyHeader();
@@ -1460,26 +1450,25 @@
 bool
 HttpStateData::decodeAndWriteReplyBody()
 {
-    const char *data = NULL;
-    int len;
-    bool wasThereAnException = false;
     assert(flags.chunked);
     assert(httpChunkDecoder);
-    SQUID_ENTER_THROWING_CODE();
-    MemBuf decodedData;
-    decodedData.init();
-    httpChunkDecoder->setPayloadBuffer(&decodedData);
-    const bool doneParsing = httpChunkDecoder->parse(inBuf);
-    inBuf = httpChunkDecoder->remaining(); // sync buffers after parse
-    len = decodedData.contentSize();
-    data=decodedData.content();
-    addVirginReplyBody(data, len);
-    if (doneParsing) {
-        lastChunk = 1;
-        flags.do_next_read = false;
+    try {
+        MemBuf decodedData;
+        decodedData.init();
+        httpChunkDecoder->setPayloadBuffer(&decodedData);
+        const bool doneParsing = httpChunkDecoder->parse(inBuf);
+        inBuf = httpChunkDecoder->remaining(); // sync buffers after parse
+        addVirginReplyBody(decodedData.content(), decodedData.contentSize());
+        if (doneParsing) {
+            lastChunk = 1;
+            flags.do_next_read = false;
+        }
+        return true;
+    }
+    catch (...) {
+        debugs (11, 2, "de-chunking failure: " << CurrentException);
     }
-    SQUID_EXIT_THROWING_CODE(wasThereAnException);
-    return wasThereAnException;
+    return false;
 }
 
 /**
@@ -2629,7 +2618,8 @@
         // should not matter because either client-side will provide its own or
         // there will be no response at all (e.g., if the the client has left).
         const auto err = new ErrorState(ERR_ICAP_FAILURE, Http::scInternalServerError, fwd->request, fwd->al);
-        err->detailError(ERR_DETAIL_SRV_REQMOD_REQ_BODY);
+        static const auto d = MakeNamedErrorDetail("SRV_REQMOD_REQ_BODY");
+        err->detailError(d);
         fwd->fail(err);
     }
 
diff -u -r -N squid-5.0.5/src/HttpHdrContRange.cc squid-5.0.6/src/HttpHdrContRange.cc
--- squid-5.0.5/src/HttpHdrContRange.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/HttpHdrContRange.cc	2021-05-10 21:02:34.000000000 +1200
@@ -161,9 +161,13 @@
 
     ++p;
 
-    if (*p == '*')
+    if (*p == '*') {
+        if (!known_spec(range->spec.offset)) {
+            debugs(68, 2, "invalid (*/*) content-range-spec near: '" << str << "'");
+            return 0;
+        }
         range->elength = range_spec_unknown;
-    else if (!httpHeaderParseOffset(p, &range->elength))
+    } else if (!httpHeaderParseOffset(p, &range->elength))
         return 0;
     else if (range->elength <= 0) {
         /* Additional paranoidal check for BUG2155 - entity-length MUST be > 0 */
@@ -174,6 +178,12 @@
         return 0;
     }
 
+    // reject unsatisfied-range and such; we only use well-defined ranges today
+    if (!known_spec(range->spec.offset) || !known_spec(range->spec.length)) {
+        debugs(68, 2, "unwanted content-range-spec near: '" << str << "'");
+        return 0;
+    }
+
     debugs(68, 8, "parsed content-range field: " <<
            (long int) range->spec.offset << "-" <<
            (long int) range->spec.offset + range->spec.length - 1 << " / " <<
diff -u -r -N squid-5.0.5/src/HttpHdrRange.cc squid-5.0.6/src/HttpHdrRange.cc
--- squid-5.0.5/src/HttpHdrRange.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/HttpHdrRange.cc	2021-05-10 21:02:34.000000000 +1200
@@ -226,7 +226,7 @@
     int ilen;
     assert(range_spec);
     ++ParsedCount;
-    debugs(64, 8, "parsing range field: '" << range_spec << "'");
+    debugs(64, 8, "parsing range field: '" << *range_spec << "'");
     /* check range type */
 
     if (range_spec->caseCmp("bytes=", 6))
@@ -247,7 +247,7 @@
                 delete specs.back();
                 specs.pop_back();
             }
-            debugs(64, 2, "ignoring invalid range field: '" << range_spec << "'");
+            debugs(64, 2, "ignoring invalid range field: '" << *range_spec << "'");
             break;
         }
 
@@ -526,23 +526,6 @@
     return true;
 }
 
-bool
-HttpHdrRange::contains(const HttpHdrRangeSpec& r) const
-{
-    assert(r.length >= 0);
-    HttpHdrRangeSpec::HttpRange rrange(r.offset, r.offset + r.length);
-
-    for (const_iterator i = begin(); i != end(); ++i) {
-        HttpHdrRangeSpec::HttpRange irange((*i)->offset, (*i)->offset + (*i)->length);
-        HttpHdrRangeSpec::HttpRange intersection = rrange.intersection(irange);
-
-        if (intersection.start == irange.start && intersection.size() == irange.size())
-            return true;
-    }
-
-    return false;
-}
-
 const HttpHdrRangeSpec *
 HttpHdrRangeIter::currentSpec() const
 {
diff -u -r -N squid-5.0.5/src/HttpHdrSc.cc squid-5.0.6/src/HttpHdrSc.cc
--- squid-5.0.5/src/HttpHdrSc.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/HttpHdrSc.cc	2021-05-10 21:02:34.000000000 +1200
@@ -108,7 +108,7 @@
         type = scLookupTable.lookup(SBuf(item,ilen));
 
         if (type == SC_ENUM_END) {
-            debugs(90, 2, "hdr sc: unknown control-directive: near '" << item << "' in '" << str << "'");
+            debugs(90, 2, "unknown control-directive near '" << item << "' in '" << *str << "'");
             type = SC_OTHER;
         }
 
@@ -132,7 +132,7 @@
 
         if (sct->isSet(type)) {
             if (type != SC_OTHER)
-                debugs(90, 2, "hdr sc: ignoring duplicate control-directive: near '" << item << "' in '" << str << "'");
+                debugs(90, 2, "ignoring duplicate control-directive near '" << item << "' in '" << *str << "'");
 
             ++ scHeaderStats[type].repCount;
 
@@ -336,6 +336,16 @@
     HttpHdrScTarget *sctus = findTarget(ourtarget);
     HttpHdrScTarget *sctgeneric = findTarget(NULL);
 
+    /* W3C Edge Architecture Specification 1.0 section 3
+     *
+     * "If more than one is targeted at a surrogate, the most specific applies.
+     *  For example,
+     *    Surrogate-Control: max-age=60, no-store;abc
+     *  The surrogate that identified itself as 'abc' would apply no-store;
+     *  others would apply max-age=60.
+     *
+     * XXX: the if statements below will *merge* the no-store and max-age settings.
+     */
     if (sctgeneric || sctus) {
         HttpHdrScTarget *sctusable = new HttpHdrScTarget(NULL);
 
diff -u -r -N squid-5.0.5/src/HttpHeader.cc squid-5.0.6/src/HttpHeader.cc
--- squid-5.0.5/src/HttpHeader.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/HttpHeader.cc	2021-05-10 21:02:34.000000000 +1200
@@ -35,6 +35,7 @@
 #include "util.h"
 
 #include <algorithm>
+#include <array>
 
 /* XXX: the whole set of API managing the entries vector should be rethought
  *      after the parse4r-ng effort is complete.
@@ -74,7 +75,7 @@
 
 /* header accounting */
 // NP: keep in sync with enum http_hdr_owner_type
-static HttpHeaderStat HttpHeaderStats[] = {
+static std::array<HttpHeaderStat, hoEnd> HttpHeaderStats = {
     HttpHeaderStat(/*hoNone*/ "all", NULL),
 #if USE_HTCP
     HttpHeaderStat(/*hoHtcpReply*/ "HTCP reply", &ReplyHeadersMask),
@@ -82,11 +83,10 @@
     HttpHeaderStat(/*hoRequest*/ "request", &RequestHeadersMask),
     HttpHeaderStat(/*hoReply*/ "reply", &ReplyHeadersMask)
 #if USE_OPENSSL
-    /* hoErrorDetail */
+    , HttpHeaderStat(/*hoErrorDetail*/ "error detail templates", nullptr)
 #endif
     /* hoEnd */
 };
-static int HttpHeaderStatCount = countof(HttpHeaderStats);
 
 static int HeaderEntryParsedCount = 0;
 
@@ -129,8 +129,8 @@
             CBIT_SET(ReplyHeadersMask,h);
     }
 
-    /* header stats initialized by class constructor */
-    assert(HttpHeaderStatCount == hoReply + 1);
+    assert(HttpHeaderStats[0].label && "httpHeaderInitModule() called via main()");
+    assert(HttpHeaderStats[hoEnd-1].label && "HttpHeaderStats created with all elements");
 
     /* init dependent modules */
     httpHdrCcInitModule();
@@ -539,11 +539,10 @@
         if (delById(Http::HdrType::CONTENT_LENGTH))
             debugs(55, 3, "Content-Length is " << clen.prohibitedAndIgnored());
 
-        // RFC 7230 section 3.3.1 has the same criteria forbid Transfer-Encoding
-        if (delById(Http::HdrType::TRANSFER_ENCODING)) {
+        // The same RFC 7230 3.3.3#1-based logic applies to Transfer-Encoding
+        // banned by RFC 7230 section 3.3.1.
+        if (delById(Http::HdrType::TRANSFER_ENCODING))
             debugs(55, 3, "Transfer-Encoding is " << clen.prohibitedAndIgnored());
-            teUnsupported_ = true;
-        }
 
     } else if (getByIdIfPresent(Http::HdrType::TRANSFER_ENCODING, &rawTe)) {
         // RFC 2616 section 4.4: ignore Content-Length with Transfer-Encoding
@@ -1640,6 +1639,9 @@
     assert(hs);
     assert(e);
 
+    if (!hs->owner_mask)
+        return; // these HttpHeaderStat objects were not meant to be dumped here
+
     dump_stat = hs;
     storeAppendPrintf(e, "\nHeader Stats: %s\n", hs->label);
     storeAppendPrintf(e, "\nField type distribution\n");
@@ -1665,7 +1667,6 @@
 void
 httpHeaderStoreReport(StoreEntry * e)
 {
-    int i;
     assert(e);
 
     HttpHeaderStats[0].parsedCount =
@@ -1677,9 +1678,8 @@
     HttpHeaderStats[0].busyDestroyedCount =
         HttpHeaderStats[hoRequest].busyDestroyedCount + HttpHeaderStats[hoReply].busyDestroyedCount;
 
-    for (i = 1; i < HttpHeaderStatCount; ++i) {
-        httpHeaderStatDump(HttpHeaderStats + i, e);
-    }
+    for (const auto &stats: HttpHeaderStats)
+        httpHeaderStatDump(&stats, e);
 
     /* field stats for all messages */
     storeAppendPrintf(e, "\nHttp Fields Stats (replies and requests)\n");
diff -u -r -N squid-5.0.5/src/HttpHeaderRange.h squid-5.0.6/src/HttpHeaderRange.h
--- squid-5.0.5/src/HttpHeaderRange.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/HttpHeaderRange.h	2021-05-10 21:02:34.000000000 +1200
@@ -18,8 +18,11 @@
 class HttpReply;
 class Packable;
 
-/* http byte-range-spec */
-
+// TODO: Refactor to disambiguate and provide message-specific APIs.
+/// either byte-range-spec (in a request Range header)
+/// or suffix-byte-range-spec (in a request Range header)
+/// or byte-range part of byte-range-resp (in a response Content-Range header)
+/// or "*" part of unsatisfied-range (in a response Content-Range header)
 class HttpHdrRangeSpec
 {
     MEMPROXY_CLASS(HttpHdrRangeSpec);
@@ -78,7 +81,6 @@
     int64_t firstOffset() const;
     int64_t lowestOffset(int64_t) const;
     bool offsetLimitExceeded(const int64_t limit) const;
-    bool contains(const HttpHdrRangeSpec& r) const;
     std::vector<HttpHdrRangeSpec *> specs;
 
 private:
@@ -100,9 +102,9 @@
     void updateSpec();
     int64_t debt() const;
     void debt(int64_t);
-    int64_t debt_size;      /* bytes left to send from the current spec */
+    int64_t debt_size = 0;  /* bytes left to send from the current spec */
     String boundary;        /* boundary for multipart responses */
-    bool valid;
+    bool valid = false;
 };
 
 #endif /* SQUID_HTTPHEADERRANGE_H */
diff -u -r -N squid-5.0.5/src/HttpRequest.cc squid-5.0.6/src/HttpRequest.cc
--- squid-5.0.5/src/HttpRequest.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/HttpRequest.cc	2021-05-10 21:02:34.000000000 +1200
@@ -17,7 +17,7 @@
 #include "client_side_request.h"
 #include "dns/LookupDetails.h"
 #include "Downloader.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
 #include "globals.h"
 #include "gopher.h"
 #include "http.h"
@@ -91,8 +91,7 @@
     body_pipe = NULL;
     // hier
     dnsWait = -1;
-    errType = ERR_NONE;
-    errDetail = ERR_DETAIL_NONE;
+    error.clear();
     peer_login = NULL;      // not allocated/deallocated by this class
     peer_domain = NULL;     // not allocated/deallocated by this class
     peer_host = NULL;
@@ -193,7 +192,7 @@
     copy->imslen = imslen;
     copy->hier = hier; // Is it safe to copy? Should we?
 
-    copy->errType = errType;
+    copy->error = error;
 
     // XXX: what to do with copy->peer_login?
 
@@ -238,8 +237,7 @@
     // may eventually need cloneNullAdaptationImmune() for that.
     flags = aReq->flags.cloneAdaptationImmune();
 
-    errType = aReq->errType;
-    errDetail = aReq->errDetail;
+    error = aReq->error;
 #if USE_AUTH
     auth_user_request = aReq->auth_user_request;
     extacl_user = aReq->extacl_user;
@@ -268,7 +266,7 @@
  * NP: Other errors are left for detection later in the parse.
  */
 bool
-HttpRequest::sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error)
+HttpRequest::sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *scode)
 {
     // content is long enough to possibly hold a reply
     // 2 being magic size of a 1-byte request method plus space delimiter
@@ -276,7 +274,7 @@
         // 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::scInvalidHeader;
+            *scode = Http::scInvalidHeader;
         }
         return false;
     }
@@ -286,7 +284,7 @@
     m.HttpRequestMethodXXX(buf);
     if (m == Http::METHOD_NONE) {
         debugs(73, 3, "HttpRequest::sanityCheckStartLine: did not find HTTP request method");
-        *error = Http::scInvalidHeader;
+        *scode = Http::scInvalidHeader;
         return false;
     }
 
@@ -465,25 +463,10 @@
 }
 
 void
-HttpRequest::detailError(err_type aType, int aDetail)
-{
-    if (errType || errDetail)
-        debugs(11, 5, HERE << "old error details: " << errType << '/' << errDetail);
-    debugs(11, 5, HERE << "current error details: " << aType << '/' << aDetail);
-    // checking type and detail separately may cause inconsistency, but
-    // may result in more details available if they only become available later
-    if (!errType)
-        errType = aType;
-    if (!errDetail)
-        errDetail = aDetail;
-}
-
-void
 HttpRequest::clearError()
 {
-    debugs(11, 7, HERE << "old error details: " << errType << '/' << errDetail);
-    errType = ERR_NONE;
-    errDetail = ERR_DETAIL_NONE;
+    debugs(11, 7, "old: " << error);
+    error.clear();
 }
 
 void
diff -u -r -N squid-5.0.5/src/HttpRequest.h squid-5.0.6/src/HttpRequest.h
--- squid-5.0.5/src/HttpRequest.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/HttpRequest.h	2021-05-10 21:02:34.000000000 +1200
@@ -12,7 +12,7 @@
 #include "anyp/Uri.h"
 #include "base/CbcPointer.h"
 #include "dns/forward.h"
-#include "err_type.h"
+#include "error/Error.h"
 #include "HierarchyLogEntry.h"
 #include "http/Message.h"
 #include "http/RequestMethod.h"
@@ -98,7 +98,7 @@
     void recordLookup(const Dns::LookupDetails &detail);
 
     /// sets error detail if no earlier detail was available
-    void detailError(err_type aType, int aDetail);
+    void detailError(const err_type c, const ErrorDetail::Pointer &d) { error.update(c, d); }
     /// clear error details, useful for retries/repeats
     void clearError();
 
@@ -158,8 +158,7 @@
 
     int dnsWait; ///< sum of DNS lookup delays in milliseconds, for %dt
 
-    err_type errType;
-    int errDetail; ///< errType-specific detail about the transaction error
+    Error error; ///< the first transaction problem encountered (or falsy)
 
     char *peer_login;       /* Configured peer login:password */
 
diff -u -r -N squid-5.0.5/src/icmp/Makefile.am squid-5.0.6/src/icmp/Makefile.am
--- squid-5.0.5/src/icmp/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/icmp/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -20,17 +20,17 @@
 
 # ICMP API definition ...
 libicmpcore_la_SOURCES = \
-	Icmp.h \
-	Icmp.cc
+	Icmp.cc \
+	Icmp.h
 
 # Squid Internal ICMP helper interface
 libicmp_la_SOURCES = \
 	IcmpConfig.cc \
 	IcmpConfig.h \
-	IcmpSquid.h \
 	IcmpSquid.cc \
-	net_db.h \
-	net_db.cc
+	IcmpSquid.h \
+	net_db.cc \
+	net_db.h
 
 libicmp_la_LIBADD= libicmpcore.la
 
@@ -50,12 +50,12 @@
 # ICMP lookup helper
 pinger_SOURCES = \
 	Icmp.h \
-	IcmpPinger.h \
-	IcmpPinger.cc \
-	Icmp4.h \
 	Icmp4.cc \
-	Icmp6.h \
+	Icmp4.h \
 	Icmp6.cc \
+	Icmp6.h \
+	IcmpPinger.cc \
+	IcmpPinger.h \
 	pinger.cc
 nodist_pinger_SOURCES = $(COPIED_SOURCE)
 pinger_LDFLAGS = $(LIBADD_DL)
diff -u -r -N squid-5.0.5/src/icmp/Makefile.in squid-5.0.6/src/icmp/Makefile.in
--- squid-5.0.5/src/icmp/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/icmp/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -178,8 +178,8 @@
 libicmpcore_la_LIBADD =
 am_libicmpcore_la_OBJECTS = Icmp.lo
 libicmpcore_la_OBJECTS = $(am_libicmpcore_la_OBJECTS)
-am_pinger_OBJECTS = IcmpPinger.$(OBJEXT) Icmp4.$(OBJEXT) \
-	Icmp6.$(OBJEXT) pinger.$(OBJEXT)
+am_pinger_OBJECTS = Icmp4.$(OBJEXT) Icmp6.$(OBJEXT) \
+	IcmpPinger.$(OBJEXT) pinger.$(OBJEXT)
 am__dirstamp = $(am__leading_dot)dirstamp
 am__objects_1 = debug.$(OBJEXT) globals.$(OBJEXT) \
 	SquidConfig.$(OBJEXT) SquidNew.$(OBJEXT) \
@@ -768,18 +768,18 @@
 
 # ICMP API definition ...
 libicmpcore_la_SOURCES = \
-	Icmp.h \
-	Icmp.cc
+	Icmp.cc \
+	Icmp.h
 
 
 # Squid Internal ICMP helper interface
 libicmp_la_SOURCES = \
 	IcmpConfig.cc \
 	IcmpConfig.h \
-	IcmpSquid.h \
 	IcmpSquid.cc \
-	net_db.h \
-	net_db.cc
+	IcmpSquid.h \
+	net_db.cc \
+	net_db.h
 
 libicmp_la_LIBADD = libicmpcore.la
 
@@ -800,12 +800,12 @@
 # ICMP lookup helper
 pinger_SOURCES = \
 	Icmp.h \
-	IcmpPinger.h \
-	IcmpPinger.cc \
-	Icmp4.h \
 	Icmp4.cc \
-	Icmp6.h \
+	Icmp4.h \
 	Icmp6.cc \
+	Icmp6.h \
+	IcmpPinger.cc \
+	IcmpPinger.h \
 	pinger.cc
 
 nodist_pinger_SOURCES = $(COPIED_SOURCE)
diff -u -r -N squid-5.0.5/src/ident/Makefile.am squid-5.0.6/src/ident/Makefile.am
--- squid-5.0.5/src/ident/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ident/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,8 +11,8 @@
 noinst_LTLIBRARIES = libident.la
 
 libident_la_SOURCES = \
-	AclIdent.h \
 	AclIdent.cc \
+	AclIdent.h \
 	Config.h \
 	Ident.cc \
 	Ident.h
diff -u -r -N squid-5.0.5/src/ident/Makefile.in squid-5.0.6/src/ident/Makefile.in
--- squid-5.0.5/src/ident/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/ident/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -728,8 +728,8 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libident.la
 libident_la_SOURCES = \
-	AclIdent.h \
 	AclIdent.cc \
+	AclIdent.h \
 	Config.h \
 	Ident.cc \
 	Ident.h
diff -u -r -N squid-5.0.5/src/ip/Address.h squid-5.0.6/src/ip/Address.h
--- squid-5.0.5/src/ip/Address.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ip/Address.h	2021-05-10 21:02:34.000000000 +1200
@@ -41,7 +41,7 @@
 {
 
 public:
-    /** @name Constructors and Destructor */
+    /** @name Constructors */
     /*@{*/
     Address() { setEmpty(); }
     Address(const struct in_addr &);
@@ -51,7 +51,6 @@
     Address(const struct hostent &);
     Address(const struct addrinfo &);
     Address(const char*);
-    ~Address() {}
     /*@}*/
 
     /** @name Assignment Operators */
diff -u -r -N squid-5.0.5/src/ip/Makefile.am squid-5.0.6/src/ip/Makefile.am
--- squid-5.0.5/src/ip/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ip/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,14 +11,14 @@
 noinst_LTLIBRARIES = libip.la
 
 libip_la_SOURCES = \
-	forward.h \
-	Address.h \
 	Address.cc \
-	Intercept.h \
+	Address.h \
 	Intercept.cc \
-	NfMarkConfig.h \
+	Intercept.h \
 	NfMarkConfig.cc \
-	QosConfig.h \
+	NfMarkConfig.h \
 	QosConfig.cc \
+	QosConfig.h \
+	forward.h \
 	tools.cc \
 	tools.h
diff -u -r -N squid-5.0.5/src/ip/Makefile.in squid-5.0.6/src/ip/Makefile.in
--- squid-5.0.5/src/ip/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/ip/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -731,15 +731,15 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libip.la
 libip_la_SOURCES = \
-	forward.h \
-	Address.h \
 	Address.cc \
-	Intercept.h \
+	Address.h \
 	Intercept.cc \
-	NfMarkConfig.h \
+	Intercept.h \
 	NfMarkConfig.cc \
-	QosConfig.h \
+	NfMarkConfig.h \
 	QosConfig.cc \
+	QosConfig.h \
+	forward.h \
 	tools.cc \
 	tools.h
 
diff -u -r -N squid-5.0.5/src/ip/QosConfig.cc squid-5.0.6/src/ip/QosConfig.cc
--- squid-5.0.5/src/ip/QosConfig.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ip/QosConfig.cc	2021-05-10 21:02:34.000000000 +1200
@@ -20,6 +20,7 @@
 #include "Parsing.h"
 
 #include <cerrno>
+#include <limits>
 
 CBDATA_CLASS_INIT(acl_tos);
 
diff -u -r -N squid-5.0.5/src/ipc/Coordinator.cc squid-5.0.6/src/ipc/Coordinator.cc
--- squid-5.0.5/src/ipc/Coordinator.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Coordinator.cc	2021-05-10 21:02:34.000000000 +1200
@@ -78,13 +78,13 @@
 
 void Ipc::Coordinator::receive(const TypedMsgHdr& message)
 {
-    switch (message.type()) {
-    case mtRegistration:
+    switch (message.rawType()) {
+    case mtRegisterStrand:
         debugs(54, 6, HERE << "Registration request");
-        handleRegistrationRequest(HereIamMessage(message));
+        handleRegistrationRequest(StrandMessage(message));
         break;
 
-    case mtStrandSearchRequest: {
+    case mtFindStrand: {
         const StrandSearchRequest sr(message);
         debugs(54, 6, HERE << "Strand search request: " << sr.requestorId <<
                " tag: " << sr.tag);
@@ -107,7 +107,7 @@
     case mtCacheMgrResponse: {
         debugs(54, 6, HERE << "Cache manager response");
         const Mgr::Response resp(message);
-        handleCacheMgrResponse(resp);
+        handleCacheMgrResponse(Mine(resp));
     }
     break;
 
@@ -122,24 +122,24 @@
     case mtSnmpResponse: {
         debugs(54, 6, HERE << "SNMP response");
         const Snmp::Response resp(message);
-        handleSnmpResponse(resp);
+        handleSnmpResponse(Mine(resp));
     }
     break;
 #endif
 
     default:
-        debugs(54, DBG_IMPORTANT, HERE << "Unhandled message type: " << message.type());
+        Port::receive(message);
         break;
     }
 }
 
-void Ipc::Coordinator::handleRegistrationRequest(const HereIamMessage& msg)
+void Ipc::Coordinator::handleRegistrationRequest(const StrandMessage& msg)
 {
     registerStrand(msg.strand);
 
     // send back an acknowledgement; TODO: remove as not needed?
     TypedMsgHdr message;
-    msg.pack(message);
+    msg.pack(mtStrandRegistered, message);
     SendMessage(MakeAddr(strandAddrLabel, msg.strand.kidId), message);
 }
 
@@ -222,9 +222,9 @@
 {
     debugs(54, 3, HERE << "tell kid" << request.requestorId << " that " <<
            request.tag << " is kid" << strand.kidId);
-    const StrandSearchResponse response(strand);
+    const StrandMessage response(strand, request.qid);
     TypedMsgHdr message;
-    response.pack(message);
+    response.pack(mtStrandReady, message);
     SendMessage(MakeAddr(strandAddrLabel, request.requestorId), message);
 }
 
diff -u -r -N squid-5.0.5/src/ipc/Coordinator.h squid-5.0.6/src/ipc/Coordinator.h
--- squid-5.0.5/src/ipc/Coordinator.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Coordinator.h	2021-05-10 21:02:34.000000000 +1200
@@ -47,7 +47,7 @@
 
     StrandCoord* findStrand(int kidId); ///< registered strand or NULL
     void registerStrand(const StrandCoord &); ///< adds or updates existing
-    void handleRegistrationRequest(const HereIamMessage &); ///< register,ACK
+    void handleRegistrationRequest(const StrandMessage &); ///< register,ACK
 
     /// answer the waiting search request
     void notifySearcher(const StrandSearchRequest &request, const StrandCoord&);
diff -u -r -N squid-5.0.5/src/ipc/Forwarder.cc squid-5.0.6/src/ipc/Forwarder.cc
--- squid-5.0.5/src/ipc/Forwarder.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Forwarder.cc	2021-05-10 21:02:34.000000000 +1200
@@ -16,12 +16,13 @@
 #include "HttpRequest.h"
 #include "ipc/Forwarder.h"
 #include "ipc/Port.h"
+#include "ipc/RequestId.h"
 #include "ipc/TypedMsgHdr.h"
 
 CBDATA_NAMESPACED_CLASS_INIT(Ipc, Forwarder);
 
 Ipc::Forwarder::RequestsMap Ipc::Forwarder::TheRequestsMap;
-unsigned int Ipc::Forwarder::LastRequestId = 0;
+Ipc::RequestId::Index Ipc::Forwarder::LastRequestId = 0;
 
 Ipc::Forwarder::Forwarder(Request::Pointer aRequest, double aTimeout):
     AsyncJob("Ipc::Forwarder"),
@@ -149,7 +150,7 @@
 
 /// returns and forgets the right Forwarder callback for the request
 AsyncCall::Pointer
-Ipc::Forwarder::DequeueRequest(unsigned int requestId)
+Ipc::Forwarder::DequeueRequest(const RequestId::Index requestId)
 {
     debugs(54, 3, HERE);
     Must(requestId != 0);
@@ -172,7 +173,7 @@
 }
 
 void
-Ipc::Forwarder::HandleRemoteAck(unsigned int requestId)
+Ipc::Forwarder::HandleRemoteAck(const RequestId requestId)
 {
     debugs(54, 3, HERE);
     Must(requestId != 0);
diff -u -r -N squid-5.0.5/src/ipc/Forwarder.h squid-5.0.6/src/ipc/Forwarder.h
--- squid-5.0.5/src/ipc/Forwarder.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Forwarder.h	2021-05-10 21:02:34.000000000 +1200
@@ -35,7 +35,7 @@
     virtual ~Forwarder();
 
     /// finds and calls the right Forwarder upon Coordinator's response
-    static void HandleRemoteAck(unsigned int requestId);
+    static void HandleRemoteAck(RequestId);
 
     /* has-to-be-public AsyncJob API */
     virtual void callException(const std::exception& e);
@@ -59,17 +59,17 @@
 
     void handleRemoteAck();
 
-    static AsyncCall::Pointer DequeueRequest(unsigned int requestId);
+    static AsyncCall::Pointer DequeueRequest(RequestId::Index);
 
 protected:
     Request::Pointer request;
     const double timeout; ///< response wait timeout in seconds
 
     /// maps request->id to Forwarder::handleRemoteAck callback
-    typedef std::map<unsigned int, AsyncCall::Pointer> RequestsMap;
+    typedef std::map<RequestId::Index, AsyncCall::Pointer> RequestsMap;
     static RequestsMap TheRequestsMap; ///< pending Coordinator requests
 
-    static unsigned int LastRequestId; ///< last requestId used
+    static RequestId::Index LastRequestId; ///< last requestId used
 };
 
 } // namespace Ipc
diff -u -r -N squid-5.0.5/src/ipc/forward.h squid-5.0.6/src/ipc/forward.h
--- squid-5.0.5/src/ipc/forward.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/forward.h	2021-05-10 21:02:34.000000000 +1200
@@ -14,14 +14,15 @@
 namespace Ipc
 {
 
-class TypedMsgHdr;
-class StrandCoord;
-class HereIamMessage;
-class StrandSearchResponse;
 class Forwarder;
 class Inquirer;
+class QuestionerId;
 class Request;
+class RequestId;
 class Response;
+class StrandCoord;
+class StrandMessage;
+class TypedMsgHdr;
 
 } // namespace Ipc
 
diff -u -r -N squid-5.0.5/src/ipc/Inquirer.cc squid-5.0.6/src/ipc/Inquirer.cc
--- squid-5.0.5/src/ipc/Inquirer.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Inquirer.cc	2021-05-10 21:02:34.000000000 +1200
@@ -21,7 +21,7 @@
 CBDATA_NAMESPACED_CLASS_INIT(Ipc, Inquirer);
 
 Ipc::Inquirer::RequestsMap Ipc::Inquirer::TheRequestsMap;
-unsigned int Ipc::Inquirer::LastRequestId = 0;
+Ipc::RequestId::Index Ipc::Inquirer::LastRequestId = 0;
 
 /// compare Ipc::StrandCoord using kidId, for std::sort() below
 static bool
@@ -139,7 +139,7 @@
 
 /// returns and forgets the right Inquirer callback for strand request
 AsyncCall::Pointer
-Ipc::Inquirer::DequeueRequest(unsigned int requestId)
+Ipc::Inquirer::DequeueRequest(const RequestId::Index requestId)
 {
     debugs(54, 3, HERE << " requestId " << requestId);
     Must(requestId != 0);
@@ -206,7 +206,7 @@
 {
     static MemBuf buf;
     buf.reset();
-    buf.appendf(" [request->requestId %u]", request->requestId);
+    buf.appendf(" [requestId %u]", request->requestId.index());
     buf.terminate();
     return buf.content();
 }
diff -u -r -N squid-5.0.5/src/ipc/Inquirer.h squid-5.0.6/src/ipc/Inquirer.h
--- squid-5.0.5/src/ipc/Inquirer.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Inquirer.h	2021-05-10 21:02:34.000000000 +1200
@@ -64,7 +64,7 @@
 
     void handleRemoteAck(Response::Pointer response);
 
-    static AsyncCall::Pointer DequeueRequest(unsigned int requestId);
+    static AsyncCall::Pointer DequeueRequest(RequestId::Index);
 
     static void RequestTimedOut(void* param);
     void requestTimedOut();
@@ -79,10 +79,10 @@
     const double timeout; ///< number of seconds to wait for strand response
 
     /// maps request->id to Inquirer::handleRemoteAck callback
-    typedef std::map<unsigned int, AsyncCall::Pointer> RequestsMap;
+    typedef std::map<RequestId::Index, AsyncCall::Pointer> RequestsMap;
     static RequestsMap TheRequestsMap; ///< pending strand requests
 
-    static unsigned int LastRequestId; ///< last requestId used
+    static RequestId::Index LastRequestId; ///< last requestId used
 };
 
 } // namespace Ipc
diff -u -r -N squid-5.0.5/src/ipc/Makefile.am squid-5.0.6/src/ipc/Makefile.am
--- squid-5.0.5/src/ipc/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,57 +11,60 @@
 noinst_LTLIBRARIES = libipc.la
 
 libipc_la_SOURCES = \
+	Coordinator.cc \
+	Coordinator.h \
 	FdNotes.cc \
 	FdNotes.h \
+	Forwarder.cc \
+	Forwarder.h \
+	Inquirer.cc \
+	Inquirer.h \
 	Kid.cc \
 	Kid.h \
 	Kids.cc \
 	Kids.h \
-	Messages.h \
 	MemMap.cc \
 	MemMap.h \
+	Messages.h \
+	Port.cc \
+	Port.h \
+	QuestionerId.cc \
+	QuestionerId.h \
 	Queue.cc \
 	Queue.h \
 	ReadWriteLock.cc \
 	ReadWriteLock.h \
+	Request.h \
+	RequestId.cc \
+	RequestId.h \
+	Response.h \
+	SharedListen.cc \
+	SharedListen.h \
 	StartListening.cc \
 	StartListening.h \
 	StoreMap.cc \
 	StoreMap.h \
+	Strand.cc \
+	Strand.h \
 	StrandCoord.cc \
 	StrandCoord.h \
 	StrandCoords.h \
 	StrandSearch.cc \
 	StrandSearch.h \
-	SharedListen.cc \
-	SharedListen.h \
 	TypedMsgHdr.cc \
 	TypedMsgHdr.h \
-	Coordinator.cc \
-	Coordinator.h \
 	UdsOp.cc \
 	UdsOp.h \
-	Port.cc \
-	Port.h \
-	Strand.cc \
-	Strand.h \
 	forward.h \
-	Forwarder.cc \
-	Forwarder.h \
-	Inquirer.cc \
-	Inquirer.h \
-	Request.h \
-	Response.h \
-	\
 	mem/FlexibleArray.h \
 	mem/Page.cc \
 	mem/Page.h \
 	mem/PagePool.cc \
 	mem/PagePool.h \
-	mem/Pages.cc \
-	mem/Pages.h \
 	mem/PageStack.cc \
 	mem/PageStack.h \
+	mem/Pages.cc \
+	mem/Pages.h \
 	mem/Pointer.h \
 	mem/Segment.cc \
 	mem/Segment.h \
diff -u -r -N squid-5.0.5/src/ipc/Makefile.in squid-5.0.6/src/ipc/Makefile.in
--- squid-5.0.5/src/ipc/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/ipc/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -166,12 +166,12 @@
 am__DEPENDENCIES_1 =
 libipc_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am__dirstamp = $(am__leading_dot)dirstamp
-am_libipc_la_OBJECTS = FdNotes.lo Kid.lo Kids.lo MemMap.lo Queue.lo \
-	ReadWriteLock.lo StartListening.lo StoreMap.lo StrandCoord.lo \
-	StrandSearch.lo SharedListen.lo TypedMsgHdr.lo Coordinator.lo \
-	UdsOp.lo Port.lo Strand.lo Forwarder.lo Inquirer.lo \
-	mem/Page.lo mem/PagePool.lo mem/Pages.lo mem/PageStack.lo \
-	mem/Segment.lo
+am_libipc_la_OBJECTS = Coordinator.lo FdNotes.lo Forwarder.lo \
+	Inquirer.lo Kid.lo Kids.lo MemMap.lo Port.lo QuestionerId.lo \
+	Queue.lo ReadWriteLock.lo RequestId.lo SharedListen.lo \
+	StartListening.lo StoreMap.lo Strand.lo StrandCoord.lo \
+	StrandSearch.lo TypedMsgHdr.lo UdsOp.lo mem/Page.lo \
+	mem/PagePool.lo mem/PageStack.lo mem/Pages.lo mem/Segment.lo
 libipc_la_OBJECTS = $(am_libipc_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -196,8 +196,9 @@
 	./$(DEPDIR)/FdNotes.Plo ./$(DEPDIR)/Forwarder.Plo \
 	./$(DEPDIR)/Inquirer.Plo ./$(DEPDIR)/Kid.Plo \
 	./$(DEPDIR)/Kids.Plo ./$(DEPDIR)/MemMap.Plo \
-	./$(DEPDIR)/Port.Plo ./$(DEPDIR)/Queue.Plo \
-	./$(DEPDIR)/ReadWriteLock.Plo ./$(DEPDIR)/SharedListen.Plo \
+	./$(DEPDIR)/Port.Plo ./$(DEPDIR)/QuestionerId.Plo \
+	./$(DEPDIR)/Queue.Plo ./$(DEPDIR)/ReadWriteLock.Plo \
+	./$(DEPDIR)/RequestId.Plo ./$(DEPDIR)/SharedListen.Plo \
 	./$(DEPDIR)/StartListening.Plo ./$(DEPDIR)/StoreMap.Plo \
 	./$(DEPDIR)/Strand.Plo ./$(DEPDIR)/StrandCoord.Plo \
 	./$(DEPDIR)/StrandSearch.Plo ./$(DEPDIR)/TypedMsgHdr.Plo \
@@ -747,57 +748,60 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libipc.la
 libipc_la_SOURCES = \
+	Coordinator.cc \
+	Coordinator.h \
 	FdNotes.cc \
 	FdNotes.h \
+	Forwarder.cc \
+	Forwarder.h \
+	Inquirer.cc \
+	Inquirer.h \
 	Kid.cc \
 	Kid.h \
 	Kids.cc \
 	Kids.h \
-	Messages.h \
 	MemMap.cc \
 	MemMap.h \
+	Messages.h \
+	Port.cc \
+	Port.h \
+	QuestionerId.cc \
+	QuestionerId.h \
 	Queue.cc \
 	Queue.h \
 	ReadWriteLock.cc \
 	ReadWriteLock.h \
+	Request.h \
+	RequestId.cc \
+	RequestId.h \
+	Response.h \
+	SharedListen.cc \
+	SharedListen.h \
 	StartListening.cc \
 	StartListening.h \
 	StoreMap.cc \
 	StoreMap.h \
+	Strand.cc \
+	Strand.h \
 	StrandCoord.cc \
 	StrandCoord.h \
 	StrandCoords.h \
 	StrandSearch.cc \
 	StrandSearch.h \
-	SharedListen.cc \
-	SharedListen.h \
 	TypedMsgHdr.cc \
 	TypedMsgHdr.h \
-	Coordinator.cc \
-	Coordinator.h \
 	UdsOp.cc \
 	UdsOp.h \
-	Port.cc \
-	Port.h \
-	Strand.cc \
-	Strand.h \
 	forward.h \
-	Forwarder.cc \
-	Forwarder.h \
-	Inquirer.cc \
-	Inquirer.h \
-	Request.h \
-	Response.h \
-	\
 	mem/FlexibleArray.h \
 	mem/Page.cc \
 	mem/Page.h \
 	mem/PagePool.cc \
 	mem/PagePool.h \
-	mem/Pages.cc \
-	mem/Pages.h \
 	mem/PageStack.cc \
 	mem/PageStack.h \
+	mem/Pages.cc \
+	mem/Pages.h \
 	mem/Pointer.h \
 	mem/Segment.cc \
 	mem/Segment.h \
@@ -866,8 +870,8 @@
 	@: > mem/$(DEPDIR)/$(am__dirstamp)
 mem/Page.lo: mem/$(am__dirstamp) mem/$(DEPDIR)/$(am__dirstamp)
 mem/PagePool.lo: mem/$(am__dirstamp) mem/$(DEPDIR)/$(am__dirstamp)
-mem/Pages.lo: mem/$(am__dirstamp) mem/$(DEPDIR)/$(am__dirstamp)
 mem/PageStack.lo: mem/$(am__dirstamp) mem/$(DEPDIR)/$(am__dirstamp)
+mem/Pages.lo: mem/$(am__dirstamp) mem/$(DEPDIR)/$(am__dirstamp)
 mem/Segment.lo: mem/$(am__dirstamp) mem/$(DEPDIR)/$(am__dirstamp)
 
 libipc.la: $(libipc_la_OBJECTS) $(libipc_la_DEPENDENCIES) $(EXTRA_libipc_la_DEPENDENCIES) 
@@ -889,8 +893,10 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Kids.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MemMap.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Port.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QuestionerId.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Queue.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ReadWriteLock.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RequestId.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SharedListen.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StartListening.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StoreMap.Plo@am__quote@ # am--include-marker
@@ -1246,8 +1252,10 @@
 	-rm -f ./$(DEPDIR)/Kids.Plo
 	-rm -f ./$(DEPDIR)/MemMap.Plo
 	-rm -f ./$(DEPDIR)/Port.Plo
+	-rm -f ./$(DEPDIR)/QuestionerId.Plo
 	-rm -f ./$(DEPDIR)/Queue.Plo
 	-rm -f ./$(DEPDIR)/ReadWriteLock.Plo
+	-rm -f ./$(DEPDIR)/RequestId.Plo
 	-rm -f ./$(DEPDIR)/SharedListen.Plo
 	-rm -f ./$(DEPDIR)/StartListening.Plo
 	-rm -f ./$(DEPDIR)/StoreMap.Plo
@@ -1314,8 +1322,10 @@
 	-rm -f ./$(DEPDIR)/Kids.Plo
 	-rm -f ./$(DEPDIR)/MemMap.Plo
 	-rm -f ./$(DEPDIR)/Port.Plo
+	-rm -f ./$(DEPDIR)/QuestionerId.Plo
 	-rm -f ./$(DEPDIR)/Queue.Plo
 	-rm -f ./$(DEPDIR)/ReadWriteLock.Plo
+	-rm -f ./$(DEPDIR)/RequestId.Plo
 	-rm -f ./$(DEPDIR)/SharedListen.Plo
 	-rm -f ./$(DEPDIR)/StartListening.Plo
 	-rm -f ./$(DEPDIR)/StoreMap.Plo
diff -u -r -N squid-5.0.5/src/ipc/mem/PageStack.cc squid-5.0.6/src/ipc/mem/PageStack.cc
--- squid-5.0.5/src/ipc/mem/PageStack.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/mem/PageStack.cc	2021-05-10 21:02:34.000000000 +1200
@@ -16,6 +16,7 @@
 
 #include <cmath>
 #include <algorithm>
+#include <limits>
 
 /*
 
diff -u -r -N squid-5.0.5/src/ipc/Messages.h squid-5.0.6/src/ipc/Messages.h
--- squid-5.0.5/src/ipc/Messages.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Messages.h	2021-05-10 21:02:34.000000000 +1200
@@ -17,16 +17,30 @@
 {
 
 /// message class identifier
-typedef enum { mtNone = 0, mtRegistration,
-               mtStrandSearchRequest, mtStrandSearchResponse,
-               mtSharedListenRequest, mtSharedListenResponse,
+typedef enum { mtNone = 0, ///< unspecified or unknown message kind; unused on the wire
+
+               mtRegisterStrand, ///< notifies about our strand existence
+               mtStrandRegistered, ///< acknowledges mtRegisterStrand acceptance
+
+               mtFindStrand, ///< a worker requests a strand from Coordinator
+               mtStrandReady, ///< an mtFindStrand answer: the strand exists and should be usable
+
+               mtSharedListenRequest,
+               mtSharedListenResponse,
+
                mtIpcIoNotification,
+
                mtCollapsedForwardingNotification,
-               mtCacheMgrRequest, mtCacheMgrResponse
+
+               mtCacheMgrRequest,
+               mtCacheMgrResponse,
+
 #if SQUID_SNMP
-               ,
-               mtSnmpRequest, mtSnmpResponse
+               mtSnmpRequest,
+               mtSnmpResponse,
 #endif
+
+               mtEnd ///< for message kind range checks; unused on the wire
              } MessageType;
 
 } // namespace Ipc;
diff -u -r -N squid-5.0.5/src/ipc/Port.cc squid-5.0.6/src/ipc/Port.cc
--- squid-5.0.5/src/ipc/Port.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Port.cc	2021-05-10 21:02:34.000000000 +1200
@@ -14,6 +14,7 @@
 #include "comm/Read.h"
 #include "CommCalls.h"
 #include "ipc/Port.h"
+#include "sbuf/Stream.h"
 #include "tools.h"
 #include "util.h"
 
@@ -73,13 +74,33 @@
     return coordinatorAddr;
 }
 
+void
+Ipc::Port::receive(const TypedMsgHdr &message)
+{
+    throw TextException(ToSBuf("bad IPC message type: ", message.rawType()), Here());
+}
+
+/// receive() but ignore any errors
+void
+Ipc::Port::receiveOrIgnore(const TypedMsgHdr &message)
+{
+    try {
+        receive(message);
+    } catch (...) {
+        debugs(54, DBG_IMPORTANT, "WARNING: Ignoring IPC message" <<
+               Debug::Extra << "message type: " << message.rawType() <<
+               Debug::Extra << "problem: " << CurrentException);
+    }
+}
+
 void Ipc::Port::noteRead(const CommIoCbParams& params)
 {
     debugs(54, 6, HERE << params.conn << " flag " << params.flag <<
            " [" << this << ']');
     if (params.flag == Comm::OK) {
         assert(params.buf == buf.raw());
-        receive(buf);
+        debugs(54, 6, "message type: " << buf.rawType());
+        receiveOrIgnore(buf);
     }
     // TODO: if there was a fatal error on our socket, close the socket before
     // trying to listen again and print a level-1 error message.
diff -u -r -N squid-5.0.5/src/ipc/Port.h squid-5.0.6/src/ipc/Port.h
--- squid-5.0.5/src/ipc/Port.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Port.h	2021-05-10 21:02:34.000000000 +1200
@@ -36,10 +36,12 @@
     void doListen();
 
     /// handle IPC message just read
-    virtual void receive(const TypedMsgHdr& message) = 0;
+    /// kids must call parent method when they do not recognize the message type
+    virtual void receive(const TypedMsgHdr &) = 0;
 
 private:
     void noteRead(const CommIoCbParams &params); // Comm callback API
+    void receiveOrIgnore(const TypedMsgHdr& );
 
 private:
     TypedMsgHdr buf; ///< msghdr struct filled by Comm
diff -u -r -N squid-5.0.5/src/ipc/QuestionerId.cc squid-5.0.6/src/ipc/QuestionerId.cc
--- squid-5.0.5/src/ipc/QuestionerId.cc	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/ipc/QuestionerId.cc	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#include "squid.h"
+#include "base/TextException.h"
+#include "ipc/QuestionerId.h"
+#include "ipc/TypedMsgHdr.h"
+#include "sbuf/Stream.h"
+
+#include <iostream>
+
+Ipc::QuestionerId
+Ipc::MyQuestionerId()
+{
+    static const QuestionerId qid(getpid());
+    return qid;
+}
+
+void
+Ipc::QuestionerId::pack(TypedMsgHdr &hdrMsg) const
+{
+    hdrMsg.putPod(pid);
+}
+
+void
+Ipc::QuestionerId::unpack(const TypedMsgHdr &hdrMsg)
+{
+    hdrMsg.getPod(pid);
+}
+
+void
+Ipc::QuestionerId::rejectAnswerIfStale() const
+{
+    const auto myPid = MyQuestionerId().pid;
+    if (myPid != pid) {
+        throw TextException(ToSBuf("received answer to an IPC question asked by process ", pid,
+                                   Debug::Extra, "my process PID: ", myPid), Here());
+    }
+}
+
+void
+Ipc::QuestionerId::print(std::ostream &os) const
+{
+    os << pid;
+}
+
diff -u -r -N squid-5.0.5/src/ipc/QuestionerId.h squid-5.0.6/src/ipc/QuestionerId.h
--- squid-5.0.5/src/ipc/QuestionerId.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/ipc/QuestionerId.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef SQUID_SRC_IPC_QUESTIONERID_H
+#define SQUID_SRC_IPC_QUESTIONERID_H
+
+#include "ipc/forward.h"
+
+#include <iosfwd>
+
+namespace Ipc
+{
+
+/// Identifies a kid process sending IPC messages that require an answer.
+/// Must be unique across all kids with pending questions.
+class QuestionerId
+{
+public:
+    /// to-be-determined ID
+    QuestionerId() = default;
+
+    /// for sending the ID of the asking process
+    void pack(TypedMsgHdr &) const;
+
+    /// for receiving the ID of the asking process
+    void unpack(const TypedMsgHdr &);
+
+    /// does nothing but throws if the questioner was not the current process
+    void rejectAnswerIfStale() const;
+
+    /// reports the stored opaque ID value (for debugging)
+    void print(std::ostream &) const;
+
+private:
+    /// for MyQuestionerId() convenience
+    explicit QuestionerId(const pid_t aPid): pid(aPid) {}
+    friend QuestionerId MyQuestionerId();
+
+    /// OS process ID of the asking kid. If the kid restarts, it is assumed
+    /// not to wrap back to the old value until the answer is received.
+    pid_t pid = -1;
+};
+
+/// the questioner ID of the current/calling process
+QuestionerId MyQuestionerId();
+
+/// Convenience wrapper for rejecting (freshly parsed) stale answers.
+/// All answers are assumed to have a "QuestionerId intendedRecepient()" member.
+template <class Answer>
+const Answer &
+Mine(const Answer &answer)
+{
+    answer.intendedRecepient().rejectAnswerIfStale();
+    return answer;
+}
+
+inline std::ostream &
+operator <<(std::ostream &os, const QuestionerId &qid)
+{
+    qid.print(os);
+    return os;
+}
+
+} // namespace Ipc;
+
+#endif /* SQUID_SRC_IPC_QUESTIONERID_H */
+
diff -u -r -N squid-5.0.5/src/ipc/Request.h squid-5.0.6/src/ipc/Request.h
--- squid-5.0.5/src/ipc/Request.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Request.h	2021-05-10 21:02:34.000000000 +1200
@@ -12,31 +12,41 @@
 #define SQUID_IPC_REQUEST_H
 
 #include "base/RefCount.h"
-#include "ipc/forward.h"
+#include "base/TypeTraits.h"
+#include "ipc/RequestId.h"
 
 namespace Ipc
 {
 
+// TODO: Request and Response ought to have their own un/pack() methods instead
+// of duplicating their functionality in derived classes. To avoid dependency
+// loops between libipc and libmgr/libsnmp, fixing that requires extracting
+// src/ipc/Coordinator and its friends into a new src/coordinator/ library.
+
 /// IPC request
-class Request: public RefCountable
+class Request: public RefCountable, public Interface
 {
 public:
     typedef RefCount<Request> Pointer;
 
 public:
-    Request(int aRequestorId, unsigned int aRequestId):
-        requestorId(aRequestorId), requestId(aRequestId) {}
-
     virtual void pack(TypedMsgHdr& msg) const = 0; ///< prepare for sendmsg()
     virtual Pointer clone() const = 0; ///< returns a copy of this
 
-private:
-    Request(const Request&); // not implemented
-    Request& operator= (const Request&); // not implemented
-
 public:
-    int requestorId; ///< kidId of the requestor; used for response destination
-    unsigned int requestId; ///< unique for sender; matches request w/ response
+    int requestorId = 0; ///< kidId of the requestor; used for response destination
+    RequestId requestId; ///< matches the request[or] with the response
+
+protected:
+    /// sender's constructor
+    Request(const int aRequestorId, const RequestId aRequestId):
+        requestorId(aRequestorId),
+        requestId(aRequestId)
+    {
+    }
+
+    /// recipient's constructor
+    Request() = default;
 };
 
 } // namespace Ipc
diff -u -r -N squid-5.0.5/src/ipc/RequestId.cc squid-5.0.6/src/ipc/RequestId.cc
--- squid-5.0.5/src/ipc/RequestId.cc	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/ipc/RequestId.cc	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#include "squid.h"
+#include "base/TextException.h"
+#include "Debug.h"
+#include "ipc/RequestId.h"
+
+#include <iostream>
+
+Ipc::RequestId::RequestId(const Index anIndex):
+    qid_(anIndex ? MyQuestionerId() : QuestionerId()),
+    index_(anIndex)
+{
+}
+
+std::ostream &
+Ipc::operator <<(std::ostream &os, const RequestId &requestId)
+{
+    os << requestId.index() << '@' << requestId.questioner();
+    return os;
+}
+
diff -u -r -N squid-5.0.5/src/ipc/RequestId.h squid-5.0.6/src/ipc/RequestId.h
--- squid-5.0.5/src/ipc/RequestId.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/ipc/RequestId.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef SQUID_IPC_REQUESTID_H
+#define SQUID_IPC_REQUESTID_H
+
+#include "ipc/forward.h"
+#include "ipc/QuestionerId.h"
+
+#include <iosfwd>
+
+namespace Ipc
+{
+
+/// uniquely identifies an IPC request among same-type concurrent IPC requests
+/// submitted by a single Squid instance
+class RequestId
+{
+public:
+    /// A simple ID for correlating IPC responses with pending requests.
+    /// Value 0 has a special meaning of "unset/unknown", but otherwise opaque.
+    typedef unsigned int Index;
+
+    /// Request sender's constructor.
+    /// For performance and clarity sake, default constructor is preferred to 0 index.
+    explicit RequestId(Index);
+
+    /// request recipient's constructor
+    RequestId() = default;
+
+    /// Make the ID unset/unknown.
+    /// Optimization: leaves the questioner field alone.
+    void reset() { index_ = 0; }
+
+    /// Make the ID set/known with the given (by the questioner) index.
+    /// For performance and clarity sake, reset(void) is preferred to reset(0).
+    void reset(const Index anIndex) { *this = RequestId(anIndex); }
+
+    QuestionerId questioner() const { return qid_; }
+    Index index() const { return index_; }
+
+    // these conversion operators allow our users to treat us as an Index
+    operator Index() const { return index_; }
+    RequestId &operator =(const Index anIndex) { anIndex ? reset(anIndex) : reset(); return *this; }
+
+private:
+    /// the sender of the request
+    QuestionerId qid_;
+
+    /// request ID; unique within pending same-qid_ questions of the same kind
+    Index index_ = 0;
+};
+
+std::ostream &operator <<(std::ostream &, const RequestId &);
+
+} // namespace Ipc;
+
+#endif /* SQUID_IPC_REQUESTID_H */
+
diff -u -r -N squid-5.0.5/src/ipc/Response.h squid-5.0.6/src/ipc/Response.h
--- squid-5.0.5/src/ipc/Response.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Response.h	2021-05-10 21:02:34.000000000 +1200
@@ -12,38 +12,36 @@
 #define SQUID_IPC_RESPONSE_H
 
 #include "base/RefCount.h"
+#include "base/TypeTraits.h"
 #include "ipc/forward.h"
+#include "ipc/QuestionerId.h"
 
 namespace Ipc
 {
 
 /// A response to Ipc::Request.
-class Response: public RefCountable
+class Response: public RefCountable, public Interface
 {
 public:
     typedef RefCount<Response> Pointer;
 
 public:
-    explicit Response(unsigned int aRequestId):
-        requestId(aRequestId) {}
-
     virtual void pack(TypedMsgHdr& msg) const = 0; ///< prepare for sendmsg()
     virtual Pointer clone() const = 0; ///< returns a copy of this
 
-private:
-    Response(const Response&); // not implemented
-    Response& operator= (const Response&); // not implemented
+    /// for Mine() tests
+    QuestionerId intendedRecepient() const { return requestId.questioner(); }
 
 public:
-    unsigned int requestId; ///< ID of request we are responding to
-};
+    RequestId requestId; ///< the ID of the request we are responding to
 
-inline
-std::ostream& operator << (std::ostream &os, const Response& response)
-{
-    os << "[response.requestId %u]" << response.requestId << '}';
-    return os;
-}
+protected:
+    /// sender's constructor
+    explicit Response(const RequestId aRequestId): requestId(aRequestId) {}
+
+    /// recipient's constructor
+    Response() = default;
+};
 
 } // namespace Ipc
 
diff -u -r -N squid-5.0.5/src/ipc/SharedListen.cc squid-5.0.6/src/ipc/SharedListen.cc
--- squid-5.0.5/src/ipc/SharedListen.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/SharedListen.cc	2021-05-10 21:02:34.000000000 +1200
@@ -33,25 +33,26 @@
 };
 
 /// maps ID assigned at request time to the response callback
-typedef std::map<int, PendingOpenRequest> SharedListenRequestMap;
+typedef std::map<Ipc::RequestId::Index, PendingOpenRequest> SharedListenRequestMap;
 static SharedListenRequestMap TheSharedListenRequestMap;
 
 /// accumulates delayed requests until they are ready to be sent, in FIFO order
 typedef std::list<PendingOpenRequest> DelayedSharedListenRequests;
 static DelayedSharedListenRequests TheDelayedRequests;
 
-static int
+// TODO: Encapsulate "Pending Request Map" logic shared by all RequestId users.
+/// registers the given request in the collection of pending requests
+/// \returns the registration key
+static Ipc::RequestId::Index
 AddToMap(const PendingOpenRequest &por)
 {
-    // find unused ID using linear seach; there should not be many entries
-    for (int id = 0; true; ++id) {
-        if (TheSharedListenRequestMap.find(id) == TheSharedListenRequestMap.end()) {
-            TheSharedListenRequestMap[id] = por;
-            return id;
-        }
-    }
-    assert(false); // not reached
-    return -1;
+    static Ipc::RequestId::Index LastIndex = 0;
+    // TODO: Switch Ipc::RequestId::Index to uint64_t and drop these 0 checks.
+    if (++LastIndex == 0) // don't use zero value as an ID
+        ++LastIndex;
+    assert(TheSharedListenRequestMap.find(LastIndex) == TheSharedListenRequestMap.end());
+    TheSharedListenRequestMap[LastIndex] = por;
+    return LastIndex;
 }
 
 bool
@@ -68,7 +69,10 @@
     return addr.compareWhole(p.addr) < 0;
 }
 
-Ipc::SharedListenRequest::SharedListenRequest(): requestorId(-1), mapId(-1)
+Ipc::SharedListenRequest::SharedListenRequest(const OpenListenerParams &aParams, const RequestId aMapId):
+    requestorId(KidIdentifier),
+    params(aParams),
+    mapId(aMapId)
 {
     // caller will then set public data members
 }
@@ -76,22 +80,25 @@
 Ipc::SharedListenRequest::SharedListenRequest(const TypedMsgHdr &hdrMsg)
 {
     hdrMsg.checkType(mtSharedListenRequest);
+    // XXX: our handlerSubscription is not a POD!
     hdrMsg.getPod(*this);
 }
 
 void Ipc::SharedListenRequest::pack(TypedMsgHdr &hdrMsg) const
 {
     hdrMsg.setType(mtSharedListenRequest);
+    // XXX: our handlerSubscription is not a POD!
     hdrMsg.putPod(*this);
 }
 
-Ipc::SharedListenResponse::SharedListenResponse(int aFd, int anErrNo, int aMapId):
+Ipc::SharedListenResponse::SharedListenResponse(const int aFd, const int anErrNo, const RequestId aMapId):
     fd(aFd), errNo(anErrNo), mapId(aMapId)
 {
 }
 
 Ipc::SharedListenResponse::SharedListenResponse(const TypedMsgHdr &hdrMsg):
-    fd(-1), errNo(0), mapId(-1)
+    fd(-1),
+    errNo(0)
 {
     hdrMsg.checkType(mtSharedListenResponse);
     hdrMsg.getPod(*this);
@@ -103,16 +110,14 @@
 {
     hdrMsg.setType(mtSharedListenResponse);
     hdrMsg.putPod(*this);
+    // XXX: When we respond with an error, putFd() throws due to the negative fd
     hdrMsg.putFd(fd);
 }
 
 static void
 SendSharedListenRequest(const PendingOpenRequest &por)
 {
-    Ipc::SharedListenRequest request;
-    request.requestorId = KidIdentifier;
-    request.params = por.params;
-    request.mapId = AddToMap(por);
+    const Ipc::SharedListenRequest request(por.params, Ipc::RequestId(AddToMap(por)));
 
     debugs(54, 3, "getting listening FD for " << request.params.addr <<
            " mapId=" << request.mapId);
@@ -160,10 +165,12 @@
            TheSharedListenRequestMap.size() << " active + " <<
            TheDelayedRequests.size() << " delayed requests");
 
-    Must(TheSharedListenRequestMap.find(response.mapId) != TheSharedListenRequestMap.end());
-    PendingOpenRequest por = TheSharedListenRequestMap[response.mapId];
-    Must(por.callback != NULL);
-    TheSharedListenRequestMap.erase(response.mapId);
+    Must(response.mapId);
+    const auto pori = TheSharedListenRequestMap.find(response.mapId.index());
+    Must(pori != TheSharedListenRequestMap.end());
+    auto por = pori->second;
+    Must(por.callback);
+    TheSharedListenRequestMap.erase(pori);
 
     StartListeningCb *cbd = dynamic_cast<StartListeningCb*>(por.callback->getDialer());
     assert(cbd && cbd->conn != NULL);
diff -u -r -N squid-5.0.5/src/ipc/SharedListen.h squid-5.0.6/src/ipc/SharedListen.h
--- squid-5.0.5/src/ipc/SharedListen.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/SharedListen.h	2021-05-10 21:02:34.000000000 +1200
@@ -13,6 +13,8 @@
 
 #include "base/AsyncCall.h"
 #include "base/Subscription.h"
+#include "ipc/QuestionerId.h"
+#include "ipc/RequestId.h"
 
 namespace Ipc
 {
@@ -45,7 +47,7 @@
 class SharedListenRequest
 {
 public:
-    SharedListenRequest(); ///< from OpenSharedListen() which then sets public data
+    SharedListenRequest(const OpenListenerParams &, RequestId aMapId); ///< sender's constructor
     explicit SharedListenRequest(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
     void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
 
@@ -54,21 +56,24 @@
 
     OpenListenerParams params; ///< actual comm_open_sharedListen() parameters
 
-    int mapId; ///< to map future response to the requestor's callback
+    RequestId mapId; ///< to map future response to the requestor's callback
 };
 
 /// a response to SharedListenRequest
 class SharedListenResponse
 {
 public:
-    SharedListenResponse(int fd, int errNo, int mapId);
+    SharedListenResponse(int fd, int errNo, RequestId aMapId); ///< sender's constructor
     explicit SharedListenResponse(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
     void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
 
+    /// for Mine() tests
+    QuestionerId intendedRecepient() const { return mapId.questioner(); }
+
 public:
     int fd; ///< opened listening socket or -1
     int errNo; ///< errno value from comm_open_sharedListen() call
-    int mapId; ///< to map future response to the requestor's callback
+    RequestId mapId; ///< to map future response to the requestor's callback
 };
 
 /// prepare and send SharedListenRequest to Coordinator
diff -u -r -N squid-5.0.5/src/ipc/Strand.cc squid-5.0.6/src/ipc/Strand.cc
--- squid-5.0.5/src/ipc/Strand.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Strand.cc	2021-05-10 21:02:34.000000000 +1200
@@ -18,6 +18,7 @@
 #include "globals.h"
 #include "ipc/Kids.h"
 #include "ipc/Messages.h"
+#include "ipc/QuestionerId.h"
 #include "ipc/SharedListen.h"
 #include "ipc/Strand.h"
 #include "ipc/StrandCoord.h"
@@ -53,29 +54,25 @@
     debugs(54, 6, HERE);
     Must(!isRegistered);
 
-    HereIamMessage ann(StrandCoord(KidIdentifier, getpid()));
-    TypedMsgHdr message;
-    ann.pack(message);
-    SendMessage(Port::CoordinatorAddr(), message);
+    StrandMessage::NotifyCoordinator(mtRegisterStrand, nullptr);
     setTimeout(6, "Ipc::Strand::timeoutHandler"); // TODO: make 6 configurable?
 }
 
 void Ipc::Strand::receive(const TypedMsgHdr &message)
 {
-    debugs(54, 6, HERE << message.type());
-    switch (message.type()) {
+    switch (message.rawType()) {
 
-    case mtRegistration:
-        handleRegistrationResponse(HereIamMessage(message));
+    case mtStrandRegistered:
+        handleRegistrationResponse(Mine(StrandMessage(message)));
         break;
 
     case mtSharedListenResponse:
-        SharedListenJoined(SharedListenResponse(message));
+        SharedListenJoined(Mine(SharedListenResponse(message)));
         break;
 
 #if HAVE_DISKIO_MODULE_IPCIO
-    case mtStrandSearchResponse:
-        IpcIoFile::HandleOpenResponse(StrandSearchResponse(message));
+    case mtStrandReady:
+        IpcIoFile::HandleOpenResponse(Mine(StrandMessage(message)));
         break;
 
     case mtIpcIoNotification:
@@ -91,7 +88,7 @@
 
     case mtCacheMgrResponse: {
         const Mgr::Response resp(message);
-        handleCacheMgrResponse(resp);
+        handleCacheMgrResponse(Mine(resp));
     }
     break;
 
@@ -108,18 +105,19 @@
 
     case mtSnmpResponse: {
         const Snmp::Response resp(message);
-        handleSnmpResponse(resp);
+        handleSnmpResponse(Mine(resp));
     }
     break;
 #endif
 
     default:
-        debugs(54, DBG_IMPORTANT, HERE << "Unhandled message type: " << message.type());
+        Port::receive(message);
         break;
     }
 }
 
-void Ipc::Strand::handleRegistrationResponse(const HereIamMessage &msg)
+void
+Ipc::Strand::handleRegistrationResponse(const StrandMessage &msg)
 {
     // handle registration response from the coordinator; it could be stale
     if (msg.strand.kidId == KidIdentifier && msg.strand.pid == getpid()) {
diff -u -r -N squid-5.0.5/src/ipc/StrandCoord.cc squid-5.0.6/src/ipc/StrandCoord.cc
--- squid-5.0.5/src/ipc/StrandCoord.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/StrandCoord.cc	2021-05-10 21:02:34.000000000 +1200
@@ -10,7 +10,8 @@
 
 #include "squid.h"
 #include "Debug.h"
-#include "ipc/Messages.h"
+#include "globals.h"
+#include "ipc/Port.h"
 #include "ipc/StrandCoord.h"
 #include "ipc/TypedMsgHdr.h"
 
@@ -37,20 +38,35 @@
     hdrMsg.putString(tag);
 }
 
-Ipc::HereIamMessage::HereIamMessage(const StrandCoord &aStrand):
-    strand(aStrand)
+Ipc::StrandMessage::StrandMessage(const StrandCoord &aStrand, const QuestionerId aQid):
+    strand(aStrand),
+    qid(aQid)
 {
 }
 
-Ipc::HereIamMessage::HereIamMessage(const TypedMsgHdr &hdrMsg)
+Ipc::StrandMessage::StrandMessage(const TypedMsgHdr &hdrMsg)
 {
-    hdrMsg.checkType(mtRegistration);
     strand.unpack(hdrMsg);
+    qid.unpack(hdrMsg);
 }
 
-void Ipc::HereIamMessage::pack(TypedMsgHdr &hdrMsg) const
+void
+Ipc::StrandMessage::pack(const MessageType messageType, TypedMsgHdr &hdrMsg) const
 {
-    hdrMsg.setType(mtRegistration);
+    hdrMsg.setType(messageType);
     strand.pack(hdrMsg);
+    qid.pack(hdrMsg);
+}
+
+void
+Ipc::StrandMessage::NotifyCoordinator(const MessageType msgType, const char *tag)
+{
+    static const auto pid = getpid();
+    StrandMessage message(StrandCoord(KidIdentifier, pid), MyQuestionerId());
+    if (tag)
+        message.strand.tag = tag;
+    TypedMsgHdr hdr;
+    message.pack(msgType, hdr);
+    SendMessage(Port::CoordinatorAddr(), hdr);
 }
 
diff -u -r -N squid-5.0.5/src/ipc/StrandCoord.h squid-5.0.6/src/ipc/StrandCoord.h
--- squid-5.0.5/src/ipc/StrandCoord.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/StrandCoord.h	2021-05-10 21:02:34.000000000 +1200
@@ -10,6 +10,8 @@
 #define SQUID_IPC_STRAND_COORD_H
 
 #include "ipc/forward.h"
+#include "ipc/Messages.h"
+#include "ipc/QuestionerId.h"
 #include "SquidString.h"
 
 namespace Ipc
@@ -32,16 +34,26 @@
     String tag; ///< optional unique well-known key (e.g., cache_dir path)
 };
 
-/// strand registration with Coordinator (also used as an ACK)
-class HereIamMessage
+/// an IPC message carrying StrandCoord
+class StrandMessage
 {
 public:
-    explicit HereIamMessage(const StrandCoord &strand); ///< from registrant
-    explicit HereIamMessage(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
-    void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
+    explicit StrandMessage(const StrandCoord &, QuestionerId);
+    explicit StrandMessage(const TypedMsgHdr &);
+    void pack(MessageType, TypedMsgHdr &) const;
+
+    /// creates and sends StrandMessage to Coordinator
+    static void NotifyCoordinator(MessageType, const char *tag);
+
+    /// for Mine() tests
+    QuestionerId intendedRecepient() const { return qid; }
 
 public:
-    StrandCoord strand; ///< registrant coordinates and related details
+    StrandCoord strand; ///< messageType-specific coordinates (e.g., sender)
+
+    /// For IPC requests/questions: The sender of this request.
+    /// For IPC responses/answers: The sender of the corresponding request.
+    QuestionerId qid;
 };
 
 } // namespace Ipc;
diff -u -r -N squid-5.0.5/src/ipc/Strand.h squid-5.0.6/src/ipc/Strand.h
--- squid-5.0.5/src/ipc/Strand.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/Strand.h	2021-05-10 21:02:34.000000000 +1200
@@ -39,7 +39,7 @@
 
 private:
     void registerSelf(); /// let Coordinator know this strand exists
-    void handleRegistrationResponse(const HereIamMessage &msg);
+    void handleRegistrationResponse(const StrandMessage &);
     void handleCacheMgrRequest(const Mgr::Request& request);
     void handleCacheMgrResponse(const Mgr::Response& response);
 #if SQUID_SNMP
diff -u -r -N squid-5.0.5/src/ipc/StrandSearch.cc squid-5.0.6/src/ipc/StrandSearch.cc
--- squid-5.0.5/src/ipc/StrandSearch.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/StrandSearch.cc	2021-05-10 21:02:34.000000000 +1200
@@ -9,45 +9,32 @@
 /* DEBUG: section 54    Interprocess Communication */
 
 #include "squid.h"
+#include "globals.h"
 #include "ipc/Messages.h"
 #include "ipc/StrandSearch.h"
 #include "ipc/TypedMsgHdr.h"
 
-Ipc::StrandSearchRequest::StrandSearchRequest(): requestorId(-1)
+Ipc::StrandSearchRequest::StrandSearchRequest(const String &aTag):
+    requestorId(KidIdentifier),
+    tag(aTag),
+    qid(MyQuestionerId())
 {
 }
 
 Ipc::StrandSearchRequest::StrandSearchRequest(const TypedMsgHdr &hdrMsg):
     requestorId(-1)
 {
-    hdrMsg.checkType(mtStrandSearchRequest);
+    hdrMsg.checkType(mtFindStrand);
     hdrMsg.getPod(requestorId);
     hdrMsg.getString(tag);
+    qid.unpack(hdrMsg);
 }
 
 void Ipc::StrandSearchRequest::pack(TypedMsgHdr &hdrMsg) const
 {
-    hdrMsg.setType(mtStrandSearchRequest);
+    hdrMsg.setType(mtFindStrand);
     hdrMsg.putPod(requestorId);
     hdrMsg.putString(tag);
-}
-
-/* StrandSearchResponse */
-
-Ipc::StrandSearchResponse::StrandSearchResponse(const Ipc::StrandCoord &aStrand):
-    strand(aStrand)
-{
-}
-
-Ipc::StrandSearchResponse::StrandSearchResponse(const TypedMsgHdr &hdrMsg)
-{
-    hdrMsg.checkType(mtStrandSearchResponse);
-    strand.unpack(hdrMsg);
-}
-
-void Ipc::StrandSearchResponse::pack(TypedMsgHdr &hdrMsg) const
-{
-    hdrMsg.setType(mtStrandSearchResponse);
-    strand.pack(hdrMsg);
+    qid.pack(hdrMsg);
 }
 
diff -u -r -N squid-5.0.5/src/ipc/StrandSearch.h squid-5.0.6/src/ipc/StrandSearch.h
--- squid-5.0.5/src/ipc/StrandSearch.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/StrandSearch.h	2021-05-10 21:02:34.000000000 +1200
@@ -10,6 +10,7 @@
 #define SQUID_IPC_STRAND_SEARCH_H
 
 #include "ipc/forward.h"
+#include "ipc/QuestionerId.h"
 #include "ipc/StrandCoord.h"
 #include "SquidString.h"
 
@@ -20,25 +21,14 @@
 class StrandSearchRequest
 {
 public:
-    StrandSearchRequest();
+    explicit StrandSearchRequest(const String &aTag); ///< sender's constructor
     explicit StrandSearchRequest(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
     void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
 
 public:
     int requestorId; ///< sender-provided return address
     String tag; ///< set when looking for a matching StrandCoord::tag
-};
-
-/// asynchronous strand search response
-class StrandSearchResponse
-{
-public:
-    StrandSearchResponse(const StrandCoord &strand);
-    explicit StrandSearchResponse(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
-    void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
-
-public:
-    StrandCoord strand; ///< answer matching StrandSearchRequest criteria
+    QuestionerId qid; ///< the sender of the request
 };
 
 } // namespace Ipc;
diff -u -r -N squid-5.0.5/src/ipc/TypedMsgHdr.cc squid-5.0.6/src/ipc/TypedMsgHdr.cc
--- squid-5.0.5/src/ipc/TypedMsgHdr.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/TypedMsgHdr.cc	2021-05-10 21:02:34.000000000 +1200
@@ -81,13 +81,6 @@
     offset = 0;
 }
 
-int
-Ipc::TypedMsgHdr::type() const
-{
-    Must(msg_iovlen == 1);
-    return data.type_;
-}
-
 void
 Ipc::TypedMsgHdr::address(const struct sockaddr_un& addr)
 {
@@ -100,7 +93,7 @@
 void
 Ipc::TypedMsgHdr::checkType(int destType) const
 {
-    Must(type() == destType);
+    Must(rawType() == destType);
 }
 
 void
diff -u -r -N squid-5.0.5/src/ipc/TypedMsgHdr.h squid-5.0.6/src/ipc/TypedMsgHdr.h
--- squid-5.0.5/src/ipc/TypedMsgHdr.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ipc/TypedMsgHdr.h	2021-05-10 21:02:34.000000000 +1200
@@ -12,6 +12,7 @@
 #define SQUID_IPC_TYPED_MSG_HDR_H
 
 #include "compat/cmsg.h"
+#include "ipc/Messages.h"
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -43,13 +44,13 @@
     /* message type manipulation; these must be called before put/get*() */
     void setType(int aType); ///< sets message type; use MessageType enum
     void checkType(int aType) const; ///< throws if stored type is not aType
-    int type() const; ///< returns stored type or zero if none
-
-    /* access for Plain Old Data (POD)-based message parts */
-    template <class Pod>
-    void getPod(Pod &pod) const { getFixed(&pod, sizeof(pod)); } ///< load POD
-    template <class Pod>
-    void putPod(const Pod &pod) { putFixed(&pod, sizeof(pod)); } ///< store POD
+    /// received or set message kind; may not be a MessageType value
+    /// \returns 0 if no message kind has been received or set
+    int rawType() const { return msg_iov ? data.type_ : 0; }
+
+    /* access for TriviallyCopyable (a.k.a. Plain Old Data or POD) message parts */
+    template <class Pod> void getPod(Pod &pod) const; ///< load POD
+    template <class Pod> void putPod(const Pod &pod); ///< store POD
 
     /* access to message parts for selected commonly-used part types */
     void getString(String &s) const; ///< load variable-length string
@@ -110,5 +111,23 @@
 
 } // namespace Ipc
 
+template <class Pod>
+void
+Ipc::TypedMsgHdr::getPod(Pod &pod) const
+{
+    // TODO: Enable after fixing Ipc::SharedListenRequest::SharedListenRequest()
+    //static_assert(std::is_trivially_copyable<Pod>::value, "getPod() used for a POD");
+    getFixed(&pod, sizeof(pod));
+}
+
+template <class Pod>
+void
+Ipc::TypedMsgHdr::putPod(const Pod &pod)
+{
+    // TODO: Enable after fixing Ipc::SharedListenRequest::pack()
+    //static_assert(std::is_trivially_copyable<Pod>::value, "putPod() used for a POD");
+    putFixed(&pod, sizeof(pod));
+}
+
 #endif /* SQUID_IPC_TYPED_MSG_HDR_H */
 
diff -u -r -N squid-5.0.5/src/log/access_log.cc squid-5.0.6/src/log/access_log.cc
--- squid-5.0.5/src/log/access_log.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/log/access_log.cc	2021-05-10 21:02:34.000000000 +1200
@@ -15,7 +15,7 @@
 #include "adaptation/Config.h"
 #endif
 #include "CachePeer.h"
-#include "err_detail_type.h"
+#include "error/Detail.h"
 #include "errorpage.h"
 #include "format/Token.h"
 #include "globals.h"
diff -u -r -N squid-5.0.5/src/log/DB/log_db_daemon.8 squid-5.0.6/src/log/DB/log_db_daemon.8
--- squid-5.0.5/src/log/DB/log_db_daemon.8	2021-02-08 13:46:40.000000000 +1300
+++ squid-5.0.6/src/log/DB/log_db_daemon.8	2021-05-10 23:02:24.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "LOG_DB_DAEMON 8"
-.TH LOG_DB_DAEMON 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH LOG_DB_DAEMON 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/log/forward.h squid-5.0.6/src/log/forward.h
--- squid-5.0.5/src/log/forward.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/log/forward.h	2021-05-10 21:02:34.000000000 +1200
@@ -14,5 +14,8 @@
 class AccessLogEntry;
 typedef RefCount<AccessLogEntry> AccessLogEntryPointer;
 
+class LogTags;
+class LogTagsErrors;
+
 #endif /* SQUID_FORMAT_FORWARD_H */
 
diff -u -r -N squid-5.0.5/src/log/Makefile.am squid-5.0.6/src/log/Makefile.am
--- squid-5.0.5/src/log/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/log/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -15,21 +15,20 @@
 noinst_LTLIBRARIES = liblog.la
 
 liblog_la_SOURCES = \
-	access_log.h \
-	access_log.cc \
 	Config.cc \
 	Config.h \
+	CustomLog.cc \
+	CustomLog.h \
 	File.cc \
 	File.h \
 	FormatHttpdCombined.cc \
 	FormatHttpdCommon.cc \
-	Formats.h \
 	FormatSquidCustom.cc \
 	FormatSquidIcap.cc \
 	FormatSquidNative.cc \
 	FormatSquidReferer.cc \
 	FormatSquidUseragent.cc \
-	forward.h \
+	Formats.h \
 	ModDaemon.cc \
 	ModDaemon.h \
 	ModStdio.cc \
@@ -38,8 +37,9 @@
 	ModSyslog.h \
 	ModUdp.cc \
 	ModUdp.h \
-	CustomLog.h \
-	CustomLog.cc \
 	TcpLogger.cc \
-	TcpLogger.h
+	TcpLogger.h \
+	access_log.cc \
+	access_log.h \
+	forward.h
 
diff -u -r -N squid-5.0.5/src/log/Makefile.in squid-5.0.6/src/log/Makefile.in
--- squid-5.0.5/src/log/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/log/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -164,11 +164,11 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 liblog_la_LIBADD =
-am_liblog_la_OBJECTS = access_log.lo Config.lo File.lo \
+am_liblog_la_OBJECTS = Config.lo CustomLog.lo File.lo \
 	FormatHttpdCombined.lo FormatHttpdCommon.lo \
 	FormatSquidCustom.lo FormatSquidIcap.lo FormatSquidNative.lo \
 	FormatSquidReferer.lo FormatSquidUseragent.lo ModDaemon.lo \
-	ModStdio.lo ModSyslog.lo ModUdp.lo CustomLog.lo TcpLogger.lo
+	ModStdio.lo ModSyslog.lo ModUdp.lo TcpLogger.lo access_log.lo
 liblog_la_OBJECTS = $(am_liblog_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -785,21 +785,20 @@
 EXTRA_DIST = helpers.m4
 noinst_LTLIBRARIES = liblog.la
 liblog_la_SOURCES = \
-	access_log.h \
-	access_log.cc \
 	Config.cc \
 	Config.h \
+	CustomLog.cc \
+	CustomLog.h \
 	File.cc \
 	File.h \
 	FormatHttpdCombined.cc \
 	FormatHttpdCommon.cc \
-	Formats.h \
 	FormatSquidCustom.cc \
 	FormatSquidIcap.cc \
 	FormatSquidNative.cc \
 	FormatSquidReferer.cc \
 	FormatSquidUseragent.cc \
-	forward.h \
+	Formats.h \
 	ModDaemon.cc \
 	ModDaemon.h \
 	ModStdio.cc \
@@ -808,10 +807,11 @@
 	ModSyslog.h \
 	ModUdp.cc \
 	ModUdp.h \
-	CustomLog.h \
-	CustomLog.cc \
 	TcpLogger.cc \
-	TcpLogger.h
+	TcpLogger.h \
+	access_log.cc \
+	access_log.h \
+	forward.h
 
 all: all-recursive
 
diff -u -r -N squid-5.0.5/src/LogTags.cc squid-5.0.6/src/LogTags.cc
--- squid-5.0.5/src/LogTags.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/LogTags.cc	2021-05-10 21:02:34.000000000 +1200
@@ -10,6 +10,16 @@
 #include "Debug.h"
 #include "LogTags.h"
 
+void
+LogTagsErrors::update(const LogTagsErrors &other)
+{
+    ignored = ignored || other.ignored;
+    timedout = timedout || other.timedout;
+    aborted = aborted || other.aborted;
+}
+
+/* LogTags */
+
 // old deprecated tag strings
 const char * LogTags::Str_[] = {
     "TAG_NONE",
diff -u -r -N squid-5.0.5/src/LogTags.h squid-5.0.6/src/LogTags.h
--- squid-5.0.5/src/LogTags.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/LogTags.h	2021-05-10 21:02:34.000000000 +1200
@@ -11,6 +11,21 @@
 
 #include "CollapsingHistory.h"
 
+/// Things that may happen to a transaction while it is being
+/// processed according to its LOG_* category. Logged as _SUFFIX(es).
+/// Unlike LOG_* categories, these flags may not be mutually exclusive.
+class LogTagsErrors
+{
+public:
+    /// Update each of this object flags to "set" if the corresponding
+    /// flag of the given object is set
+    void update(const LogTagsErrors &other);
+
+    bool ignored = false; ///< _IGNORED: the response was not used for anything
+    bool timedout = false; ///< _TIMEDOUT: terminated due to a lifetime or I/O timeout
+    bool aborted = false;  ///< _ABORTED: other abnormal termination (e.g., I/O error)
+};
+
 /** Squid transaction result code/tag set.
  *
  * These codes indicate how the request was received
@@ -62,17 +77,8 @@
     /// determine if the log tag code indicates a cache HIT
     bool isTcpHit() const;
 
-    /// Things that may happen to a transaction while it is being
-    /// processed according to its LOG_* category. Logged as _SUFFIX(es).
-    /// Unlike LOG_* categories, these flags may not be mutually exclusive.
-    class Errors {
-    public:
-        Errors() : ignored(false), timedout(false), aborted(false) {}
-
-        bool ignored; ///< _IGNORED: the response was not used for anything
-        bool timedout; ///< _TIMEDOUT: terminated due to a lifetime or I/O timeout
-        bool aborted;  ///< _ABORTED: other abnormal termination (e.g., I/O error)
-    } err;
+    /// various problems augmenting the primary log tag
+    LogTagsErrors err;
 
 private:
     /// list of string representations for LogTags_ot
diff -u -r -N squid-5.0.5/src/Makefile.am squid-5.0.6/src/Makefile.am
--- squid-5.0.5/src/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -26,13 +26,13 @@
 	StoreMetaVary.h
 
 LOADABLE_MODULES_SOURCES = \
-	LoadableModule.h \
 	LoadableModule.cc \
-	LoadableModules.h \
-	LoadableModules.cc
+	LoadableModule.h \
+	LoadableModules.cc \
+	LoadableModules.h
 
-SUBDIRS	= mem base anyp helper dns ftp parser comm eui acl format clients sbuf servers fs repl store DiskIO proxyp
-DIST_SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients sbuf servers fs repl store DiskIO proxyp
+SUBDIRS = mem base anyp helper dns ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp
+DIST_SUBDIRS = mem base anyp helper dns ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp
 
 if ENABLE_AUTH
 SUBDIRS += auth
@@ -198,67 +198,58 @@
 AM_CPPFLAGS += -I$(top_builddir)/src
 
 
-ACL_REGISTRATION_SOURCES = AclRegs.cc AuthReg.cc
+ACL_REGISTRATION_SOURCES = \
+	AclRegs.cc \
+	AuthReg.cc
 
 # common library for all the binaries and tests. This is kindof a catch all
 # and smaller libraries split from this are encouraged. Using lt convenience
 # libraries, dependencies should not be a problem either.
 libsquid_la_SOURCES = \
-	comm.cc \
-	comm.h \
 	CommCalls.cc \
 	CommCalls.h \
 	DescriptorSet.cc \
 	DescriptorSet.h \
+	SquidConfig.cc \
 	SquidConfig.h \
-	SquidConfig.cc
+	comm.cc \
+	comm.h
 
 squid_SOURCES = \
 	$(ACL_REGISTRATION_SOURCES) \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(LEAKFINDERSOURCE) \
+	$(SNMP_SOURCE) \
+	$(STOREMETA_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
+	$(WINSVC_SOURCE) \
+	$(XPROF_STATS_SOURCE) \
 	AccessLogEntry.cc \
 	AccessLogEntry.h \
 	AsyncEngine.cc \
 	AsyncEngine.h \
-	cache_cf.h \
 	AuthReg.h \
-	RefreshPattern.h \
-	cache_cf.cc \
-	CacheDigest.h \
+	BodyPipe.cc \
+	BodyPipe.h \
 	CacheDigest.cc \
-	cache_manager.cc \
-	NeighborTypeDomainList.h \
+	CacheDigest.h \
+	CacheManager.h \
 	CachePeer.cc \
 	CachePeer.h \
-	CacheManager.h \
-	carp.h \
-	carp.cc \
-	cbdata.cc \
-	cbdata.h \
-	client_db.h \
-	client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side.h \
-	client_side_reply.cc \
-	client_side_reply.h \
-	client_side_request.cc \
-	client_side_request.h \
-	ClientInfo.h \
-	BodyPipe.cc \
-	BodyPipe.h \
 	ClientInfo.h \
 	ClientRequestContext.h \
-	clientStream.cc \
-	clientStream.h \
-	clientStreamForward.h \
 	CollapsedForwarding.cc \
 	CollapsedForwarding.h \
 	CollapsingHistory.h \
+	CommRead.h \
 	CommandLine.cc \
 	CommandLine.h \
 	CompletionDispatcher.cc \
 	CompletionDispatcher.h \
-	CommRead.h \
 	ConfigOption.cc \
 	ConfigParser.cc \
 	ConfigParser.h \
@@ -268,249 +259,256 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	debug.cc \
 	Debug.h \
-	defines.h \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
 	Downloader.cc \
 	Downloader.h \
-	enums.h \
-	err_type.h \
-	err_detail_type.h \
-	errorpage.cc \
-	errorpage.h \
 	ETag.cc \
 	ETag.h \
-	event.cc \
-	event.h \
-	EventLoop.h \
 	EventLoop.cc \
-	external_acl.cc \
+	EventLoop.h \
 	ExternalACL.h \
 	ExternalACLEntry.cc \
 	ExternalACLEntry.h \
-	FadingCounter.h \
 	FadingCounter.cc \
-	fatal.h \
-	fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
-	fde.h \
+	FadingCounter.h \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
 	Generic.h \
-	globals.h \
-	gopher.h \
-	gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	helper.h \
-	hier_code.h \
 	HierarchyLogEntry.h \
-	$(HTCPSOURCE) \
-	HttpUpgradeProtocolAccess.cc \
-	HttpUpgradeProtocolAccess.h \
-	http.cc \
-	http.h \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	HttpBody.cc \
+	HttpBody.h \
+	HttpControlMsg.cc \
+	HttpControlMsg.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
+	HttpHdrContRange.cc \
+	HttpHdrContRange.h \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrSc.h \
 	HttpHdrScTarget.cc \
 	HttpHdrScTarget.h \
-	HttpHdrContRange.cc \
-	HttpHdrContRange.h \
-	HttpHeaderStat.h \
-	HttpHeader.h \
 	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
 	HttpHeaderMask.h \
 	HttpHeaderRange.h \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderStat.h \
 	HttpHeaderTools.cc \
-	HttpBody.h \
-	HttpBody.cc \
-	HttpControlMsg.cc \
-	HttpControlMsg.h \
+	HttpHeaderTools.h \
 	HttpReply.cc \
 	HttpReply.h \
-	RequestFlags.h \
-	RequestFlags.cc \
 	HttpRequest.cc \
 	HttpRequest.h \
+	HttpUpgradeProtocolAccess.cc \
+	HttpUpgradeProtocolAccess.h \
 	ICP.h \
-	icp_opcode.h \
-	icp_v2.cc \
-	icp_v3.cc \
-	Instance.h \
 	Instance.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	ipcache.h \
-	$(LEAKFINDERSOURCE) \
+	Instance.h \
+	IoStats.h \
 	LogTags.cc \
 	LogTags.h \
-	lookup_t.h \
-	main.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
-	mem_node.cc \
-	mem_node.h \
 	MemBuf.cc \
 	MemObject.cc \
 	MemObject.h \
+	MemStore.cc \
+	MemStore.h \
 	MessageSizes.h \
-	mime.h \
-	mime.cc \
-	mime_header.h \
-	mime_header.cc \
-	multicast.h \
-	multicast.cc \
-	neighbors.h \
-	neighbors.cc \
-	Notes.h \
+	NeighborTypeDomainList.h \
 	Notes.cc \
+	Notes.h \
 	Parsing.cc \
 	Parsing.h \
-	$(XPROF_STATS_SOURCE) \
-	pconn.cc \
-	pconn.h \
 	PeerDigest.h \
-	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc \
-	peer_select.cc \
-	peer_sourcehash.h \
-	peer_sourcehash.cc \
-	peer_userhash.h \
-	peer_userhash.cc \
-	PeerPoolMgr.h \
 	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
 	PeerSelectState.h \
 	PingData.h \
 	Pipeline.cc \
 	Pipeline.h \
-	protos.h \
-	redirect.h \
-	redirect.cc \
-	refresh.h \
-	refresh.cc \
+	RefreshPattern.h \
 	RemovalPolicy.cc \
 	RemovalPolicy.h \
+	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
 	ResolvedPeers.h \
-	send-announce.h \
-	send-announce.cc \
-	SBufStatsAction.h \
 	SBufStatsAction.cc \
-	sbuf/StringConvert.h \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
+	SBufStatsAction.h \
 	SquidMath.cc \
+	SquidMath.h \
 	SquidNew.cc \
-	IoStats.h \
-	stat.h \
-	stat.cc \
-	StatCounters.h \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	StatHist.cc \
-	String.cc \
-	StrList.h \
-	StrList.cc \
-	stmem.cc \
-	stmem.h \
-	repl_modules.h \
-	store.cc \
+	StatHist.h \
 	Store.h \
+	StoreClient.h \
 	StoreFileSystem.cc \
 	StoreFileSystem.h \
-	store_io.cc \
 	StoreIOBuffer.h \
 	StoreIOState.cc \
 	StoreIOState.h \
-	store_client.cc \
-	StoreClient.h \
-	store_digest.h \
-	store_digest.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	store_log.h \
-	store_log.cc \
-	store_rebuild.h \
-	store_rebuild.cc \
-	store_swapin.h \
-	store_swapin.cc \
-	store_swapmeta.cc \
-	store_swapout.cc \
 	StoreMetaUnpacker.cc \
 	StoreMetaUnpacker.h \
-	$(STOREMETA_SOURCE) \
 	StoreSearch.h \
 	StoreStats.cc \
 	StoreStats.h \
 	StoreSwapLogData.cc \
 	StoreSwapLogData.h \
-	swap_log_op.h \
+	StrList.cc \
+	StrList.h \
+	String.cc \
+	TimeOrTag.h \
 	Transients.cc \
 	Transients.h \
-	MemStore.cc \
-	MemStore.h \
+	XactionInitiator.cc \
+	XactionInitiator.h \
+	XactionStep.h \
+	cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	carp.cc \
+	carp.h \
+	cbdata.cc \
+	cbdata.h \
+	clientStream.cc \
+	clientStream.h \
+	clientStreamForward.h \
+	client_db.cc \
+	client_db.h \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_reply.h \
+	client_side_request.cc \
+	client_side_request.h \
+	debug.cc \
+	defines.h \
+	dlink.cc \
+	dlink.h \
+	enums.h \
+	errorpage.cc \
+	errorpage.h \
+	event.cc \
+	event.h \
+	external_acl.cc \
+	fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	fde.h \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	globals.h \
+	gopher.cc \
+	gopher.h \
+	helper.cc \
+	helper.h \
+	hier_code.h \
+	http.cc \
+	http.h \
+	icp_opcode.h \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
+	ipcache.cc \
+	ipcache.h \
+	lookup_t.h \
+	main.cc \
+	mem_node.cc \
+	mem_node.h \
+	mime.cc \
+	mime.h \
+	mime_header.cc \
+	mime_header.h \
+	multicast.cc \
+	multicast.h \
+	neighbors.cc \
+	neighbors.h \
+	pconn.cc \
+	pconn.h \
+	peer_digest.cc \
+	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
+	peer_select.cc \
+	peer_sourcehash.cc \
+	peer_sourcehash.h \
+	peer_userhash.cc \
+	peer_userhash.h \
+	protos.h \
+	redirect.cc \
+	redirect.h \
+	refresh.cc \
+	refresh.h \
+	repl_modules.h \
+	sbuf/StringConvert.h \
+	send-announce.cc \
+	send-announce.h \
+	stat.cc \
+	stat.h \
+	stmem.cc \
+	stmem.h \
+	store.cc \
+	store_client.cc \
+	store_digest.cc \
+	store_digest.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
+	store_log.cc \
+	store_log.h \
+	store_rebuild.cc \
+	store_rebuild.h \
+	store_swapin.cc \
+	store_swapin.h \
+	store_swapmeta.cc \
+	store_swapout.cc \
+	swap_log_op.h \
 	time.cc \
-	TimeOrTag.h \
-	tools.h \
 	tools.cc \
+	tools.h \
 	tunnel.cc \
 	typedefs.h \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp.h \
+	urn.h \
 	wccp.cc \
-	wccp2.h \
+	wccp.h \
 	wccp2.cc \
-	whois.h \
+	wccp2.h \
 	whois.cc \
-	wordlist.h \
+	whois.h \
 	wordlist.cc \
-	XactionInitiator.h \
-	XactionInitiator.cc \
-	XactionStep.h \
-	$(WIN32_SOURCE) \
-	$(WINSVC_SOURCE)
+	wordlist.h
 
 EXTRA_squid_SOURCES = \
+	$(DELAY_POOL_ALL_SOURCE) \
+	$(LOADABLE_MODULES_SOURCES) \
+	$(SNMP_ALL_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_ALL_SOURCE) \
 	$(all_AUTHMODULES) \
 	ConfigOption.h \
-	$(DELAY_POOL_ALL_SOURCE) \
+	LeakFinder.cc \
+	LeakFinder.h \
+	ProfStats.cc \
 	htcp.cc \
 	htcp.h \
 	ipc.cc \
-	ipc_win32.cc \
-	ProfStats.cc \
-	LeakFinder.cc \
-	LeakFinder.h \
-	$(SNMP_ALL_SOURCE) \
-	$(UNLINKDSOURCE) \
-	$(WIN32_ALL_SOURCE) \
-	$(LOADABLE_MODULES_SOURCES)
+	ipc_win32.cc
 
 noinst_HEADERS = \
 	MemBuf.h \
@@ -520,8 +518,6 @@
 BUILT_SOURCES = \
 	cf_gen_defines.cci \
 	cf_parser.cci \
-	err_type.cc \
-	err_detail_type.cc \
 	globals.cc \
 	hier_code.cc \
 	icp_opcode.cc \
@@ -556,6 +552,7 @@
 	anyp/libanyp.la \
 	security/libsecurity.la \
 	$(SSL_LIBS) \
+	error/liberror.la \
 	ipc/libipc.la \
 	mgr/libmgr.la \
 	proxyp/libproxyp.la \
@@ -626,32 +623,32 @@
 ## libbase.la wants cbdata.*
 ## libbase.la wants MemBuf.*
 ufsdump_SOURCES = \
+	$(WIN32_SOURCE) \
 	ClientInfo.h \
-	cbdata.h \
-	cbdata.cc \
-	debug.cc \
-	int.h \
-	int.cc \
-	mem/forward.h \
+	tests/stub_HelperChildConfig.cc \
 	MemBuf.cc \
 	MemBuf.h \
 	Parsing.h \
-	store_key_md5.h \
-	store_key_md5.cc \
+	RemovalPolicy.cc \
+	SquidNew.cc \
 	tests/stub_StoreMeta.cc \
 	StoreMetaUnpacker.cc \
 	String.cc \
-	SquidNew.cc \
-	tests/stub_time.cc \
-	ufsdump.cc \
-	dlink.h \
+	cbdata.cc \
+	cbdata.h \
+	debug.cc \
 	dlink.cc \
-	helper/ChildConfig.h \
-	tests/stub_HelperChildConfig.cc \
-	RemovalPolicy.cc \
-	$(WIN32_SOURCE) \
+	dlink.h \
+	tests/stub_fd.cc \
 	fd.h \
-	tests/stub_fd.cc
+	helper/ChildConfig.h \
+	int.cc \
+	int.h \
+	mem/forward.h \
+	store_key_md5.cc \
+	store_key_md5.h \
+	tests/stub_time.cc \
+	ufsdump.cc
 ufsdump_LDADD = \
 	ident/libident.la \
 	acl/libacls.la \
@@ -743,12 +740,6 @@
 hier_code.cc: hier_code.h mk-string-arrays.awk
 	$(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/hier_code.h > $@ || ($(RM) -f $@ && exit 1)
 
-err_type.cc: err_type.h mk-string-arrays.awk
-	$(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/err_type.h > $@ || ($(RM) -f $@ && exit 1)
-
-err_detail_type.cc: err_detail_type.h mk-string-arrays.awk
-	$(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/err_detail_type.h | sed 's/ERR_DETAIL_//' > $@ || ($(RM) -f $@ && exit 1)
-
 lookup_t.cc: lookup_t.h mk-string-arrays.awk
 	$(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/lookup_t.h > $@ || ($(RM) -f $@ && exit 1)
 
@@ -953,10 +944,10 @@
 	tests/testLookupTable.cc \
 	tests/testLookupTable.h
 nodist_tests_testLookupTable_SOURCES = \
+	tests/stub_SBufDetailedStats.cc \
 	base/LookupTable.h \
 	tests/stub_debug.cc \
-	tests/stub_libmem.cc \
-	tests/stub_SBufDetailedStats.cc
+	tests/stub_libmem.cc
 tests_testLookupTable_LDADD = \
 	sbuf/libsbuf.la \
 	base/libbase.la \
@@ -982,9 +973,9 @@
 	tests/testYesNoNone.cc \
 	tests/testYesNoNone.h
 nodist_tests_testYesNoNone_SOURCES = \
+	tests/stub_SBuf.cc \
 	base/YesNoNone.h \
-	tests/stub_debug.cc \
-	tests/stub_SBuf.cc
+	tests/stub_debug.cc
 tests_testYesNoNone_LDADD = \
 	base/libbase.la \
 	$(LIBCPPUNIT_LIBS) \
@@ -1001,18 +992,18 @@
 	tests/testUriScheme.cc \
 	tests/testUriScheme.h
 nodist_tests_testURL_SOURCES = \
-	anyp/Uri.h \
-	anyp/UriScheme.h \
+	tests/stub_HelperChildConfig.cc \
+	tests/stub_HttpHeader.cc \
+	tests/stub_HttpRequest.cc \
+	tests/stub_StatHist.cc \
 	String.cc \
 	tests/stub_access_log.cc \
+	anyp/Uri.h \
+	anyp/UriScheme.h \
 	tests/stub_cbdata.cc \
 	tests/stub_debug.cc \
-	tests/stub_HelperChildConfig.cc \
-	tests/stub_HttpHeader.cc \
-	tests/stub_HttpRequest.cc \
 	tests/stub_libhttp.cc \
-	tests/stub_libmem.cc \
-	tests/stub_StatHist.cc
+	tests/stub_libmem.cc
 tests_testURL_LDADD = \
 	libsquid.la \
 	proxyp/libproxyp.la \
@@ -1048,10 +1039,10 @@
 	tests/testTokenizer.cc \
 	tests/testTokenizer.h
 nodist_tests_testTokenizer_SOURCES = \
-	parser/Tokenizer.h \
+	tests/stub_StatHist.cc \
 	tests/stub_debug.cc \
 	tests/stub_libmem.cc \
-	tests/stub_StatHist.cc
+	parser/Tokenizer.h
 tests_testTokenizer_LDADD = \
 	parser/libparser.la \
 	sbuf/libsbuf.la \
@@ -1065,14 +1056,14 @@
 
 check_PROGRAMS += tests/testSBuf
 tests_testSBuf_SOURCES = \
-	tests/SBufFindTest.cc \
-	tests/SBufFindTest.h \
 	tests/testSBuf.cc \
-	tests/testSBuf.h
+	tests/testSBuf.h \
+	tests/SBufFindTest.cc \
+	tests/SBufFindTest.h
 nodist_tests_testSBuf_SOURCES = \
+	tests/stub_StatHist.cc \
 	tests/stub_debug.cc \
-	tests/stub_libmem.cc \
-	tests/stub_StatHist.cc
+	tests/stub_libmem.cc
 tests_testSBuf_LDADD = \
 	sbuf/libsbuf.la \
 	base/libbase.la \
@@ -1086,9 +1077,9 @@
 	tests/testSBufList.cc \
 	tests/testSBufList.h
 nodist_tests_testSBufList_SOURCES = \
+	tests/stub_StatHist.cc \
 	tests/stub_debug.cc \
-	tests/stub_libmem.cc \
-	tests/stub_StatHist.cc
+	tests/stub_libmem.cc
 tests_testSBufList_LDADD = \
 	sbuf/libsbuf.la \
 	base/libbase.la \
@@ -1102,8 +1093,8 @@
 	tests/testString.cc \
 	tests/testString.h
 nodist_tests_testString_SOURCES = \
-	String.cc \
 	tests/stub_SBuf.cc \
+	String.cc \
 	tests/stub_debug.cc \
 	tests/stub_libmem.cc
 tests_testString_LDADD = \
@@ -1118,132 +1109,133 @@
 if ENABLE_FS_ROCK
 check_PROGRAMS += tests/testRock
 tests_testRock_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(STOREMETA_SOURCE) \
+	$(UNLINKDSOURCE) \
 	AccessLogEntry.cc \
 	AccessLogEntry.h \
-	cbdata.cc \
+	tests/stub_CacheDigest.cc \
 	CacheDigest.h \
-	CollapsedForwarding.h \
 	CollapsedForwarding.cc \
-	tests/stub_CacheDigest.cc \
+	CollapsedForwarding.h \
 	ConfigOption.cc \
 	ConfigParser.cc \
-	fs_io.h \
-	fs_io.cc \
 	ETag.cc \
 	EventLoop.cc \
-	event.cc \
 	FadingCounter.cc \
-	fatal.h \
-	fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.h \
-	fde.cc \
 	FileMap.h \
-	filemap.cc \
-	HttpHeaderFieldStat.h \
-	HttpBody.h \
+	tests/stub_HelperChildConfig.cc \
 	HttpBody.cc \
+	HttpBody.h \
 	HttpHdrCc.cc \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
-	HttpHeader.h \
 	HttpHeader.cc \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
 	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	int.h \
-	int.cc \
+	tests/stub_HttpRequest.cc \
 	LogTags.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemObject.cc \
 	MemStore.cc \
-	mem_node.cc \
-	Notes.h \
 	Notes.cc \
+	Notes.h \
 	Parsing.cc \
+	tests/stub_Port.cc \
 	RemovalPolicy.cc \
 	RequestFlags.cc \
 	RequestFlags.h \
 	ResolvedPeers.cc \
 	ResolvedPeers.h \
-	StatCounters.h \
+	tests/testRock.cc \
+	tests/testRock.h \
+	tests/stub_SBufDetailedStats.cc \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	tests/stub_StatHist.cc \
-	stmem.cc \
-	repl_modules.h \
-	tests/stub_stat.cc \
-	store.cc \
+	StatHist.h \
 	StoreFileSystem.cc \
 	StoreIOState.cc \
 	StoreMetaUnpacker.cc \
-	$(STOREMETA_SOURCE) \
+	tests/testStoreSupport.cc \
+	tests/testStoreSupport.h \
 	StoreSwapLogData.cc \
-	store_io.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	store_swapmeta.cc \
-	store_swapout.cc \
-	tests/stub_SBufDetailedStats.cc \
-	String.cc \
-	StrList.h \
 	StrList.cc \
-	Transients.h \
+	StrList.h \
+	String.cc \
 	Transients.cc \
-	tests/testRock.cc \
-	tests/testRock.h \
-	tests/testStoreSupport.cc \
-	tests/testStoreSupport.h \
-	log/access_log.h \
+	Transients.h \
 	tests/stub_access_log.cc \
-	cache_cf.h \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
+	cbdata.cc \
 	tests/stub_client_db.cc \
 	tests/stub_client_side_request.cc \
 	tests/stub_debug.cc \
 	tests/stub_errorpage.cc \
-	tests/stub_HelperChildConfig.cc \
+	event.cc \
+	fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	fde.h \
+	filemap.cc \
+	fs_io.cc \
+	fs_io.h \
 	tests/stub_http.cc \
-	tests/stub_HttpRequest.cc \
-	tests/stub_libauth.cc \
 	tests/stub_icp.cc \
+	int.cc \
+	int.h \
 	tests/stub_ipc.cc \
 	tests/stub_ipcache.cc \
+	tests/stub_libanyp.cc \
+	tests/stub_libauth.cc \
+	tests/stub_liberror.cc \
 	tests/stub_libeui.cc \
 	tests/stub_libformat.cc \
 	tests/stub_libicmp.cc \
 	tests/stub_liblog.cc \
 	tests/stub_libmgr.cc \
 	tests/stub_libsecurity.cc \
-	mime.h \
+	log/access_log.h \
+	mem_node.cc \
 	tests/stub_mime.cc \
+	mime.h \
 	tests/stub_neighbors.cc \
-	tests/stub_Port.cc \
 	tests/stub_pconn.cc \
+	repl_modules.h \
+	tests/stub_stat.cc \
+	stmem.cc \
+	store.cc \
 	tests/stub_store_client.cc \
-	store_rebuild.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
 	tests/stub_store_rebuild.cc \
+	store_rebuild.h \
 	tests/stub_store_stats.cc \
-	tools.h \
-	tests/stub_tools.cc \
+	store_swapmeta.cc \
+	store_swapout.cc \
 	time.cc \
-	tests/stub_libanyp.cc \
-	wordlist.h \
+	tests/stub_tools.cc \
+	tools.h \
 	wordlist.cc \
-	$(DELAY_POOL_SOURCE) \
-	$(UNLINKDSOURCE)
+	wordlist.h
 nodist_tests_testRock_SOURCES = \
 	$(TESTSOURCES) \
-	hier_code.cc \
 	SquidMath.cc \
 	SquidMath.h \
+	hier_code.cc \
 	swap_log_op.cc
 tests_testRock_LDADD = \
 	http/libhttp.la \
@@ -1288,138 +1280,139 @@
 if ENABLE_FS_UFS
 check_PROGRAMS += tests/testUfs
 tests_testUfs_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(STOREMETA_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
 	AccessLogEntry.h \
-	tests/testUfs.cc \
-	tests/testUfs.h \
-	tests/stub_cache_manager.cc \
-	tests/stub_client_db.cc \
+	tests/stub_CacheDigest.cc \
+	CacheDigest.h \
+	ClientInfo.h \
 	tests/stub_CollapsedForwarding.cc \
-	tests/stub_HelperChildConfig.cc \
-	tests/stub_icp.cc \
-	tests/stub_ipc.cc \
-	tests/stub_ipcache.cc \
-	tests/stub_libeui.cc \
-	tests/stub_libicmp.cc \
-	tests/stub_liblog.cc \
-	tests/stub_neighbors.cc \
-	tests/stub_pconn.cc \
-	tests/stub_Port.cc \
-	tests/stub_UdsOp.cc \
-	internal.h \
-	tests/stub_internal.cc \
-	tests/stub_libformat.cc \
-	tests/stub_libsecurity.cc \
-	tests/stub_stat.cc \
-	store_rebuild.h \
-	tests/stub_store_rebuild.cc \
-	tests/stub_store_stats.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.h \
-	fde.cc \
-	client_db.h \
+	ConfigOption.cc \
+	ConfigParser.cc \
+	ETag.cc \
+	EventLoop.cc \
 	FadingCounter.cc \
-	fs_io.h \
-	fs_io.cc \
 	FileMap.h \
-	filemap.cc \
-	HttpBody.h \
+	tests/stub_HelperChildConfig.cc \
 	HttpBody.cc \
+	HttpBody.h \
+	HttpHdrCc.cc \
+	HttpHdrCc.h \
+	HttpHdrContRange.cc \
+	HttpHdrRange.cc \
+	HttpHdrSc.cc \
+	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	int.h \
-	int.cc \
+	tests/stub_HttpRequest.cc \
 	LogTags.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
-	Transients.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
+	MemBuf.cc \
 	MemObject.cc \
 	MemStore.cc \
-	Notes.h \
 	Notes.cc \
-	StoreSwapLogData.cc \
+	Notes.h \
+	Parsing.cc \
+	tests/stub_Port.cc \
+	RemovalPolicy.cc \
+	RequestFlags.cc \
+	RequestFlags.h \
+	tests/stub_SBufDetailedStats.cc \
+	StatCounters.cc \
+	StatCounters.h \
+	StatHist.cc \
+	StatHist.h \
+	StoreFileSystem.cc \
 	StoreIOState.cc \
 	StoreMetaUnpacker.cc \
-	$(STOREMETA_SOURCE) \
-	StoreFileSystem.cc \
-	store_io.cc \
-	store_swapout.cc \
-	store_swapmeta.cc \
-	$(UNLINKDSOURCE) \
-	$(WIN32_SOURCE) \
-	event.cc \
-	$(DELAY_POOL_SOURCE) \
-	CacheDigest.h \
-	tests/stub_CacheDigest.cc \
-	ConfigParser.cc \
-	EventLoop.cc \
-	RemovalPolicy.cc \
-	repl_modules.h \
-	store.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	Parsing.cc \
-	ConfigOption.cc \
+	tests/testStoreSupport.cc \
+	tests/testStoreSupport.h \
+	StoreSwapLogData.cc \
+	StrList.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_UdsOp.cc \
+	tests/testUfs.cc \
+	tests/testUfs.h \
+	tests/stub_access_log.cc \
 	tests/stub_acl.cc \
-	cache_cf.h \
 	tests/stub_cache_cf.cc \
-	tests/stub_helper.cc \
+	cache_cf.h \
+	tests/stub_cache_manager.cc \
 	cbdata.cc \
-	tests/stub_SBufDetailedStats.cc \
-	String.cc \
-	tests/stub_debug.cc \
+	tests/stub_client_db.cc \
+	client_db.h \
 	tests/stub_client_side_request.cc \
+	tests/stub_debug.cc \
+	tests/stub_errorpage.cc \
+	event.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	fde.h \
+	filemap.cc \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_helper.cc \
 	tests/stub_http.cc \
+	tests/stub_icp.cc \
+	int.cc \
+	int.h \
+	tests/stub_internal.cc \
+	internal.h \
+	tests/stub_ipc.cc \
+	tests/stub_ipcache.cc \
+	tests/stub_libanyp.cc \
 	tests/stub_libauth.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
+	tests/stub_libformat.cc \
+	tests/stub_libicmp.cc \
+	tests/stub_liblog.cc \
+	tests/stub_libsecurity.cc \
+	log/access_log.h \
 	mem_node.cc \
-	stmem.cc \
-	mime.h \
 	tests/stub_mime.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	ClientInfo.h \
-	MemBuf.cc \
-	HttpHdrContRange.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
-	HttpHdrCc.cc \
-	HttpHdrSc.cc \
-	HttpHdrScTarget.cc \
-	tests/stub_libanyp.cc \
-	StatCounters.h \
-	StatCounters.cc \
-	StatHist.h \
-	StatHist.cc \
-	StrList.h \
-	StrList.cc \
-	HttpHdrRange.cc \
-	ETag.cc \
-	tests/stub_errorpage.cc \
-	tests/stub_HttpRequest.cc \
-	log/access_log.h \
-	tests/stub_access_log.cc \
-	refresh.h \
+	mime.h \
+	tests/stub_neighbors.cc \
+	tests/stub_pconn.cc \
 	refresh.cc \
+	refresh.h \
+	repl_modules.h \
+	tests/stub_stat.cc \
+	stmem.cc \
+	store.cc \
 	tests/stub_store_client.cc \
-	tools.h \
-	tests/stub_tools.cc \
-	tests/testStoreSupport.cc \
-	tests/testStoreSupport.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
+	tests/stub_store_rebuild.cc \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
+	store_swapmeta.cc \
+	store_swapout.cc \
 	time.cc \
-	wordlist.h \
-	wordlist.cc
+	tests/stub_tools.cc \
+	tools.h \
+	wordlist.cc \
+	wordlist.h
 nodist_tests_testUfs_SOURCES = \
 	$(TESTSOURCES) \
-	hier_code.cc \
 	SquidMath.cc \
 	SquidMath.h \
+	hier_code.cc \
 	swap_log_op.cc
 tests_testUfs_LDADD = \
 	http/libhttp.la \
@@ -1469,133 +1462,134 @@
 check_PROGRAMS += tests/testStore
 ## why so many sources? well httpHeaderTools requites ACLChecklist & friends.
 ## first line - what we are testing.
-tests_testStore_SOURCES= \
-	CacheDigest.h \
+tests_testStore_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
 	tests/stub_CacheDigest.cc \
-	cbdata.cc \
+	CacheDigest.h \
 	ClientInfo.h \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
 	ETag.cc \
-	event.cc \
 	EventLoop.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
 	FileMap.h \
-	filemap.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	tests/stub_HelperChildConfig.cc \
+	HttpBody.cc \
+	HttpBody.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
 	HttpHeaderTools.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	RequestFlags.cc \
-	RequestFlags.h \
-	int.h \
-	int.cc \
+	HttpHeaderTools.h \
+	tests/stub_HttpReply.cc \
+	tests/stub_HttpRequest.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
-	mem_node.cc \
 	MemBuf.cc \
 	MemObject.cc \
 	MemStore.cc \
-	Notes.h \
 	Notes.cc \
+	Notes.h \
+	tests/testPackableStream.cc \
+	tests/testPackableStream.h \
 	Parsing.cc \
+	tests/stub_Port.cc \
 	RemovalPolicy.cc \
-	refresh.h \
-	refresh.cc \
-	StatCounters.h \
+	RequestFlags.cc \
+	RequestFlags.h \
+	tests/stub_SBufDetailedStats.cc \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	StatHist.cc \
-	stmem.cc \
-	repl_modules.h \
-	store.cc \
-	store_io.cc \
-	store_swapout.cc \
+	StatHist.h \
+	tests/testStore.cc \
+	tests/testStore.h \
+	tests/testStoreController.cc \
+	tests/testStoreController.h \
+	tests/testStoreHashIndex.cc \
+	tests/testStoreHashIndex.h \
 	StoreIOState.cc \
 	tests/stub_StoreMeta.cc \
 	StoreMetaUnpacker.cc \
+	tests/testStoreSupport.cc \
+	tests/testStoreSupport.h \
 	StoreSwapLogData.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	tests/stub_SBufDetailedStats.cc \
-	String.cc \
-	StrList.h \
 	StrList.cc \
-	tests/CapturingStoreEntry.h \
-	log/access_log.h \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_UdsOp.cc \
 	tests/stub_access_log.cc \
 	tests/stub_acl.cc \
-	cache_cf.h \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
+	cbdata.cc \
 	tests/stub_client_side_request.cc \
 	tests/stub_comm.cc \
 	tests/stub_debug.cc \
 	tests/stub_errorpage.cc \
+	event.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	tests/stub_fd.cc \
 	fd.h \
 	fde.h \
-	tests/stub_fd.cc \
+	filemap.cc \
+	fs_io.cc \
+	fs_io.h \
 	tests/stub_helper.cc \
-	tests/stub_HelperChildConfig.cc \
 	tests/stub_http.cc \
+	int.cc \
+	int.h \
+	tests/stub_libanyp.cc \
 	tests/stub_libauth.cc \
-	tests/stub_libeui.cc \
+	tests/stub_libcomm.cc \
 	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
 	tests/stub_libformat.cc \
 	tests/stub_libsecurity.cc \
 	tests/stub_libsslsquid.cc \
-	HttpBody.h \
-	HttpBody.cc \
-	tests/stub_HttpReply.cc \
-	tests/stub_HttpRequest.cc \
-	tests/stub_libcomm.cc \
-	mime.h \
+	log/access_log.h \
+	mem_node.cc \
 	tests/stub_mime.cc \
-	tests/stub_Port.cc \
+	mime.h \
+	refresh.cc \
+	refresh.h \
+	repl_modules.h \
 	tests/stub_stat.cc \
+	stmem.cc \
+	store.cc \
 	tests/stub_store_client.cc \
-	tests/stub_store_stats.cc \
-	store_rebuild.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
 	tests/stub_store_rebuild.cc \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
+	store_swapout.cc \
 	tests/stub_store_swapout.cc \
-	tools.h \
-	Transients.cc \
-	tests/stub_tools.cc \
-	tests/stub_UdsOp.cc \
-	tests/testPackableStream.cc \
-	tests/testPackableStream.h \
-	tests/testStore.cc \
-	tests/testStore.h \
-	tests/testStoreController.cc \
-	tests/testStoreController.h \
-	tests/testStoreHashIndex.cc \
-	tests/testStoreHashIndex.h \
-	tests/testStoreSupport.cc \
-	tests/testStoreSupport.h \
+	tests/CapturingStoreEntry.h \
 	tests/TestSwapDir.cc \
 	tests/TestSwapDir.h \
 	tests/stub_time.cc \
-	tests/stub_libanyp.cc \
-	wordlist.h \
-	wordlist.cc
-nodist_tests_testStore_SOURCES= \
+	tests/stub_tools.cc \
+	tools.h \
+	wordlist.cc \
+	wordlist.h
+nodist_tests_testStore_SOURCES = \
+	$(TESTSOURCES) \
 	SquidMath.cc \
 	SquidMath.h \
-	swap_log_op.cc \
-	$(TESTSOURCES)
+	swap_log_op.cc
 tests_testStore_LDADD= \
 	libsquid.la \
 	http/libhttp.la \
@@ -1631,143 +1625,144 @@
 
 check_PROGRAMS += tests/testDiskIO
 tests_testDiskIO_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
 	AccessLogEntry.h \
-	CacheDigest.h \
 	tests/stub_CacheDigest.cc \
-	cbdata.cc \
-	client_db.h \
+	CacheDigest.h \
 	ClientInfo.h \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
-	$(DELAY_POOL_SOURCE) \
-	FadingCounter.cc \
-	fs_io.h \
-	fs_io.cc \
+	tests/testDiskIO.cc \
+	tests/testDiskIO.h \
 	tests/stub_ETag.cc \
 	EventLoop.cc \
-	event.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.h \
-	fde.cc \
+	FadingCounter.cc \
 	FileMap.h \
-	filemap.cc \
-	HttpBody.h \
+	tests/stub_HelperChildConfig.cc \
 	HttpBody.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	HttpBody.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
+	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
-	HttpHdrRange.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
 	HttpHeaderTools.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	int.h \
-	int.cc \
+	tests/stub_HttpRequest.cc \
 	LogTags.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemObject.cc \
-	mem_node.cc \
-	Notes.h \
+	tests/stub_MemStore.cc \
 	Notes.cc \
+	Notes.h \
 	Parsing.cc \
-	refresh.h \
-	refresh.cc \
+	tests/stub_Port.cc \
 	RemovalPolicy.cc \
-	RequestFlags.h \
 	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
 	ResolvedPeers.h \
-	tests/stub_libsecurity.cc \
-	StatCounters.h \
+	tests/stub_SBufDetailedStats.cc \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	tests/stub_StatHist.cc \
-	stmem.cc \
-	tests/stub_SBufDetailedStats.cc \
+	StatHist.h \
 	StoreFileSystem.cc \
 	StoreIOState.cc \
 	tests/stub_StoreMeta.cc \
 	StoreMetaUnpacker.cc \
+	tests/testStoreSupport.cc \
+	tests/testStoreSupport.h \
 	StoreSwapLogData.cc \
-	store_io.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	store_swapout.cc \
-	store_swapmeta.cc \
-	repl_modules.h \
-	store.cc \
-	String.cc \
-	StrList.h \
 	StrList.cc \
-	tests/stub_libstore.cc \
+	StrList.h \
+	String.cc \
 	Transients.cc \
-	log/access_log.h \
+	tests/stub_UdsOp.cc \
 	tests/stub_access_log.cc \
 	tests/stub_acl.cc \
-	cache_cf.h \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
+	cbdata.cc \
 	tests/stub_client_db.cc \
-	client_side_request.h \
+	client_db.h \
 	tests/stub_client_side_request.cc \
+	client_side_request.h \
 	tests/stub_debug.cc \
 	tests/stub_errorpage.cc \
+	event.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	fde.h \
+	filemap.cc \
+	fs_io.cc \
+	fs_io.h \
 	tests/stub_helper.cc \
-	tests/stub_HelperChildConfig.cc \
-	tests/stub_HttpRequest.cc \
 	tests/stub_http.cc \
 	tests/stub_icp.cc \
-	internal.h \
+	int.cc \
+	int.h \
 	tests/stub_internal.cc \
+	internal.h \
 	tests/stub_ipc.cc \
 	tests/stub_ipcache.cc \
-	tests/stub_libauth_acls.cc \
+	tests/stub_libanyp.cc \
 	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
+	tests/stub_liberror.cc \
 	tests/stub_libeui.cc \
 	tests/stub_libformat.cc \
 	tests/stub_libicmp.cc \
 	tests/stub_liblog.cc \
-	tests/stub_MemStore.cc \
-	mime.h \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	log/access_log.h \
+	mem_node.cc \
 	tests/stub_mime.cc \
+	mime.h \
 	tests/stub_neighbors.cc \
 	tests/stub_pconn.cc \
-	tests/stub_Port.cc \
+	refresh.cc \
+	refresh.h \
+	repl_modules.h \
 	tests/stub_stat.cc \
+	stmem.cc \
+	store.cc \
 	tests/stub_store_client.cc \
-	tests/stub_store_stats.cc \
-	store_rebuild.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
 	tests/stub_store_rebuild.cc \
-	tests/stub_UdsOp.cc \
-	tests/testDiskIO.cc \
-	tests/testDiskIO.h \
-	tests/testStoreSupport.cc \
-	tests/testStoreSupport.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
+	store_swapmeta.cc \
+	store_swapout.cc \
 	tests/stub_time.cc \
-	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc \
+	tests/stub_tools.cc \
 	tools.h \
-	tests/stub_tools.cc
-nodist_tests_testDiskIO_SOURCES= \
+	wordlist.cc \
+	wordlist.h
+nodist_tests_testDiskIO_SOURCES = \
 	$(TESTSOURCES) \
-	hier_code.cc \
 	SquidMath.cc \
 	SquidMath.h \
+	hier_code.cc \
 	swap_log_op.cc
 tests_testDiskIO_LDADD = \
 	libsquid.la \
@@ -1815,26 +1810,26 @@
 	tests/testACLMaxUserIP.h
 nodist_tests_testACLMaxUserIP_SOURCES = \
 	ConfigParser.cc \
-	dlink.cc \
-	globals.cc \
+	tests/stub_HelperChildConfig.cc \
+	tests/stub_HttpHeader.cc \
+	tests/stub_HttpRequest.cc \
+	tests/stub_MemBuf.cc \
 	Parsing.cc \
+	tests/stub_StatHist.cc \
 	String.cc \
 	tests/stub_access_log.cc \
 	tests/stub_cache_cf.cc \
 	tests/stub_cbdata.cc \
 	tests/stub_client_side.cc \
 	tests/stub_debug.cc \
+	dlink.cc \
 	tests/stub_errorpage.cc \
 	tests/stub_fatal.cc \
-	tests/stub_HelperChildConfig.cc \
-	tests/stub_HttpHeader.cc \
-	tests/stub_HttpRequest.cc \
+	globals.cc \
 	tests/stub_libauth.cc \
 	tests/stub_libhttp.cc \
 	tests/stub_libmem.cc \
-	tests/stub_libsecurity.cc \
-	tests/stub_MemBuf.cc \
-	tests/stub_StatHist.cc
+	tests/stub_libsecurity.cc
 tests_testACLMaxUserIP_LDADD = \
 	$(AUTH_ACL_LIBS) \
 	acl/libapi.la \
@@ -1860,26 +1855,21 @@
 
 check_PROGRAMS += tests/test_http_range
 tests_test_http_range_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
-	BodyPipe.cc \
-	cache_cf.h \
 	AuthReg.h \
-	RefreshPattern.h \
+	BodyPipe.cc \
+	tests/stub_CacheDigest.cc \
+	CacheDigest.h \
 	CachePeer.cc \
 	CachePeer.h \
-	cache_manager.cc \
-	CacheDigest.h \
-	tests/stub_CacheDigest.cc \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -1887,166 +1877,172 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	debug.cc \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	event.cc \
+	tests/stub_EventLoop.cc \
 	FadingCounter.cc \
-	fatal.h \
-	tests/stub_libauth.cc \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	hier_code.h \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
+	HttpBody.h \
 	tests/stub_HttpControlMsg.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
-	HttpHeader.h \
 	HttpHeader.cc \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
 	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	PeerPoolMgr.h \
-	PeerPoolMgr.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
 	HttpRequest.cc \
-	icp_v2.cc \
-	icp_v3.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
 	LogTags.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemObject.cc \
-	tests/stub_libmem.cc \
-	mem_node.cc \
-	mime.h \
-	mime.cc \
-	mime_header.h \
-	mime_header.cc \
-	multicast.h \
-	multicast.cc \
-	neighbors.h \
-	neighbors.cc \
+	tests/stub_MemStore.cc \
 	Notes.cc \
 	Notes.h \
 	Parsing.cc \
-	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc \
-	peer_select.cc \
-	peer_sourcehash.h \
-	peer_sourcehash.cc \
-	peer_userhash.h \
-	peer_userhash.cc \
+	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
 	Pipeline.cc \
 	Pipeline.h \
-	pconn.cc \
-	redirect.h \
-	tests/stub_redirect.cc \
-	refresh.h \
-	refresh.cc \
+	RefreshPattern.h \
 	RemovalPolicy.cc \
+	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
 	ResolvedPeers.h \
 	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
 	SquidMath.cc \
-	IoStats.h \
-	stat.h \
-	stat.cc \
-	StatCounters.h \
+	SquidMath.h \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	StatHist.cc \
-	stmem.cc \
-	repl_modules.h \
-	store.cc \
-	store_client.cc \
-	store_digest.h \
-	tests/stub_store_digest.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	store_io.cc \
-	store_log.h \
-	store_log.cc \
-	store_rebuild.h \
-	store_rebuild.cc \
-	store_swapin.h \
-	store_swapin.cc \
-	store_swapmeta.cc \
-	store_swapout.cc \
+	StatHist.h \
 	StoreFileSystem.cc \
 	StoreIOState.cc \
 	tests/stub_StoreMeta.cc \
 	StoreMetaUnpacker.cc \
 	StoreSwapLogData.cc \
-	String.cc \
-	StrList.h \
 	StrList.cc \
-	tests/stub_libstore.cc \
+	StrList.h \
+	String.cc \
 	Transients.cc \
 	tests/test_http_range.cc \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
 	tests/stub_external_acl.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
 	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
+	tests/stub_libauth.cc \
 	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
 	tests/stub_libeui.cc \
+	tests/stub_libmem.cc \
 	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
 	tests/stub_main_cc.cc \
-	tests/stub_MemStore.cc \
+	mem_node.cc \
+	mime.cc \
+	mime.h \
+	mime_header.cc \
+	mime_header.h \
+	multicast.cc \
+	multicast.h \
+	neighbors.cc \
+	neighbors.h \
+	pconn.cc \
+	peer_digest.cc \
+	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
+	peer_select.cc \
+	peer_sourcehash.cc \
+	peer_sourcehash.h \
+	peer_userhash.cc \
+	peer_userhash.h \
+	tests/stub_redirect.cc \
+	redirect.h \
+	refresh.cc \
+	refresh.h \
+	repl_modules.h \
+	stat.cc \
+	stat.h \
+	stmem.cc \
+	store.cc \
+	store_client.cc \
+	tests/stub_store_digest.cc \
+	store_digest.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
+	store_log.cc \
+	store_log.h \
+	store_rebuild.cc \
+	store_rebuild.h \
 	tests/stub_store_stats.cc \
-	tests/stub_EventLoop.cc \
+	store_swapin.cc \
+	store_swapin.h \
+	store_swapmeta.cc \
+	store_swapout.cc \
 	time.cc \
-	tools.h \
 	tools.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 nodist_tests_test_http_range_SOURCES = \
 	$(BUILT_SOURCES)
 tests_test_http_range_LDADD = \
@@ -2089,6 +2085,7 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_test_http_range_LDFLAGS = $(LIBADD_DL)
@@ -2096,34 +2093,34 @@
 check_PROGRAMS += tests/testHttp1Parser
 tests_testHttp1Parser_SOURCES = \
 	Debug.h \
+	tests/stub_HelperChildConfig.cc \
+	tests/testHttp1Parser.cc \
+	tests/testHttp1Parser.h \
 	MemBuf.cc \
 	MemBuf.h \
 	tests/stub_MemObject.cc \
-	mime_header.cc \
-	mime_header.h \
-	String.cc \
-	cache_cf.h \
 	tests/stub_SBufDetailedStats.cc \
+	String.cc \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
-	tests/stub_comm.cc \
 	tests/stub_cbdata.cc \
+	tests/stub_comm.cc \
 	tests/stub_debug.cc \
 	tests/stub_event.cc \
-	tests/stub_HelperChildConfig.cc \
+	tests/stub_libanyp.cc \
 	tests/stub_libmem.cc \
 	tests/stub_libsecurity.cc \
+	mime_header.cc \
+	mime_header.h \
 	tests/stub_stmem.cc \
 	tests/stub_store.cc \
 	tests/stub_store_stats.cc \
-	tools.h \
-	tests/stub_tools.cc \
-	tests/testHttp1Parser.cc \
-	tests/testHttp1Parser.h \
 	tests/stub_time.cc \
-	tests/stub_libanyp.cc \
-	wordlist.h \
-	wordlist.cc
+	tests/stub_tools.cc \
+	tools.h \
+	wordlist.cc \
+	wordlist.h
 nodist_tests_testHttp1Parser_SOURCES = \
 	$(TESTSOURCES)
 tests_testHttp1Parser_LDADD= \
@@ -2142,18 +2139,16 @@
 tests_testHttp1Parser_LDFLAGS = $(LIBADD_DL)
 
 check_PROGRAMS += tests/testHttpReply
-tests_testHttpReply_SOURCES=\
-	cbdata.cc \
-	cbdata.h \
+tests_testHttpReply_SOURCES = \
 	ConfigParser.cc \
 	tests/stub_ETag.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	HttpBody.h \
+	tests/stub_HelperChildConfig.cc \
 	HttpBody.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	HttpBody.h \
+	HttpControlMsg.cc \
+	HttpControlMsg.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrContRange.h \
 	HttpHdrRange.cc \
@@ -2161,64 +2156,67 @@
 	HttpHdrSc.h \
 	HttpHdrScTarget.cc \
 	HttpHdrScTarget.h \
-	HttpHeader.h \
 	HttpHeader.cc \
-	HttpHeaderMask.h \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderMask.h \
 	HttpHeaderTools.cc \
-	HttpControlMsg.cc \
-	HttpControlMsg.h \
+	HttpHeaderTools.h \
 	HttpReply.cc \
+	tests/testHttpReply.cc \
 	HttpReply.h \
+	tests/testHttpReply.h \
+	tests/stub_HttpRequest.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemBuf.h \
-	mime_header.h \
-	mime_header.cc \
-	Notes.h \
 	Notes.cc \
+	Notes.h \
+	tests/stub_SBufDetailedStats.cc \
 	SquidString.h \
 	SquidTime.h \
-	tests/stub_SBufDetailedStats.cc \
-	String.cc \
-	StrList.h \
+	StatCounters.cc \
+	StatCounters.h \
+	tests/stub_StatHist.cc \
+	StatHist.h \
 	StrList.cc \
-	log/access_log.h \
+	StrList.h \
+	String.cc \
 	tests/stub_access_log.cc \
-	cache_cf.h \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
+	cbdata.cc \
+	cbdata.h \
 	tests/stub_comm.cc \
 	tests/stub_debug.cc \
 	tests/stub_errorpage.cc \
 	tests/stub_event.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
 	tests/stub_fd.cc \
-	tests/stub_HelperChildConfig.cc \
-	tests/stub_libformat.cc \
+	tests/stub_libanyp.cc \
 	tests/stub_libauth.cc \
 	tests/stub_libcomm.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libformat.cc \
 	tests/stub_libmgr.cc \
 	tests/stub_libsecurity.cc \
 	tests/stub_libsslsquid.cc \
-	StatCounters.h \
-	StatCounters.cc \
-	StatHist.h \
-	tests/stub_StatHist.cc \
+	log/access_log.h \
+	mime_header.cc \
+	mime_header.h \
 	repl_modules.h \
 	tests/stub_store.cc \
 	tests/stub_store_stats.cc \
-	tools.h \
-	tests/stub_tools.cc \
-	tests/stub_HttpRequest.cc \
-	tests/testHttpReply.cc \
-	tests/testHttpReply.h \
 	tests/stub_time.cc \
-	tests/stub_libanyp.cc \
-	wordlist.h \
-	wordlist.cc
-nodist_tests_testHttpReply_SOURCES=\
+	tests/stub_tools.cc \
+	tools.h \
+	wordlist.cc \
+	wordlist.h
+nodist_tests_testHttpReply_SOURCES = \
 	$(TESTSOURCES) \
 	hier_code.cc
 tests_testHttpReply_LDADD=\
@@ -2246,44 +2244,20 @@
 
 check_PROGRAMS += tests/testHttpRequest
 tests_testHttpRequest_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
-	HttpRequest.cc \
-	tests/stub_libmem.cc \
-	String.cc \
-	tests/testHttpRequest.h \
-	tests/testHttpRequest.cc \
-	tests/testHttpRequestMethod.h \
-	tests/testHttpRequestMethod.cc \
-	tests/stub_libauth.cc \
-	tests/stub_main_cc.cc \
-	tests/stub_ipc_Forwarder.cc \
-	tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc \
-	tests/stub_store_stats.cc \
-	tests/stub_EventLoop.cc \
-	time.cc \
-	BodyPipe.cc \
-	cache_manager.cc \
-	cache_cf.h \
 	AuthReg.h \
-	RefreshPattern.h \
-	debug.cc \
-	CacheDigest.h \
+	BodyPipe.cc \
 	tests/stub_CacheDigest.cc \
+	CacheDigest.h \
 	CachePeer.cc \
 	CachePeer.h \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -2291,150 +2265,175 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	external_acl.cc \
+	tests/stub_EventLoop.cc \
 	ExternalACLEntry.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
-	fqdncache.h \
-	fqdncache.cc \
+	FadingCounter.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	hier_code.h \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
+	HttpBody.h \
 	tests/stub_HttpControlMsg.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	icp_v2.cc \
-	icp_v3.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
+	HttpRequest.cc \
+	tests/testHttpRequest.cc \
+	tests/testHttpRequest.h \
+	tests/testHttpRequestMethod.cc \
+	tests/testHttpRequestMethod.h \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
 	LogTags.cc \
-	tests/stub_libsecurity.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
-	multicast.h \
-	multicast.cc \
-	mem_node.cc \
 	MemBuf.cc \
 	MemObject.cc \
-	mime.h \
-	mime.cc \
-	mime_header.h \
-	mime_header.cc \
-	neighbors.h \
-	neighbors.cc \
+	MemStore.cc \
 	Notes.cc \
 	Notes.h \
 	Parsing.cc \
-	pconn.cc \
-	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc \
-	peer_select.cc \
-	peer_sourcehash.h \
-	peer_sourcehash.cc \
-	peer_userhash.h \
-	peer_userhash.cc \
-	PeerPoolMgr.h \
 	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
 	Pipeline.cc \
 	Pipeline.h \
-	redirect.h \
-	tests/stub_libauth_acls.cc \
-	tests/stub_redirect.cc \
-	refresh.h \
-	refresh.cc \
+	RefreshPattern.h \
 	RemovalPolicy.cc \
+	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
 	ResolvedPeers.h \
 	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
 	SquidMath.cc \
-	IoStats.h \
-	stat.h \
-	stat.cc \
-	StatCounters.h \
+	SquidMath.h \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	StatHist.cc \
-	stmem.cc \
+	StatHist.h \
+	StoreFileSystem.cc \
+	StoreIOState.cc \
+	tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc \
+	StrList.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
+	external_acl.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
+	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
+	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
+	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
+	tests/stub_libmem.cc \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	tests/stub_main_cc.cc \
+	mem_node.cc \
+	mime.cc \
+	mime.h \
+	mime_header.cc \
+	mime_header.h \
+	multicast.cc \
+	multicast.h \
+	neighbors.cc \
+	neighbors.h \
+	pconn.cc \
+	peer_digest.cc \
+	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
+	peer_select.cc \
+	peer_sourcehash.cc \
+	peer_sourcehash.h \
+	peer_userhash.cc \
+	peer_userhash.h \
+	tests/stub_redirect.cc \
+	redirect.h \
+	refresh.cc \
+	refresh.h \
 	repl_modules.h \
+	stat.cc \
+	stat.h \
+	stmem.cc \
 	store.cc \
 	store_client.cc \
-	store_digest.h \
 	tests/stub_store_digest.cc \
+	store_digest.h \
 	store_io.cc \
-	store_key_md5.h \
 	store_key_md5.cc \
-	store_log.h \
+	store_key_md5.h \
 	store_log.cc \
-	store_rebuild.h \
+	store_log.h \
 	store_rebuild.cc \
-	store_swapin.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
 	store_swapin.cc \
+	store_swapin.h \
 	store_swapmeta.cc \
 	store_swapout.cc \
-	StoreFileSystem.cc \
-	StoreIOState.cc \
-	tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc \
-	StrList.h \
-	StrList.cc \
-	event.cc \
-	tools.h \
+	time.cc \
 	tools.cc \
-	Transients.cc \
-	tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	tests/stub_libstore.cc \
-	MemStore.cc \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	FadingCounter.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 nodist_tests_testHttpRequest_SOURCES = \
 	$(BUILT_SOURCES)
 tests_testHttpRequest_LDADD = \
@@ -2477,6 +2476,7 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_testHttpRequest_LDFLAGS = $(LIBADD_DL)
@@ -2488,9 +2488,9 @@
 	tests/testIpAddress.cc \
 	tests/testIpAddress.h
 nodist_tests_testIpAddress_SOURCES = \
+	tests/stub_SBuf.cc \
 	tests/stub_debug.cc \
 	tests/stub_libmem.cc \
-	tests/stub_SBuf.cc \
 	tests/stub_tools.cc
 tests_testIpAddress_LDADD = \
 	ip/libip.la \
@@ -2505,16 +2505,16 @@
 check_PROGRAMS += tests/testIcmp
 # icmp/libicmpcore.la is used by pinger so SHOULD NOT require more dependancies! :-(
 tests_testIcmp_SOURCES = \
-	tests/testIcmp.h \
-	tests/testIcmp.cc
+	tests/testIcmp.cc \
+	tests/testIcmp.h
 nodist_tests_testIcmp_SOURCES = \
-	icmp/Icmp.h \
+	tests/stub_SBuf.cc \
 	SquidTime.h \
 	tests/stub_debug.cc \
+	globals.cc \
+	icmp/Icmp.h \
 	tests/stub_libmem.cc \
-	tests/stub_SBuf.cc \
-	time.cc \
-	globals.cc
+	time.cc
 tests_testIcmp_LDADD=\
 	icmp/libicmpcore.la \
 	ip/libip.la \
@@ -2529,12 +2529,12 @@
 	tests/testNetDb.cc \
 	tests/testNetDb.h
 nodist_tests_testNetDb_SOURCES = \
+	tests/stub_SBuf.cc \
 	SquidTime.h \
 	tests/stub_debug.cc \
+	globals.cc \
 	tests/stub_libmem.cc \
-	tests/stub_SBuf.cc \
-	time.cc \
-	globals.cc
+	time.cc
 tests_testNetDb_LDADD = \
 	icmp/libicmp.la \
 	ip/libip.la \
@@ -2549,39 +2549,23 @@
 
 check_PROGRAMS += tests/testCacheManager
 tests_testCacheManager_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
-	debug.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
-	HttpRequest.cc \
-	String.cc \
+	AuthReg.h \
+	BodyPipe.cc \
+	tests/stub_CacheDigest.cc \
+	CacheDigest.h \
 	tests/testCacheManager.cc \
 	tests/testCacheManager.h \
-	tests/stub_main_cc.cc \
-	tests/stub_HttpControlMsg.cc \
-	tests/stub_ipc_Forwarder.cc \
-	tests/stub_store_stats.cc \
-	tests/stub_EventLoop.cc \
-	time.cc \
-	BodyPipe.cc \
-	cache_manager.cc \
-	cache_cf.h \
-	AuthReg.h \
-	RefreshPattern.h \
 	CachePeer.cc \
 	CachePeer.h \
-	CacheDigest.h \
-	tests/stub_CacheDigest.cc \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -2589,154 +2573,171 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	event.cc \
-	external_acl.cc \
+	tests/stub_EventLoop.cc \
 	ExternalACLEntry.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
+	FadingCounter.cc \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	hier_code.h \
-	helper.cc \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	HttpBody.h \
+	tests/stub_HttpControlMsg.cc \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	icp_v2.cc \
-	icp_v3.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
+	HttpRequest.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
 	LogTags.cc \
-	tests/stub_libsecurity.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
-	multicast.h \
-	multicast.cc \
-	mem_node.cc \
 	MemBuf.cc \
 	MemObject.cc \
-	mime.h \
-	mime.cc \
-	mime_header.h \
-	mime_header.cc \
-	neighbors.h \
-	neighbors.cc \
+	MemStore.cc \
 	Notes.cc \
 	Notes.h \
 	Parsing.cc \
-	pconn.cc \
-	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc \
-	peer_select.cc \
-	peer_sourcehash.h \
-	peer_sourcehash.cc \
-	peer_userhash.h \
-	peer_userhash.cc \
-	PeerPoolMgr.h \
 	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
 	Pipeline.cc \
 	Pipeline.h \
-	redirect.h \
-	tests/stub_redirect.cc \
-	refresh.h \
-	refresh.cc \
+	RefreshPattern.h \
 	RemovalPolicy.cc \
-	ResolvedPeers.h \
+	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
+	ResolvedPeers.h \
 	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
 	SquidMath.cc \
-	IoStats.h \
-	stat.h \
-	stat.cc \
-	StatCounters.h \
+	SquidMath.h \
 	StatCounters.cc \
+	StatCounters.h \
+	tests/stub_StatHist.cc \
 	StatHist.h \
-	StrList.h \
+	StoreFileSystem.cc \
+	StoreIOState.cc \
+	tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc \
 	StrList.cc \
-	tests/stub_libauth_acls.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
+	external_acl.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
+	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
 	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
 	tests/stub_libdiskio.cc \
-	tests/stub_StatHist.cc \
-	stmem.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	tests/stub_main_cc.cc \
+	mem_node.cc \
+	mime.cc \
+	mime.h \
+	mime_header.cc \
+	mime_header.h \
+	multicast.cc \
+	multicast.h \
+	neighbors.cc \
+	neighbors.h \
+	pconn.cc \
+	peer_digest.cc \
+	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
+	peer_select.cc \
+	peer_sourcehash.cc \
+	peer_sourcehash.h \
+	peer_userhash.cc \
+	peer_userhash.h \
+	tests/stub_redirect.cc \
+	redirect.h \
+	refresh.cc \
+	refresh.h \
 	repl_modules.h \
+	stat.cc \
+	stat.h \
+	stmem.cc \
 	store.cc \
 	store_client.cc \
-	store_digest.h \
 	tests/stub_store_digest.cc \
+	store_digest.h \
 	store_io.cc \
-	store_key_md5.h \
 	store_key_md5.cc \
-	store_log.h \
+	store_key_md5.h \
 	store_log.cc \
-	store_rebuild.h \
+	store_log.h \
 	store_rebuild.cc \
-	store_swapin.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
 	store_swapin.cc \
+	store_swapin.h \
 	store_swapmeta.cc \
 	store_swapout.cc \
-	StoreFileSystem.cc \
-	StoreIOState.cc \
-	tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc \
-	tools.h \
+	time.cc \
 	tools.cc \
-	Transients.cc \
-	tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	tests/stub_libstore.cc \
-	MemStore.cc \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	FadingCounter.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 nodist_tests_testCacheManager_SOURCES = \
 	$(BUILT_SOURCES)
 # comm.cc only requires comm/libcomm.la until fdc_table is dead.
@@ -2781,39 +2782,40 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_testCacheManager_LDFLAGS = $(LIBADD_DL)
 
 check_PROGRAMS += tests/testStatHist
 tests_testStatHist_SOURCES = \
-	tests/stub_cbdata.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
+	tests/stub_DelayId.cc \
+	tests/stub_HelperChildConfig.cc \
 	tests/stub_MemBuf.cc \
+	tests/stub_MemObject.cc \
 	tests/stub_SBufDetailedStats.cc \
 	StatHist.cc \
+	tests/testStatHist.cc \
 	StatHist.h \
+	tests/testStatHist.h \
 	String.cc \
 	tests/stub_cache_manager.cc \
+	tests/stub_cbdata.cc \
 	tests/stub_comm.cc \
 	tests/stub_debug.cc \
-	tests/stub_DelayId.cc \
-	tests/stub_HelperChildConfig.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
 	tests/stub_libmem.cc \
-	tests/stub_MemObject.cc \
-	mime.h \
 	tests/stub_mime.cc \
+	mime.h \
 	tests/stub_pconn.cc \
-	tests/stub_stmem.cc \
 	repl_modules.h \
+	tests/stub_stmem.cc \
 	tests/stub_store.cc \
 	tests/stub_store_stats.cc \
 	time.cc \
-	tools.h \
 	tests/stub_tools.cc \
-	tests/testStatHist.cc \
-	tests/testStatHist.h
+	tools.h
 nodist_tests_testStatHist_SOURCES = \
 	$(TESTSOURCES)
 tests_testStatHist_LDADD = \
@@ -2830,25 +2832,25 @@
 check_PROGRAMS += tests/testConfigParser
 tests_testConfigParser_SOURCES = \
 	ClientInfo.h \
-	tests/stub_MemBuf.cc \
-	tests/stub_time.cc \
-	tests/stub_SBufDetailedStats.cc \
-	String.cc \
 	ConfigParser.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
 	tests/testConfigParser.cc \
 	tests/testConfigParser.h \
-	cache_cf.h \
+	tests/stub_HelperChildConfig.cc \
+	tests/stub_MemBuf.cc \
+	tests/stub_SBufDetailedStats.cc \
+	String.cc \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cbdata.cc \
 	tests/stub_debug.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
 	tests/stub_libmem.cc \
-	tests/stub_HelperChildConfig.cc \
-	tools.h \
+	tests/stub_time.cc \
 	tests/stub_tools.cc \
-	wordlist.h \
-	wordlist.cc
+	tools.h \
+	wordlist.cc \
+	wordlist.h
 nodist_tests_testConfigParser_SOURCES = \
 	$(TESTSOURCES)
 tests_testConfigParser_LDADD = \
@@ -2868,26 +2870,21 @@
 
 check_PROGRAMS += tests/testEvent
 tests_testEvent_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
+	AuthReg.h \
 	BodyPipe.cc \
-	CacheDigest.h \
 	tests/stub_CacheDigest.cc \
-	cache_cf.h \
-	AuthReg.h \
-	RefreshPattern.h \
+	CacheDigest.h \
 	CachePeer.cc \
 	CachePeer.h \
-	cache_manager.cc \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -2895,171 +2892,177 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	debug.cc \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	event.cc \
-	EventLoop.h \
+	tests/testEvent.cc \
+	tests/testEvent.h \
 	EventLoop.cc \
-	external_acl.cc \
+	EventLoop.h \
 	ExternalACLEntry.cc \
 	FadingCounter.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	hier_code.h \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
+	HttpBody.h \
 	tests/stub_HttpControlMsg.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	PeerPoolMgr.h \
+	HttpRequest.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
+	LogTags.cc \
+	MasterXaction.cc \
+	MasterXaction.h \
+	MemBuf.cc \
+	MemObject.cc \
+	MemStore.cc \
+	Notes.cc \
+	Notes.h \
+	Parsing.cc \
 	PeerPoolMgr.cc \
-	RequestFlags.h \
+	PeerPoolMgr.h \
+	Pipeline.cc \
+	Pipeline.h \
+	RefreshPattern.h \
+	RemovalPolicy.cc \
 	RequestFlags.cc \
-	HttpRequest.cc \
+	RequestFlags.h \
+	ResolvedPeers.cc \
+	ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc \
+	SquidMath.cc \
+	SquidMath.h \
+	StatCounters.cc \
+	StatCounters.h \
+	StatHist.cc \
+	StatHist.h \
+	StoreFileSystem.cc \
+	StoreIOState.cc \
+	tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc \
+	StrList.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
+	external_acl.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
 	icp_v2.cc \
 	icp_v3.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	int.h \
 	int.cc \
-	internal.h \
+	int.h \
 	internal.cc \
-	LogTags.cc \
-	tests/stub_libsecurity.cc \
-	MasterXaction.cc \
-	MasterXaction.h \
+	internal.h \
+	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
+	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
+	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
 	tests/stub_libmem.cc \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	tests/stub_main_cc.cc \
 	mem_node.cc \
-	MemBuf.cc \
-	MemObject.cc \
-	mime.h \
 	mime.cc \
-	mime_header.h \
+	mime.h \
 	mime_header.cc \
-	multicast.h \
+	mime_header.h \
 	multicast.cc \
-	neighbors.h \
+	multicast.h \
 	neighbors.cc \
-	Notes.cc \
-	Notes.h \
-	Parsing.cc \
+	neighbors.h \
 	pconn.cc \
 	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
 	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
 	peer_select.cc \
-	peer_sourcehash.h \
 	peer_sourcehash.cc \
-	peer_userhash.h \
+	peer_sourcehash.h \
 	peer_userhash.cc \
-	Pipeline.cc \
-	Pipeline.h \
-	redirect.h \
+	peer_userhash.h \
 	tests/stub_redirect.cc \
-	refresh.h \
+	redirect.h \
 	refresh.cc \
-	RemovalPolicy.cc \
-	ResolvedPeers.h \
-	ResolvedPeers.cc \
-	StrList.h \
-	StrList.cc \
-	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.cc \
-	SquidMath.h \
-	IoStats.h \
-	stat.h \
+	refresh.h \
+	repl_modules.h \
 	stat.cc \
-	StatCounters.h \
-	StatCounters.cc \
-	StatHist.h \
-	StatHist.cc \
+	stat.h \
 	stmem.cc \
-	repl_modules.h \
 	store.cc \
 	store_client.cc \
-	store_digest.h \
 	tests/stub_store_digest.cc \
+	store_digest.h \
 	store_io.cc \
-	store_key_md5.h \
 	store_key_md5.cc \
-	store_log.h \
+	store_key_md5.h \
 	store_log.cc \
-	store_rebuild.h \
+	store_log.h \
 	store_rebuild.cc \
-	store_swapin.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
 	store_swapin.cc \
+	store_swapin.h \
 	store_swapmeta.cc \
 	store_swapout.cc \
-	StoreFileSystem.cc \
-	StoreIOState.cc \
-	tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc \
-	String.cc \
-	tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
-	tests/stub_libstore.cc \
 	tests/CapturingStoreEntry.h \
-	tests/testEvent.cc \
-	tests/testEvent.h \
-	tests/stub_main_cc.cc \
-	tests/stub_ipc_Forwarder.cc \
-	tests/stub_libauth_acls.cc \
-	tests/stub_libauth.cc \
-	tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc \
-	tests/stub_store_stats.cc \
 	time.cc \
-	tools.h \
 	tools.cc \
-	Transients.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	MemStore.cc \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 nodist_tests_testEvent_SOURCES = \
 	$(BUILT_SOURCES)
 tests_testEvent_LDADD = \
@@ -3101,32 +3104,28 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_testEvent_LDFLAGS = $(LIBADD_DL)
 
 check_PROGRAMS += tests/testEventLoop
 tests_testEventLoop_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
+	AuthReg.h \
 	BodyPipe.cc \
-	CacheDigest.h \
 	tests/stub_CacheDigest.cc \
-	cache_manager.cc \
-	cache_cf.h \
-	AuthReg.h \
-	RefreshPattern.h \
+	CacheDigest.h \
 	CachePeer.cc \
 	CachePeer.h \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -3134,170 +3133,176 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	debug.cc \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	EventLoop.h \
 	EventLoop.cc \
-	event.cc \
-	external_acl.cc \
+	tests/testEventLoop.cc \
+	EventLoop.h \
+	tests/testEventLoop.h \
 	ExternalACLEntry.cc \
 	FadingCounter.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	hier_code.h \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
+	HttpBody.h \
 	tests/stub_HttpControlMsg.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	PeerPoolMgr.h \
-	PeerPoolMgr.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
 	HttpRequest.cc \
-	icp_v2.cc \
-	icp_v3.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
 	LogTags.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemObject.cc \
+	MemStore.cc \
+	Notes.cc \
+	Notes.h \
+	Parsing.cc \
+	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
+	Pipeline.cc \
+	Pipeline.h \
+	RefreshPattern.h \
+	RemovalPolicy.cc \
+	RequestFlags.cc \
+	RequestFlags.h \
+	ResolvedPeers.cc \
+	ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc \
+	SquidMath.cc \
+	SquidMath.h \
+	StatCounters.cc \
+	StatCounters.h \
+	StatHist.cc \
+	StatHist.h \
+	StoreFileSystem.cc \
+	StoreIOState.cc \
+	tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc \
+	StrList.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
+	external_acl.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
+	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
+	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
+	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
 	tests/stub_libmem.cc \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	tests/stub_main_cc.cc \
 	mem_node.cc \
-	mime.h \
 	mime.cc \
-	mime_header.h \
+	mime.h \
 	mime_header.cc \
-	multicast.h \
+	mime_header.h \
 	multicast.cc \
-	neighbors.h \
+	multicast.h \
 	neighbors.cc \
-	Notes.cc \
-	Notes.h \
-	Parsing.cc \
+	neighbors.h \
 	pconn.cc \
 	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
 	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
 	peer_select.cc \
-	peer_sourcehash.h \
 	peer_sourcehash.cc \
-	peer_userhash.h \
+	peer_sourcehash.h \
 	peer_userhash.cc \
-	Pipeline.cc \
-	Pipeline.h \
-	RemovalPolicy.cc \
-	ResolvedPeers.cc \
-	ResolvedPeers.h \
-	redirect.h \
+	peer_userhash.h \
 	tests/stub_redirect.cc \
-	refresh.h \
+	redirect.h \
 	refresh.cc \
-	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
-	SquidMath.cc \
-	IoStats.h \
-	stat.h \
+	refresh.h \
+	repl_modules.h \
 	stat.cc \
-	StatCounters.h \
-	StatCounters.cc \
-	StatHist.h \
-	StatHist.cc \
+	stat.h \
 	stmem.cc \
-	repl_modules.h \
 	store.cc \
 	store_client.cc \
-	store_digest.h \
 	tests/stub_store_digest.cc \
+	store_digest.h \
 	store_io.cc \
-	store_key_md5.h \
 	store_key_md5.cc \
-	store_log.h \
+	store_key_md5.h \
 	store_log.cc \
-	store_rebuild.h \
+	store_log.h \
 	store_rebuild.cc \
-	store_swapin.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
 	store_swapin.cc \
+	store_swapin.h \
 	store_swapmeta.cc \
 	store_swapout.cc \
-	StoreFileSystem.cc \
-	StoreIOState.cc \
-	tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc \
-	String.cc \
-	StrList.h \
-	StrList.cc \
-	tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
-	tests/stub_libstore.cc \
-	tests/testEventLoop.cc \
-	tests/testEventLoop.h \
-	tests/stub_main_cc.cc \
-	tests/stub_ipc_Forwarder.cc \
-	tests/stub_libauth_acls.cc \
-	tests/stub_libauth.cc \
-	tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc \
-	tests/stub_libsecurity.cc \
-	tests/stub_store_stats.cc \
 	time.cc \
-	tools.h \
 	tools.cc \
-	Transients.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	MemStore.cc \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 nodist_tests_testEventLoop_SOURCES = \
 	$(BUILT_SOURCES)
 tests_testEventLoop_LDADD = \
@@ -3339,6 +3344,7 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_testEventLoop_LDFLAGS = $(LIBADD_DL)
diff -u -r -N squid-5.0.5/src/Makefile.in squid-5.0.6/src/Makefile.in
--- squid-5.0.5/src/Makefile.in	2021-02-08 13:40:45.000000000 +1300
+++ squid-5.0.6/src/Makefile.in	2021-05-10 22:57:53.000000000 +1200
@@ -226,8 +226,8 @@
 	$(sbin_PROGRAMS)
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libsquid_la_LIBADD =
-am_libsquid_la_OBJECTS = comm.lo CommCalls.lo DescriptorSet.lo \
-	SquidConfig.lo
+am_libsquid_la_OBJECTS = CommCalls.lo DescriptorSet.lo SquidConfig.lo \
+	comm.lo
 libsquid_la_OBJECTS = $(am_libsquid_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -249,89 +249,89 @@
 	fs/libfs.la ipc/libipc.la mgr/libmgr.la $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3) \
 	$(am__DEPENDENCIES_1)
-am__squid_SOURCES_DIST = AclRegs.cc AuthReg.cc AccessLogEntry.cc \
-	AccessLogEntry.h AsyncEngine.cc AsyncEngine.h cache_cf.h \
-	AuthReg.h RefreshPattern.h cache_cf.cc CacheDigest.h \
-	CacheDigest.cc cache_manager.cc NeighborTypeDomainList.h \
-	CachePeer.cc CachePeer.h CacheManager.h carp.h carp.cc \
-	cbdata.cc cbdata.h client_db.h client_db.cc client_side.h \
-	client_side.cc client_side_reply.cc client_side_reply.h \
-	client_side_request.cc client_side_request.h ClientInfo.h \
-	BodyPipe.cc BodyPipe.h ClientRequestContext.h clientStream.cc \
-	clientStream.h clientStreamForward.h CollapsedForwarding.cc \
-	CollapsedForwarding.h CollapsingHistory.h CommandLine.cc \
-	CommandLine.h CompletionDispatcher.cc CompletionDispatcher.h \
-	CommRead.h ConfigOption.cc ConfigParser.cc ConfigParser.h \
-	CpuAffinity.cc CpuAffinity.h CpuAffinityMap.cc \
-	CpuAffinityMap.h CpuAffinitySet.cc CpuAffinitySet.h debug.cc \
-	Debug.h defines.h BandwidthBucket.cc BandwidthBucket.h \
-	CommonPool.h CompositePoolNode.h delay_pools.cc DelayId.cc \
-	DelayId.h DelayIdComposite.h DelayBucket.cc DelayBucket.h \
-	DelayConfig.cc DelayConfig.h DelayPool.cc DelayPool.h \
-	DelayPools.h DelaySpec.cc DelaySpec.h DelayTagged.cc \
-	DelayTagged.h DelayUser.cc DelayUser.h DelayVector.cc \
-	DelayVector.h MessageBucket.cc MessageBucket.h \
+am__squid_SOURCES_DIST = AclRegs.cc AuthReg.cc BandwidthBucket.cc \
+	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
+	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
+	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
+	DelayPool.cc DelayPool.h DelayPools.h DelaySpec.cc DelaySpec.h \
+	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
+	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h fs_io.h fs_io.cc \
-	dlink.h dlink.cc dns_internal.cc Downloader.cc Downloader.h \
-	enums.h err_type.h err_detail_type.h errorpage.cc errorpage.h \
-	ETag.cc ETag.h event.cc event.h EventLoop.h EventLoop.cc \
-	external_acl.cc ExternalACL.h ExternalACLEntry.cc \
-	ExternalACLEntry.h FadingCounter.h FadingCounter.cc fatal.h \
-	fatal.cc fd.h fd.cc fde.cc fde.h FileMap.h filemap.cc \
-	fqdncache.h fqdncache.cc FwdState.cc FwdState.h Generic.h \
-	globals.h gopher.h gopher.cc HappyConnOpener.cc \
-	HappyConnOpener.h helper.cc helper.h hier_code.h \
-	HierarchyLogEntry.h htcp.cc htcp.h \
-	HttpUpgradeProtocolAccess.cc HttpUpgradeProtocolAccess.h \
-	http.cc http.h HttpHeaderFieldStat.h HttpHdrCc.h HttpHdrCc.cc \
-	HttpHdrRange.cc HttpHdrSc.cc HttpHdrSc.h HttpHdrScTarget.cc \
-	HttpHdrScTarget.h HttpHdrContRange.cc HttpHdrContRange.h \
-	HttpHeaderStat.h HttpHeader.h HttpHeader.cc HttpHeaderMask.h \
-	HttpHeaderRange.h HttpHeaderFieldInfo.h HttpHeaderTools.h \
-	HttpHeaderTools.cc HttpBody.h HttpBody.cc HttpControlMsg.cc \
-	HttpControlMsg.h HttpReply.cc HttpReply.h RequestFlags.h \
-	RequestFlags.cc HttpRequest.cc HttpRequest.h ICP.h \
-	icp_opcode.h icp_v2.cc icp_v3.cc Instance.h Instance.cc int.h \
-	int.cc internal.h internal.cc SquidIpc.h ipc.cc ipc_win32.cc \
-	ipcache.cc ipcache.h LeakFinder.cc LogTags.cc LogTags.h \
-	lookup_t.h main.cc MasterXaction.cc MasterXaction.h \
-	mem_node.cc mem_node.h MemBuf.cc MemObject.cc MemObject.h \
-	MessageSizes.h mime.h mime.cc mime_header.h mime_header.cc \
-	multicast.h multicast.cc neighbors.h neighbors.cc Notes.h \
-	Notes.cc Parsing.cc Parsing.h ProfStats.cc pconn.cc pconn.h \
-	PeerDigest.h peer_digest.cc peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc peer_select.cc peer_sourcehash.h \
-	peer_sourcehash.cc peer_userhash.h peer_userhash.cc \
-	PeerPoolMgr.h PeerPoolMgr.cc PeerSelectState.h PingData.h \
-	Pipeline.cc Pipeline.h protos.h redirect.h redirect.cc \
-	refresh.h refresh.cc RemovalPolicy.cc RemovalPolicy.h \
-	ResolvedPeers.cc ResolvedPeers.h send-announce.h \
-	send-announce.cc SBufStatsAction.h SBufStatsAction.cc \
-	sbuf/StringConvert.h SnmpRequest.h snmp_core.h snmp_core.cc \
-	snmp_agent.h snmp_agent.cc SquidMath.h SquidMath.cc \
-	SquidNew.cc IoStats.h stat.h stat.cc StatCounters.h \
-	StatCounters.cc StatHist.h StatHist.cc String.cc StrList.h \
-	StrList.cc stmem.cc stmem.h repl_modules.h store.cc Store.h \
-	StoreFileSystem.cc StoreFileSystem.h store_io.cc \
-	StoreIOBuffer.h StoreIOState.cc StoreIOState.h store_client.cc \
-	StoreClient.h store_digest.h store_digest.cc store_key_md5.h \
-	store_key_md5.cc store_log.h store_log.cc store_rebuild.h \
-	store_rebuild.cc store_swapin.h store_swapin.cc \
-	store_swapmeta.cc store_swapout.cc StoreMetaUnpacker.cc \
-	StoreMetaUnpacker.h StoreMeta.cc StoreMeta.h StoreMetaMD5.cc \
+	ClientDelayConfig.cc ClientDelayConfig.h dns_internal.cc \
+	htcp.cc htcp.h SquidIpc.h ipc.cc ipc_win32.cc LeakFinder.cc \
+	SnmpRequest.h snmp_core.h snmp_core.cc snmp_agent.h \
+	snmp_agent.cc StoreMeta.cc StoreMeta.h StoreMetaMD5.cc \
 	StoreMetaMD5.h StoreMetaSTD.cc StoreMetaSTD.h \
 	StoreMetaSTDLFS.cc StoreMetaSTDLFS.h StoreMetaObjSize.h \
 	StoreMetaURL.cc StoreMetaURL.h StoreMetaVary.cc \
-	StoreMetaVary.h StoreSearch.h StoreStats.cc StoreStats.h \
-	StoreSwapLogData.cc StoreSwapLogData.h swap_log_op.h \
-	Transients.cc Transients.h MemStore.cc MemStore.h time.cc \
-	TimeOrTag.h tools.h tools.cc tunnel.cc typedefs.h unlinkd.h \
-	unlinkd.cc urn.h urn.cc wccp.h wccp.cc wccp2.h wccp2.cc \
-	whois.h whois.cc wordlist.h wordlist.cc XactionInitiator.h \
-	XactionInitiator.cc XactionStep.h win32.cc WinSvc.cc \
-	LoadableModule.h LoadableModule.cc LoadableModules.h \
-	LoadableModules.cc
+	StoreMetaVary.h unlinkd.h unlinkd.cc win32.cc WinSvc.cc \
+	ProfStats.cc AccessLogEntry.cc AccessLogEntry.h AsyncEngine.cc \
+	AsyncEngine.h AuthReg.h BodyPipe.cc BodyPipe.h CacheDigest.cc \
+	CacheDigest.h CacheManager.h CachePeer.cc CachePeer.h \
+	ClientInfo.h ClientRequestContext.h CollapsedForwarding.cc \
+	CollapsedForwarding.h CollapsingHistory.h CommRead.h \
+	CommandLine.cc CommandLine.h CompletionDispatcher.cc \
+	CompletionDispatcher.h ConfigOption.cc ConfigParser.cc \
+	ConfigParser.h CpuAffinity.cc CpuAffinity.h CpuAffinityMap.cc \
+	CpuAffinityMap.h CpuAffinitySet.cc CpuAffinitySet.h Debug.h \
+	Downloader.cc Downloader.h ETag.cc ETag.h EventLoop.cc \
+	EventLoop.h ExternalACL.h ExternalACLEntry.cc \
+	ExternalACLEntry.h FadingCounter.cc FadingCounter.h FileMap.h \
+	FwdState.cc FwdState.h Generic.h HappyConnOpener.cc \
+	HappyConnOpener.h HierarchyLogEntry.h HttpBody.cc HttpBody.h \
+	HttpControlMsg.cc HttpControlMsg.h HttpHdrCc.cc HttpHdrCc.h \
+	HttpHdrContRange.cc HttpHdrContRange.h HttpHdrRange.cc \
+	HttpHdrSc.cc HttpHdrSc.h HttpHdrScTarget.cc HttpHdrScTarget.h \
+	HttpHeader.cc HttpHeader.h HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h HttpHeaderMask.h HttpHeaderRange.h \
+	HttpHeaderStat.h HttpHeaderTools.cc HttpHeaderTools.h \
+	HttpReply.cc HttpReply.h HttpRequest.cc HttpRequest.h \
+	HttpUpgradeProtocolAccess.cc HttpUpgradeProtocolAccess.h ICP.h \
+	Instance.cc Instance.h IoStats.h LogTags.cc LogTags.h \
+	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
+	MemObject.h MemStore.cc MemStore.h MessageSizes.h \
+	NeighborTypeDomainList.h Notes.cc Notes.h Parsing.cc Parsing.h \
+	PeerDigest.h PeerPoolMgr.cc PeerPoolMgr.h PeerSelectState.h \
+	PingData.h Pipeline.cc Pipeline.h RefreshPattern.h \
+	RemovalPolicy.cc RemovalPolicy.h RequestFlags.cc \
+	RequestFlags.h ResolvedPeers.cc ResolvedPeers.h \
+	SBufStatsAction.cc SBufStatsAction.h SquidMath.cc SquidMath.h \
+	SquidNew.cc StatCounters.cc StatCounters.h StatHist.cc \
+	StatHist.h Store.h StoreClient.h StoreFileSystem.cc \
+	StoreFileSystem.h StoreIOBuffer.h StoreIOState.cc \
+	StoreIOState.h StoreMetaUnpacker.cc StoreMetaUnpacker.h \
+	StoreSearch.h StoreStats.cc StoreStats.h StoreSwapLogData.cc \
+	StoreSwapLogData.h StrList.cc StrList.h String.cc TimeOrTag.h \
+	Transients.cc Transients.h XactionInitiator.cc \
+	XactionInitiator.h XactionStep.h cache_cf.cc cache_cf.h \
+	cache_manager.cc carp.cc carp.h cbdata.cc cbdata.h \
+	clientStream.cc clientStream.h clientStreamForward.h \
+	client_db.cc client_db.h client_side.cc client_side.h \
+	client_side_reply.cc client_side_reply.h \
+	client_side_request.cc client_side_request.h debug.cc \
+	defines.h dlink.cc dlink.h enums.h errorpage.cc errorpage.h \
+	event.cc event.h external_acl.cc fatal.cc fatal.h fd.cc fd.h \
+	fde.cc fde.h filemap.cc fqdncache.cc fqdncache.h fs_io.cc \
+	fs_io.h globals.h gopher.cc gopher.h helper.cc helper.h \
+	hier_code.h http.cc http.h icp_opcode.h icp_v2.cc icp_v3.cc \
+	int.cc int.h internal.cc internal.h ipcache.cc ipcache.h \
+	lookup_t.h main.cc mem_node.cc mem_node.h mime.cc mime.h \
+	mime_header.cc mime_header.h multicast.cc multicast.h \
+	neighbors.cc neighbors.h pconn.cc pconn.h peer_digest.cc \
+	peer_proxy_negotiate_auth.cc peer_proxy_negotiate_auth.h \
+	peer_select.cc peer_sourcehash.cc peer_sourcehash.h \
+	peer_userhash.cc peer_userhash.h protos.h redirect.cc \
+	redirect.h refresh.cc refresh.h repl_modules.h \
+	sbuf/StringConvert.h send-announce.cc send-announce.h stat.cc \
+	stat.h stmem.cc stmem.h store.cc store_client.cc \
+	store_digest.cc store_digest.h store_io.cc store_key_md5.cc \
+	store_key_md5.h store_log.cc store_log.h store_rebuild.cc \
+	store_rebuild.h store_swapin.cc store_swapin.h \
+	store_swapmeta.cc store_swapout.cc swap_log_op.h time.cc \
+	tools.cc tools.h tunnel.cc typedefs.h urn.cc urn.h wccp.cc \
+	wccp.h wccp2.cc wccp2.h whois.cc whois.h wordlist.cc \
+	wordlist.h LoadableModule.cc LoadableModule.h \
+	LoadableModules.cc LoadableModules.h
 am__objects_1 = AclRegs.$(OBJEXT) AuthReg.$(OBJEXT)
 am__objects_2 = BandwidthBucket.$(OBJEXT) delay_pools.$(OBJEXT) \
 	DelayId.$(OBJEXT) DelayBucket.$(OBJEXT) DelayConfig.$(OBJEXT) \
@@ -345,88 +345,86 @@
 @ENABLE_WIN32_IPC_FALSE@am__objects_6 = ipc.$(OBJEXT)
 @ENABLE_WIN32_IPC_TRUE@am__objects_6 = ipc_win32.$(OBJEXT)
 @ENABLE_LEAKFINDER_TRUE@am__objects_7 = LeakFinder.$(OBJEXT)
-@ENABLE_XPROF_STATS_TRUE@am__objects_8 = ProfStats.$(OBJEXT)
-am__objects_9 = snmp_core.$(OBJEXT) snmp_agent.$(OBJEXT)
-@ENABLE_SNMP_TRUE@am__objects_10 = $(am__objects_9)
-am__objects_11 = StoreMeta.$(OBJEXT) StoreMetaMD5.$(OBJEXT) \
+am__objects_8 = snmp_core.$(OBJEXT) snmp_agent.$(OBJEXT)
+@ENABLE_SNMP_TRUE@am__objects_9 = $(am__objects_8)
+am__objects_10 = StoreMeta.$(OBJEXT) StoreMetaMD5.$(OBJEXT) \
 	StoreMetaSTD.$(OBJEXT) StoreMetaSTDLFS.$(OBJEXT) \
 	StoreMetaURL.$(OBJEXT) StoreMetaVary.$(OBJEXT)
-@ENABLE_UNLINKD_TRUE@am__objects_12 = unlinkd.$(OBJEXT)
-@ENABLE_WIN32SPECIFIC_TRUE@am__objects_13 = win32.$(OBJEXT)
-@ENABLE_WIN32SPECIFIC_TRUE@am__objects_14 = WinSvc.$(OBJEXT)
+@ENABLE_UNLINKD_TRUE@am__objects_11 = unlinkd.$(OBJEXT)
+@ENABLE_WIN32SPECIFIC_TRUE@am__objects_12 = win32.$(OBJEXT)
+@ENABLE_WIN32SPECIFIC_TRUE@am__objects_13 = WinSvc.$(OBJEXT)
+@ENABLE_XPROF_STATS_TRUE@am__objects_14 = ProfStats.$(OBJEXT)
 am__objects_15 = LoadableModule.$(OBJEXT) LoadableModules.$(OBJEXT)
 @ENABLE_LOADABLE_MODULES_TRUE@am__objects_16 = $(am__objects_15)
-am_squid_OBJECTS = $(am__objects_1) AccessLogEntry.$(OBJEXT) \
-	AsyncEngine.$(OBJEXT) cache_cf.$(OBJEXT) CacheDigest.$(OBJEXT) \
-	cache_manager.$(OBJEXT) CachePeer.$(OBJEXT) carp.$(OBJEXT) \
-	cbdata.$(OBJEXT) client_db.$(OBJEXT) client_side.$(OBJEXT) \
-	client_side_reply.$(OBJEXT) client_side_request.$(OBJEXT) \
-	BodyPipe.$(OBJEXT) clientStream.$(OBJEXT) \
+am_squid_OBJECTS = $(am__objects_1) $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5) $(am__objects_6) $(am__objects_7) \
+	$(am__objects_9) $(am__objects_10) $(am__objects_11) \
+	$(am__objects_12) $(am__objects_13) $(am__objects_14) \
+	AccessLogEntry.$(OBJEXT) AsyncEngine.$(OBJEXT) \
+	BodyPipe.$(OBJEXT) CacheDigest.$(OBJEXT) CachePeer.$(OBJEXT) \
 	CollapsedForwarding.$(OBJEXT) CommandLine.$(OBJEXT) \
 	CompletionDispatcher.$(OBJEXT) ConfigOption.$(OBJEXT) \
 	ConfigParser.$(OBJEXT) CpuAffinity.$(OBJEXT) \
 	CpuAffinityMap.$(OBJEXT) CpuAffinitySet.$(OBJEXT) \
-	debug.$(OBJEXT) $(am__objects_3) fs_io.$(OBJEXT) \
-	dlink.$(OBJEXT) $(am__objects_4) Downloader.$(OBJEXT) \
-	errorpage.$(OBJEXT) ETag.$(OBJEXT) event.$(OBJEXT) \
-	EventLoop.$(OBJEXT) external_acl.$(OBJEXT) \
+	Downloader.$(OBJEXT) ETag.$(OBJEXT) EventLoop.$(OBJEXT) \
 	ExternalACLEntry.$(OBJEXT) FadingCounter.$(OBJEXT) \
-	fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
-	fqdncache.$(OBJEXT) FwdState.$(OBJEXT) gopher.$(OBJEXT) \
-	HappyConnOpener.$(OBJEXT) helper.$(OBJEXT) $(am__objects_5) \
-	HttpUpgradeProtocolAccess.$(OBJEXT) http.$(OBJEXT) \
-	HttpHdrCc.$(OBJEXT) HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
-	HttpHdrScTarget.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
-	HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
+	FwdState.$(OBJEXT) HappyConnOpener.$(OBJEXT) \
 	HttpBody.$(OBJEXT) HttpControlMsg.$(OBJEXT) \
-	HttpReply.$(OBJEXT) RequestFlags.$(OBJEXT) \
-	HttpRequest.$(OBJEXT) icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) \
-	Instance.$(OBJEXT) int.$(OBJEXT) internal.$(OBJEXT) \
-	$(am__objects_6) ipcache.$(OBJEXT) $(am__objects_7) \
-	LogTags.$(OBJEXT) main.$(OBJEXT) MasterXaction.$(OBJEXT) \
-	mem_node.$(OBJEXT) MemBuf.$(OBJEXT) MemObject.$(OBJEXT) \
+	HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
+	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
+	HttpHdrScTarget.$(OBJEXT) HttpHeader.$(OBJEXT) \
+	HttpHeaderTools.$(OBJEXT) HttpReply.$(OBJEXT) \
+	HttpRequest.$(OBJEXT) HttpUpgradeProtocolAccess.$(OBJEXT) \
+	Instance.$(OBJEXT) LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) \
+	MemBuf.$(OBJEXT) MemObject.$(OBJEXT) MemStore.$(OBJEXT) \
+	Notes.$(OBJEXT) Parsing.$(OBJEXT) PeerPoolMgr.$(OBJEXT) \
+	Pipeline.$(OBJEXT) RemovalPolicy.$(OBJEXT) \
+	RequestFlags.$(OBJEXT) ResolvedPeers.$(OBJEXT) \
+	SBufStatsAction.$(OBJEXT) SquidMath.$(OBJEXT) \
+	SquidNew.$(OBJEXT) StatCounters.$(OBJEXT) StatHist.$(OBJEXT) \
+	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
+	StoreMetaUnpacker.$(OBJEXT) StoreStats.$(OBJEXT) \
+	StoreSwapLogData.$(OBJEXT) StrList.$(OBJEXT) String.$(OBJEXT) \
+	Transients.$(OBJEXT) XactionInitiator.$(OBJEXT) \
+	cache_cf.$(OBJEXT) cache_manager.$(OBJEXT) carp.$(OBJEXT) \
+	cbdata.$(OBJEXT) clientStream.$(OBJEXT) client_db.$(OBJEXT) \
+	client_side.$(OBJEXT) client_side_reply.$(OBJEXT) \
+	client_side_request.$(OBJEXT) debug.$(OBJEXT) dlink.$(OBJEXT) \
+	errorpage.$(OBJEXT) event.$(OBJEXT) external_acl.$(OBJEXT) \
+	fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
+	fqdncache.$(OBJEXT) fs_io.$(OBJEXT) gopher.$(OBJEXT) \
+	helper.$(OBJEXT) http.$(OBJEXT) icp_v2.$(OBJEXT) \
+	icp_v3.$(OBJEXT) int.$(OBJEXT) internal.$(OBJEXT) \
+	ipcache.$(OBJEXT) main.$(OBJEXT) mem_node.$(OBJEXT) \
 	mime.$(OBJEXT) mime_header.$(OBJEXT) multicast.$(OBJEXT) \
-	neighbors.$(OBJEXT) Notes.$(OBJEXT) Parsing.$(OBJEXT) \
-	$(am__objects_8) pconn.$(OBJEXT) peer_digest.$(OBJEXT) \
+	neighbors.$(OBJEXT) pconn.$(OBJEXT) peer_digest.$(OBJEXT) \
 	peer_proxy_negotiate_auth.$(OBJEXT) peer_select.$(OBJEXT) \
 	peer_sourcehash.$(OBJEXT) peer_userhash.$(OBJEXT) \
-	PeerPoolMgr.$(OBJEXT) Pipeline.$(OBJEXT) redirect.$(OBJEXT) \
-	refresh.$(OBJEXT) RemovalPolicy.$(OBJEXT) \
-	ResolvedPeers.$(OBJEXT) send-announce.$(OBJEXT) \
-	SBufStatsAction.$(OBJEXT) $(am__objects_10) \
-	SquidMath.$(OBJEXT) SquidNew.$(OBJEXT) stat.$(OBJEXT) \
-	StatCounters.$(OBJEXT) StatHist.$(OBJEXT) String.$(OBJEXT) \
-	StrList.$(OBJEXT) stmem.$(OBJEXT) store.$(OBJEXT) \
-	StoreFileSystem.$(OBJEXT) store_io.$(OBJEXT) \
-	StoreIOState.$(OBJEXT) store_client.$(OBJEXT) \
-	store_digest.$(OBJEXT) store_key_md5.$(OBJEXT) \
-	store_log.$(OBJEXT) store_rebuild.$(OBJEXT) \
-	store_swapin.$(OBJEXT) store_swapmeta.$(OBJEXT) \
-	store_swapout.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
-	$(am__objects_11) StoreStats.$(OBJEXT) \
-	StoreSwapLogData.$(OBJEXT) Transients.$(OBJEXT) \
-	MemStore.$(OBJEXT) time.$(OBJEXT) tools.$(OBJEXT) \
-	tunnel.$(OBJEXT) $(am__objects_12) urn.$(OBJEXT) \
+	redirect.$(OBJEXT) refresh.$(OBJEXT) send-announce.$(OBJEXT) \
+	stat.$(OBJEXT) stmem.$(OBJEXT) store.$(OBJEXT) \
+	store_client.$(OBJEXT) store_digest.$(OBJEXT) \
+	store_io.$(OBJEXT) store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
+	store_rebuild.$(OBJEXT) store_swapin.$(OBJEXT) \
+	store_swapmeta.$(OBJEXT) store_swapout.$(OBJEXT) \
+	time.$(OBJEXT) tools.$(OBJEXT) tunnel.$(OBJEXT) urn.$(OBJEXT) \
 	wccp.$(OBJEXT) wccp2.$(OBJEXT) whois.$(OBJEXT) \
-	wordlist.$(OBJEXT) XactionInitiator.$(OBJEXT) \
-	$(am__objects_13) $(am__objects_14) $(am__objects_16)
-am__EXTRA_squid_SOURCES_DIST = ConfigOption.h BandwidthBucket.cc \
-	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
-	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
-	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
-	DelayPool.cc DelayPool.h DelayPools.h DelaySpec.cc DelaySpec.h \
-	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
-	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
+	wordlist.$(OBJEXT) $(am__objects_16)
+am__EXTRA_squid_SOURCES_DIST = BandwidthBucket.cc BandwidthBucket.h \
+	CommonPool.h CompositePoolNode.h delay_pools.cc DelayId.cc \
+	DelayId.h DelayIdComposite.h DelayBucket.cc DelayBucket.h \
+	DelayConfig.cc DelayConfig.h DelayPool.cc DelayPool.h \
+	DelayPools.h DelaySpec.cc DelaySpec.h DelayTagged.cc \
+	DelayTagged.h DelayUser.cc DelayUser.h DelayVector.cc \
+	DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h htcp.cc htcp.h ipc.cc \
-	ipc_win32.cc ProfStats.cc LeakFinder.cc LeakFinder.h \
+	ClientDelayConfig.cc ClientDelayConfig.h LoadableModule.cc \
+	LoadableModule.h LoadableModules.cc LoadableModules.h \
 	SnmpRequest.h snmp_core.h snmp_core.cc snmp_agent.h \
 	snmp_agent.cc unlinkd.h unlinkd.cc win32.h win32.cc WinSvc.h \
-	WinSvc.cc LoadableModule.h LoadableModule.cc LoadableModules.h \
-	LoadableModules.cc
-am__objects_17 = err_type.$(OBJEXT) err_detail_type.$(OBJEXT) \
-	globals.$(OBJEXT) hier_code.$(OBJEXT) icp_opcode.$(OBJEXT) \
-	lookup_t.$(OBJEXT) repl_modules.$(OBJEXT) \
+	WinSvc.cc ConfigOption.h LeakFinder.cc LeakFinder.h \
+	ProfStats.cc htcp.cc htcp.h ipc.cc ipc_win32.cc
+am__objects_17 = globals.$(OBJEXT) hier_code.$(OBJEXT) \
+	icp_opcode.$(OBJEXT) lookup_t.$(OBJEXT) repl_modules.$(OBJEXT) \
 	swap_log_op.$(OBJEXT)
 nodist_squid_OBJECTS = $(am__objects_17)
 squid_OBJECTS = $(am_squid_OBJECTS) $(nodist_squid_OBJECTS)
@@ -443,15 +441,15 @@
 	helper/libhelper.la http/libhttp.la dns/libdns.la \
 	base/libbase.la libsquid.la ip/libip.la fs/libfs.la \
 	DiskIO/libdiskio.la comm/libcomm.la anyp/libanyp.la \
-	security/libsecurity.la $(SSL_LIBS) ipc/libipc.la \
-	mgr/libmgr.la proxyp/libproxyp.la parser/libparser.la \
-	eui/libeui.la icmp/libicmp.la log/liblog.la \
-	format/libformat.la sbuf/libsbuf.la $(am__DEPENDENCIES_1) \
+	security/libsecurity.la $(SSL_LIBS) error/liberror.la \
+	ipc/libipc.la mgr/libmgr.la proxyp/libproxyp.la \
+	parser/libparser.la eui/libeui.la icmp/libicmp.la \
+	log/liblog.la format/libformat.la sbuf/libsbuf.la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4) \
-	$(am__DEPENDENCIES_5) mem/libmem.la store/libstore.la \
-	$(top_builddir)/lib/libmisccontainers.la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) mem/libmem.la \
+	store/libstore.la $(top_builddir)/lib/libmisccontainers.la \
 	$(top_builddir)/lib/libmiscencoding.la \
 	$(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -467,25 +465,25 @@
 @ENABLE_AUTH_TRUE@am_tests_testACLMaxUserIP_OBJECTS =  \
 @ENABLE_AUTH_TRUE@	tests/testACLMaxUserIP.$(OBJEXT)
 @ENABLE_AUTH_TRUE@nodist_tests_testACLMaxUserIP_OBJECTS =  \
-@ENABLE_AUTH_TRUE@	ConfigParser.$(OBJEXT) dlink.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	globals.$(OBJEXT) Parsing.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	ConfigParser.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	tests/stub_HelperChildConfig.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	tests/stub_HttpHeader.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	tests/stub_HttpRequest.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	tests/stub_MemBuf.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	Parsing.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	tests/stub_StatHist.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	String.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	tests/stub_access_log.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	tests/stub_cache_cf.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	tests/stub_cbdata.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	tests/stub_client_side.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	tests/stub_debug.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	tests/stub_debug.$(OBJEXT) dlink.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	tests/stub_errorpage.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	tests/stub_fatal.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	tests/stub_HelperChildConfig.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	tests/stub_HttpHeader.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	tests/stub_HttpRequest.$(OBJEXT) \
+@ENABLE_AUTH_TRUE@	tests/stub_fatal.$(OBJEXT) globals.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	tests/stub_libauth.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	tests/stub_libhttp.$(OBJEXT) \
 @ENABLE_AUTH_TRUE@	tests/stub_libmem.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	tests/stub_libsecurity.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	tests/stub_MemBuf.$(OBJEXT) \
-@ENABLE_AUTH_TRUE@	tests/stub_StatHist.$(OBJEXT)
+@ENABLE_AUTH_TRUE@	tests/stub_libsecurity.$(OBJEXT)
 tests_testACLMaxUserIP_OBJECTS = $(am_tests_testACLMaxUserIP_OBJECTS) \
 	$(nodist_tests_testACLMaxUserIP_OBJECTS)
 @ENABLE_AUTH_TRUE@tests_testACLMaxUserIP_DEPENDENCIES =  \
@@ -510,20 +508,7 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testBoilerplate_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tests_testCacheManager_SOURCES_DIST = AccessLogEntry.cc debug.cc \
-	RequestFlags.h RequestFlags.cc HttpRequest.cc String.cc \
-	tests/testCacheManager.cc tests/testCacheManager.h \
-	tests/stub_main_cc.cc tests/stub_HttpControlMsg.cc \
-	tests/stub_ipc_Forwarder.cc tests/stub_store_stats.cc \
-	tests/stub_EventLoop.cc time.cc BodyPipe.cc cache_manager.cc \
-	cache_cf.h AuthReg.h RefreshPattern.h CachePeer.cc CachePeer.h \
-	CacheDigest.h tests/stub_CacheDigest.cc carp.h \
-	tests/stub_carp.cc cbdata.cc tests/stub_client_db.cc \
-	client_side.h client_side.cc client_side_reply.cc \
-	client_side_request.cc ClientInfo.h clientStream.cc \
-	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
-	ConfigParser.cc CpuAffinityMap.cc CpuAffinityMap.h \
-	CpuAffinitySet.cc CpuAffinitySet.h BandwidthBucket.cc \
+am__tests_testCacheManager_SOURCES_DIST = BandwidthBucket.cc \
 	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -531,106 +516,119 @@
 	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
 	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h fs_io.h fs_io.cc \
-	dlink.h dlink.cc dns_internal.cc errorpage.cc \
-	tests/stub_ETag.cc event.cc external_acl.cc \
-	ExternalACLEntry.cc fatal.h tests/stub_fatal.cc fd.h fd.cc \
-	fde.cc FileMap.h filemap.cc fqdncache.h fqdncache.cc \
-	FwdState.cc FwdState.h gopher.h tests/stub_gopher.cc \
-	HappyConnOpener.cc HappyConnOpener.h hier_code.h helper.cc \
-	htcp.cc htcp.h http.cc HttpBody.h HttpBody.cc HttpHeader.h \
-	HttpHeader.cc HttpHeaderFieldInfo.h HttpHeaderTools.h \
-	HttpHeaderTools.cc HttpHeaderFieldStat.h HttpHdrCc.h \
-	HttpHdrCc.cc HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
-	HttpHdrScTarget.cc HttpReply.cc icp_v2.cc icp_v3.cc SquidIpc.h \
-	ipc.cc ipc_win32.cc ipcache.cc int.h int.cc internal.h \
-	internal.cc LogTags.cc tests/stub_libsecurity.cc \
-	MasterXaction.cc MasterXaction.h multicast.h multicast.cc \
-	mem_node.cc MemBuf.cc MemObject.cc mime.h mime.cc \
-	mime_header.h mime_header.cc neighbors.h neighbors.cc Notes.cc \
-	Notes.h Parsing.cc pconn.cc peer_digest.cc \
-	peer_proxy_negotiate_auth.h peer_proxy_negotiate_auth.cc \
-	peer_select.cc peer_sourcehash.h peer_sourcehash.cc \
-	peer_userhash.h peer_userhash.cc PeerPoolMgr.h PeerPoolMgr.cc \
-	Pipeline.cc Pipeline.h redirect.h tests/stub_redirect.cc \
-	refresh.h refresh.cc RemovalPolicy.cc ResolvedPeers.h \
-	ResolvedPeers.cc tests/stub_SBufDetailedStats.cc SnmpRequest.h \
-	snmp_core.h snmp_core.cc snmp_agent.h snmp_agent.cc \
-	SquidMath.h SquidMath.cc IoStats.h stat.h stat.cc \
-	StatCounters.h StatCounters.cc StatHist.h StrList.h StrList.cc \
-	tests/stub_libauth_acls.cc tests/stub_libauth.cc \
-	tests/stub_libdiskio.cc tests/stub_StatHist.cc stmem.cc \
-	repl_modules.h store.cc store_client.cc store_digest.h \
-	tests/stub_store_digest.cc store_io.cc store_key_md5.h \
-	store_key_md5.cc store_log.h store_log.cc store_rebuild.h \
-	store_rebuild.cc store_swapin.h store_swapin.cc \
-	store_swapmeta.cc store_swapout.cc StoreFileSystem.cc \
-	StoreIOState.cc tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc tools.h tools.cc Transients.cc \
-	tests/stub_cache_cf.cc tests/stub_HttpUpgradeProtocolAccess.cc \
-	tests/stub_tunnel.cc tests/stub_libstore.cc MemStore.cc \
-	unlinkd.h unlinkd.cc urn.h urn.cc wccp2.h tests/stub_wccp2.cc \
-	whois.h tests/stub_whois.cc FadingCounter.cc win32.cc \
-	wordlist.h wordlist.cc
-am_tests_testCacheManager_OBJECTS = AccessLogEntry.$(OBJEXT) \
-	debug.$(OBJEXT) RequestFlags.$(OBJEXT) HttpRequest.$(OBJEXT) \
-	String.$(OBJEXT) tests/testCacheManager.$(OBJEXT) \
-	tests/stub_main_cc.$(OBJEXT) \
-	tests/stub_HttpControlMsg.$(OBJEXT) \
-	tests/stub_ipc_Forwarder.$(OBJEXT) \
-	tests/stub_store_stats.$(OBJEXT) \
-	tests/stub_EventLoop.$(OBJEXT) time.$(OBJEXT) \
-	BodyPipe.$(OBJEXT) cache_manager.$(OBJEXT) CachePeer.$(OBJEXT) \
-	tests/stub_CacheDigest.$(OBJEXT) tests/stub_carp.$(OBJEXT) \
-	cbdata.$(OBJEXT) tests/stub_client_db.$(OBJEXT) \
-	client_side.$(OBJEXT) client_side_reply.$(OBJEXT) \
-	client_side_request.$(OBJEXT) clientStream.$(OBJEXT) \
+	ClientDelayConfig.cc ClientDelayConfig.h dns_internal.cc \
+	htcp.cc htcp.h SquidIpc.h ipc.cc ipc_win32.cc SnmpRequest.h \
+	snmp_core.h snmp_core.cc snmp_agent.h snmp_agent.cc unlinkd.h \
+	unlinkd.cc win32.cc AccessLogEntry.cc AuthReg.h BodyPipe.cc \
+	tests/stub_CacheDigest.cc CacheDigest.h \
+	tests/testCacheManager.cc tests/testCacheManager.h \
+	CachePeer.cc CachePeer.h ClientInfo.h \
+	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
+	ConfigParser.cc CpuAffinityMap.cc CpuAffinityMap.h \
+	CpuAffinitySet.cc CpuAffinitySet.h tests/stub_ETag.cc \
+	tests/stub_EventLoop.cc ExternalACLEntry.cc FadingCounter.cc \
+	FileMap.h FwdState.cc FwdState.h HappyConnOpener.cc \
+	HappyConnOpener.h HttpBody.cc HttpBody.h \
+	tests/stub_HttpControlMsg.cc HttpHdrCc.cc HttpHdrCc.h \
+	HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
+	HttpHdrScTarget.cc HttpHeader.cc HttpHeader.h \
+	HttpHeaderFieldInfo.h HttpHeaderFieldStat.h HttpHeaderTools.cc \
+	HttpHeaderTools.h HttpReply.cc HttpRequest.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc IoStats.h LogTags.cc \
+	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
+	MemStore.cc Notes.cc Notes.h Parsing.cc PeerPoolMgr.cc \
+	PeerPoolMgr.h Pipeline.cc Pipeline.h RefreshPattern.h \
+	RemovalPolicy.cc RequestFlags.cc RequestFlags.h \
+	ResolvedPeers.cc ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc SquidMath.cc SquidMath.h \
+	StatCounters.cc StatCounters.h tests/stub_StatHist.cc \
+	StatHist.h StoreFileSystem.cc StoreIOState.cc \
+	tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc StrList.cc StrList.h String.cc \
+	Transients.cc tests/stub_cache_cf.cc cache_cf.h \
+	cache_manager.cc tests/stub_carp.cc carp.h cbdata.cc \
+	clientStream.cc tests/stub_client_db.cc client_side.cc \
+	client_side.h client_side_reply.cc client_side_request.cc \
+	debug.cc dlink.cc dlink.h errorpage.cc event.cc \
+	external_acl.cc tests/stub_fatal.cc fatal.h fd.cc fd.h fde.cc \
+	filemap.cc fqdncache.cc fqdncache.h fs_io.cc fs_io.h \
+	tests/stub_gopher.cc gopher.h helper.cc hier_code.h http.cc \
+	icp_v2.cc icp_v3.cc int.cc int.h internal.cc internal.h \
+	tests/stub_ipc_Forwarder.cc ipcache.cc tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc tests/stub_main_cc.cc mem_node.cc \
+	mime.cc mime.h mime_header.cc mime_header.h multicast.cc \
+	multicast.h neighbors.cc neighbors.h pconn.cc peer_digest.cc \
+	peer_proxy_negotiate_auth.cc peer_proxy_negotiate_auth.h \
+	peer_select.cc peer_sourcehash.cc peer_sourcehash.h \
+	peer_userhash.cc peer_userhash.h tests/stub_redirect.cc \
+	redirect.h refresh.cc refresh.h repl_modules.h stat.cc stat.h \
+	stmem.cc store.cc store_client.cc tests/stub_store_digest.cc \
+	store_digest.h store_io.cc store_key_md5.cc store_key_md5.h \
+	store_log.cc store_log.h store_rebuild.cc store_rebuild.h \
+	tests/stub_store_stats.cc store_swapin.cc store_swapin.h \
+	store_swapmeta.cc store_swapout.cc time.cc tools.cc tools.h \
+	tests/stub_tunnel.cc urn.cc urn.h tests/stub_wccp2.cc wccp2.h \
+	tests/stub_whois.cc whois.h wordlist.cc wordlist.h
+am_tests_testCacheManager_OBJECTS = $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5) $(am__objects_6) $(am__objects_9) \
+	$(am__objects_11) $(am__objects_12) AccessLogEntry.$(OBJEXT) \
+	BodyPipe.$(OBJEXT) tests/stub_CacheDigest.$(OBJEXT) \
+	tests/testCacheManager.$(OBJEXT) CachePeer.$(OBJEXT) \
 	tests/stub_CollapsedForwarding.$(OBJEXT) \
 	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) \
 	CpuAffinityMap.$(OBJEXT) CpuAffinitySet.$(OBJEXT) \
-	$(am__objects_3) fs_io.$(OBJEXT) dlink.$(OBJEXT) \
-	$(am__objects_4) errorpage.$(OBJEXT) tests/stub_ETag.$(OBJEXT) \
-	event.$(OBJEXT) external_acl.$(OBJEXT) \
-	ExternalACLEntry.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
-	fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
-	fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
-	tests/stub_gopher.$(OBJEXT) HappyConnOpener.$(OBJEXT) \
-	helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
-	HttpBody.$(OBJEXT) HttpHeader.$(OBJEXT) \
-	HttpHeaderTools.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
-	HttpHdrContRange.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
-	HttpHdrSc.$(OBJEXT) HttpHdrScTarget.$(OBJEXT) \
-	HttpReply.$(OBJEXT) icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) \
-	$(am__objects_6) ipcache.$(OBJEXT) int.$(OBJEXT) \
-	internal.$(OBJEXT) LogTags.$(OBJEXT) \
-	tests/stub_libsecurity.$(OBJEXT) MasterXaction.$(OBJEXT) \
-	multicast.$(OBJEXT) mem_node.$(OBJEXT) MemBuf.$(OBJEXT) \
-	MemObject.$(OBJEXT) mime.$(OBJEXT) mime_header.$(OBJEXT) \
-	neighbors.$(OBJEXT) Notes.$(OBJEXT) Parsing.$(OBJEXT) \
+	tests/stub_ETag.$(OBJEXT) tests/stub_EventLoop.$(OBJEXT) \
+	ExternalACLEntry.$(OBJEXT) FadingCounter.$(OBJEXT) \
+	FwdState.$(OBJEXT) HappyConnOpener.$(OBJEXT) \
+	HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
+	HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
+	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
+	HttpHdrScTarget.$(OBJEXT) HttpHeader.$(OBJEXT) \
+	HttpHeaderTools.$(OBJEXT) HttpReply.$(OBJEXT) \
+	HttpRequest.$(OBJEXT) \
+	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
+	LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) MemBuf.$(OBJEXT) \
+	MemObject.$(OBJEXT) MemStore.$(OBJEXT) Notes.$(OBJEXT) \
+	Parsing.$(OBJEXT) PeerPoolMgr.$(OBJEXT) Pipeline.$(OBJEXT) \
+	RemovalPolicy.$(OBJEXT) RequestFlags.$(OBJEXT) \
+	ResolvedPeers.$(OBJEXT) tests/stub_SBufDetailedStats.$(OBJEXT) \
+	SquidMath.$(OBJEXT) StatCounters.$(OBJEXT) \
+	tests/stub_StatHist.$(OBJEXT) StoreFileSystem.$(OBJEXT) \
+	StoreIOState.$(OBJEXT) tests/stub_StoreMeta.$(OBJEXT) \
+	StoreMetaUnpacker.$(OBJEXT) StoreSwapLogData.$(OBJEXT) \
+	StrList.$(OBJEXT) String.$(OBJEXT) Transients.$(OBJEXT) \
+	tests/stub_cache_cf.$(OBJEXT) cache_manager.$(OBJEXT) \
+	tests/stub_carp.$(OBJEXT) cbdata.$(OBJEXT) \
+	clientStream.$(OBJEXT) tests/stub_client_db.$(OBJEXT) \
+	client_side.$(OBJEXT) client_side_reply.$(OBJEXT) \
+	client_side_request.$(OBJEXT) debug.$(OBJEXT) dlink.$(OBJEXT) \
+	errorpage.$(OBJEXT) event.$(OBJEXT) external_acl.$(OBJEXT) \
+	tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
+	filemap.$(OBJEXT) fqdncache.$(OBJEXT) fs_io.$(OBJEXT) \
+	tests/stub_gopher.$(OBJEXT) helper.$(OBJEXT) http.$(OBJEXT) \
+	icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) int.$(OBJEXT) \
+	internal.$(OBJEXT) tests/stub_ipc_Forwarder.$(OBJEXT) \
+	ipcache.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
+	tests/stub_libauth_acls.$(OBJEXT) \
+	tests/stub_libdiskio.$(OBJEXT) tests/stub_liberror.$(OBJEXT) \
+	tests/stub_libsecurity.$(OBJEXT) tests/stub_libstore.$(OBJEXT) \
+	tests/stub_main_cc.$(OBJEXT) mem_node.$(OBJEXT) mime.$(OBJEXT) \
+	mime_header.$(OBJEXT) multicast.$(OBJEXT) neighbors.$(OBJEXT) \
 	pconn.$(OBJEXT) peer_digest.$(OBJEXT) \
 	peer_proxy_negotiate_auth.$(OBJEXT) peer_select.$(OBJEXT) \
 	peer_sourcehash.$(OBJEXT) peer_userhash.$(OBJEXT) \
-	PeerPoolMgr.$(OBJEXT) Pipeline.$(OBJEXT) \
-	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) \
-	RemovalPolicy.$(OBJEXT) ResolvedPeers.$(OBJEXT) \
-	tests/stub_SBufDetailedStats.$(OBJEXT) $(am__objects_10) \
-	SquidMath.$(OBJEXT) stat.$(OBJEXT) StatCounters.$(OBJEXT) \
-	StrList.$(OBJEXT) tests/stub_libauth_acls.$(OBJEXT) \
-	tests/stub_libauth.$(OBJEXT) tests/stub_libdiskio.$(OBJEXT) \
-	tests/stub_StatHist.$(OBJEXT) stmem.$(OBJEXT) store.$(OBJEXT) \
-	store_client.$(OBJEXT) tests/stub_store_digest.$(OBJEXT) \
-	store_io.$(OBJEXT) store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
-	store_rebuild.$(OBJEXT) store_swapin.$(OBJEXT) \
-	store_swapmeta.$(OBJEXT) store_swapout.$(OBJEXT) \
-	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
-	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
-	StoreSwapLogData.$(OBJEXT) tools.$(OBJEXT) \
-	Transients.$(OBJEXT) tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
-	tests/stub_tunnel.$(OBJEXT) tests/stub_libstore.$(OBJEXT) \
-	MemStore.$(OBJEXT) $(am__objects_12) urn.$(OBJEXT) \
+	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) stat.$(OBJEXT) \
+	stmem.$(OBJEXT) store.$(OBJEXT) store_client.$(OBJEXT) \
+	tests/stub_store_digest.$(OBJEXT) store_io.$(OBJEXT) \
+	store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
+	store_rebuild.$(OBJEXT) tests/stub_store_stats.$(OBJEXT) \
+	store_swapin.$(OBJEXT) store_swapmeta.$(OBJEXT) \
+	store_swapout.$(OBJEXT) time.$(OBJEXT) tools.$(OBJEXT) \
+	tests/stub_tunnel.$(OBJEXT) urn.$(OBJEXT) \
 	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
-	FadingCounter.$(OBJEXT) $(am__objects_13) wordlist.$(OBJEXT)
+	wordlist.$(OBJEXT)
 nodist_tests_testCacheManager_OBJECTS = $(am__objects_17)
 tests_testCacheManager_OBJECTS = $(am_tests_testCacheManager_OBJECTS) \
 	$(nodist_tests_testCacheManager_OBJECTS)
@@ -650,7 +648,8 @@
 	$(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3) \
+	$(am__DEPENDENCIES_1)
 tests_testCacheManager_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testCacheManager_LDFLAGS) \
@@ -666,14 +665,14 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testCharacterSet_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_tests_testConfigParser_OBJECTS = tests/stub_MemBuf.$(OBJEXT) \
-	tests/stub_time.$(OBJEXT) \
-	tests/stub_SBufDetailedStats.$(OBJEXT) String.$(OBJEXT) \
-	ConfigParser.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
-	tests/testConfigParser.$(OBJEXT) tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_cbdata.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) \
+am_tests_testConfigParser_OBJECTS = ConfigParser.$(OBJEXT) \
+	tests/testConfigParser.$(OBJEXT) \
 	tests/stub_HelperChildConfig.$(OBJEXT) \
+	tests/stub_MemBuf.$(OBJEXT) \
+	tests/stub_SBufDetailedStats.$(OBJEXT) String.$(OBJEXT) \
+	tests/stub_cache_cf.$(OBJEXT) tests/stub_cbdata.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
+	tests/stub_libmem.$(OBJEXT) tests/stub_time.$(OBJEXT) \
 	tests/stub_tools.$(OBJEXT) wordlist.$(OBJEXT)
 nodist_tests_testConfigParser_OBJECTS = $(am__objects_18)
 tests_testConfigParser_OBJECTS = $(am_tests_testConfigParser_OBJECTS) \
@@ -687,108 +686,107 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testConfigParser_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tests_testDiskIO_SOURCES_DIST = AccessLogEntry.cc AccessLogEntry.h \
-	CacheDigest.h tests/stub_CacheDigest.cc cbdata.cc client_db.h \
-	ClientInfo.h tests/stub_CollapsedForwarding.cc ConfigOption.cc \
-	ConfigParser.cc BandwidthBucket.cc BandwidthBucket.h \
-	CommonPool.h CompositePoolNode.h delay_pools.cc DelayId.cc \
-	DelayId.h DelayIdComposite.h DelayBucket.cc DelayBucket.h \
-	DelayConfig.cc DelayConfig.h DelayPool.cc DelayPool.h \
-	DelayPools.h DelaySpec.cc DelaySpec.h DelayTagged.cc \
-	DelayTagged.h DelayUser.cc DelayUser.h DelayVector.cc \
-	DelayVector.h MessageBucket.cc MessageBucket.h \
+am__tests_testDiskIO_SOURCES_DIST = BandwidthBucket.cc \
+	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
+	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
+	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
+	DelayPool.cc DelayPool.h DelayPools.h DelaySpec.cc DelaySpec.h \
+	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
+	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h FadingCounter.cc \
-	fs_io.h fs_io.cc tests/stub_ETag.cc EventLoop.cc event.cc \
-	fatal.h tests/stub_fatal.cc fd.h fd.cc fde.h fde.cc FileMap.h \
-	filemap.cc HttpBody.h HttpBody.cc HttpHeaderFieldStat.h \
-	HttpHdrCc.h HttpHdrCc.cc HttpHdrContRange.cc HttpHdrSc.cc \
-	HttpHdrScTarget.cc HttpHdrRange.cc HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h HttpHeaderTools.cc HttpHeader.h \
-	HttpHeader.cc HttpReply.cc int.h int.cc LogTags.cc \
-	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
-	mem_node.cc Notes.h Notes.cc Parsing.cc refresh.h refresh.cc \
-	RemovalPolicy.cc RequestFlags.h RequestFlags.cc \
-	ResolvedPeers.cc ResolvedPeers.h tests/stub_libsecurity.cc \
-	StatCounters.h StatCounters.cc StatHist.h \
-	tests/stub_StatHist.cc stmem.cc \
-	tests/stub_SBufDetailedStats.cc StoreFileSystem.cc \
+	ClientDelayConfig.cc ClientDelayConfig.h unlinkd.h unlinkd.cc \
+	win32.cc AccessLogEntry.cc AccessLogEntry.h \
+	tests/stub_CacheDigest.cc CacheDigest.h ClientInfo.h \
+	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
+	ConfigParser.cc tests/testDiskIO.cc tests/testDiskIO.h \
+	tests/stub_ETag.cc EventLoop.cc FadingCounter.cc FileMap.h \
+	tests/stub_HelperChildConfig.cc HttpBody.cc HttpBody.h \
+	HttpHdrCc.cc HttpHdrCc.h HttpHdrContRange.cc HttpHdrRange.cc \
+	HttpHdrSc.cc HttpHdrScTarget.cc HttpHeader.cc HttpHeader.h \
+	HttpHeaderFieldInfo.h HttpHeaderFieldStat.h HttpHeaderTools.cc \
+	HttpHeaderTools.h HttpReply.cc tests/stub_HttpRequest.cc \
+	LogTags.cc MasterXaction.cc MasterXaction.h MemBuf.cc \
+	MemObject.cc tests/stub_MemStore.cc Notes.cc Notes.h \
+	Parsing.cc tests/stub_Port.cc RemovalPolicy.cc RequestFlags.cc \
+	RequestFlags.h ResolvedPeers.cc ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc StatCounters.cc StatCounters.h \
+	tests/stub_StatHist.cc StatHist.h StoreFileSystem.cc \
 	StoreIOState.cc tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc store_io.cc store_key_md5.h \
-	store_key_md5.cc store_swapout.cc store_swapmeta.cc \
-	repl_modules.h store.cc String.cc StrList.h StrList.cc \
-	tests/stub_libstore.cc Transients.cc log/access_log.h \
-	tests/stub_access_log.cc tests/stub_acl.cc cache_cf.h \
-	tests/stub_cache_cf.cc tests/stub_cache_manager.cc \
-	tests/stub_client_db.cc client_side_request.h \
-	tests/stub_client_side_request.cc tests/stub_debug.cc \
-	tests/stub_errorpage.cc tests/stub_helper.cc \
-	tests/stub_HelperChildConfig.cc tests/stub_HttpRequest.cc \
-	tests/stub_http.cc tests/stub_icp.cc internal.h \
-	tests/stub_internal.cc tests/stub_ipc.cc tests/stub_ipcache.cc \
-	tests/stub_libauth_acls.cc tests/stub_libauth.cc \
-	tests/stub_libeui.cc tests/stub_libformat.cc \
-	tests/stub_libicmp.cc tests/stub_liblog.cc \
-	tests/stub_MemStore.cc mime.h tests/stub_mime.cc \
-	tests/stub_neighbors.cc tests/stub_pconn.cc tests/stub_Port.cc \
-	tests/stub_stat.cc tests/stub_store_client.cc \
-	tests/stub_store_stats.cc store_rebuild.h \
-	tests/stub_store_rebuild.cc tests/stub_UdsOp.cc \
-	tests/testDiskIO.cc tests/testDiskIO.h \
 	tests/testStoreSupport.cc tests/testStoreSupport.h \
-	tests/stub_time.cc unlinkd.h unlinkd.cc tests/stub_libanyp.cc \
-	win32.cc wordlist.h wordlist.cc tools.h tests/stub_tools.cc
-am_tests_testDiskIO_OBJECTS = AccessLogEntry.$(OBJEXT) \
-	tests/stub_CacheDigest.$(OBJEXT) cbdata.$(OBJEXT) \
+	StoreSwapLogData.cc StrList.cc StrList.h String.cc \
+	Transients.cc tests/stub_UdsOp.cc tests/stub_access_log.cc \
+	tests/stub_acl.cc tests/stub_cache_cf.cc cache_cf.h \
+	tests/stub_cache_manager.cc cbdata.cc tests/stub_client_db.cc \
+	client_db.h tests/stub_client_side_request.cc \
+	client_side_request.h tests/stub_debug.cc \
+	tests/stub_errorpage.cc event.cc tests/stub_fatal.cc fatal.h \
+	fd.cc fd.h fde.cc fde.h filemap.cc fs_io.cc fs_io.h \
+	tests/stub_helper.cc tests/stub_http.cc tests/stub_icp.cc \
+	int.cc int.h tests/stub_internal.cc internal.h \
+	tests/stub_ipc.cc tests/stub_ipcache.cc tests/stub_libanyp.cc \
+	tests/stub_libauth.cc tests/stub_libauth_acls.cc \
+	tests/stub_liberror.cc tests/stub_libeui.cc \
+	tests/stub_libformat.cc tests/stub_libicmp.cc \
+	tests/stub_liblog.cc tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc log/access_log.h mem_node.cc \
+	tests/stub_mime.cc mime.h tests/stub_neighbors.cc \
+	tests/stub_pconn.cc refresh.cc refresh.h repl_modules.h \
+	tests/stub_stat.cc stmem.cc store.cc \
+	tests/stub_store_client.cc store_io.cc store_key_md5.cc \
+	store_key_md5.h tests/stub_store_rebuild.cc store_rebuild.h \
+	tests/stub_store_stats.cc store_swapmeta.cc store_swapout.cc \
+	tests/stub_time.cc tests/stub_tools.cc tools.h wordlist.cc \
+	wordlist.h
+am_tests_testDiskIO_OBJECTS = $(am__objects_3) $(am__objects_11) \
+	$(am__objects_12) AccessLogEntry.$(OBJEXT) \
+	tests/stub_CacheDigest.$(OBJEXT) \
 	tests/stub_CollapsedForwarding.$(OBJEXT) \
-	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) $(am__objects_3) \
-	FadingCounter.$(OBJEXT) fs_io.$(OBJEXT) \
-	tests/stub_ETag.$(OBJEXT) EventLoop.$(OBJEXT) event.$(OBJEXT) \
-	tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
-	filemap.$(OBJEXT) HttpBody.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
-	HttpHdrContRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
-	HttpHdrScTarget.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
-	HttpHeaderTools.$(OBJEXT) HttpHeader.$(OBJEXT) \
-	HttpReply.$(OBJEXT) int.$(OBJEXT) LogTags.$(OBJEXT) \
+	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) \
+	tests/testDiskIO.$(OBJEXT) tests/stub_ETag.$(OBJEXT) \
+	EventLoop.$(OBJEXT) FadingCounter.$(OBJEXT) \
+	tests/stub_HelperChildConfig.$(OBJEXT) HttpBody.$(OBJEXT) \
+	HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
+	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
+	HttpHdrScTarget.$(OBJEXT) HttpHeader.$(OBJEXT) \
+	HttpHeaderTools.$(OBJEXT) HttpReply.$(OBJEXT) \
+	tests/stub_HttpRequest.$(OBJEXT) LogTags.$(OBJEXT) \
 	MasterXaction.$(OBJEXT) MemBuf.$(OBJEXT) MemObject.$(OBJEXT) \
-	mem_node.$(OBJEXT) Notes.$(OBJEXT) Parsing.$(OBJEXT) \
-	refresh.$(OBJEXT) RemovalPolicy.$(OBJEXT) \
-	RequestFlags.$(OBJEXT) ResolvedPeers.$(OBJEXT) \
-	tests/stub_libsecurity.$(OBJEXT) StatCounters.$(OBJEXT) \
-	tests/stub_StatHist.$(OBJEXT) stmem.$(OBJEXT) \
-	tests/stub_SBufDetailedStats.$(OBJEXT) \
+	tests/stub_MemStore.$(OBJEXT) Notes.$(OBJEXT) \
+	Parsing.$(OBJEXT) tests/stub_Port.$(OBJEXT) \
+	RemovalPolicy.$(OBJEXT) RequestFlags.$(OBJEXT) \
+	ResolvedPeers.$(OBJEXT) tests/stub_SBufDetailedStats.$(OBJEXT) \
+	StatCounters.$(OBJEXT) tests/stub_StatHist.$(OBJEXT) \
 	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
 	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
-	StoreSwapLogData.$(OBJEXT) store_io.$(OBJEXT) \
-	store_key_md5.$(OBJEXT) store_swapout.$(OBJEXT) \
-	store_swapmeta.$(OBJEXT) store.$(OBJEXT) String.$(OBJEXT) \
-	StrList.$(OBJEXT) tests/stub_libstore.$(OBJEXT) \
-	Transients.$(OBJEXT) tests/stub_access_log.$(OBJEXT) \
+	tests/testStoreSupport.$(OBJEXT) StoreSwapLogData.$(OBJEXT) \
+	StrList.$(OBJEXT) String.$(OBJEXT) Transients.$(OBJEXT) \
+	tests/stub_UdsOp.$(OBJEXT) tests/stub_access_log.$(OBJEXT) \
 	tests/stub_acl.$(OBJEXT) tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_cache_manager.$(OBJEXT) \
+	tests/stub_cache_manager.$(OBJEXT) cbdata.$(OBJEXT) \
 	tests/stub_client_db.$(OBJEXT) \
 	tests/stub_client_side_request.$(OBJEXT) \
 	tests/stub_debug.$(OBJEXT) tests/stub_errorpage.$(OBJEXT) \
-	tests/stub_helper.$(OBJEXT) \
-	tests/stub_HelperChildConfig.$(OBJEXT) \
-	tests/stub_HttpRequest.$(OBJEXT) tests/stub_http.$(OBJEXT) \
-	tests/stub_icp.$(OBJEXT) tests/stub_internal.$(OBJEXT) \
-	tests/stub_ipc.$(OBJEXT) tests/stub_ipcache.$(OBJEXT) \
-	tests/stub_libauth_acls.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
-	tests/stub_libeui.$(OBJEXT) tests/stub_libformat.$(OBJEXT) \
-	tests/stub_libicmp.$(OBJEXT) tests/stub_liblog.$(OBJEXT) \
-	tests/stub_MemStore.$(OBJEXT) tests/stub_mime.$(OBJEXT) \
-	tests/stub_neighbors.$(OBJEXT) tests/stub_pconn.$(OBJEXT) \
-	tests/stub_Port.$(OBJEXT) tests/stub_stat.$(OBJEXT) \
-	tests/stub_store_client.$(OBJEXT) \
-	tests/stub_store_stats.$(OBJEXT) \
-	tests/stub_store_rebuild.$(OBJEXT) tests/stub_UdsOp.$(OBJEXT) \
-	tests/testDiskIO.$(OBJEXT) tests/testStoreSupport.$(OBJEXT) \
-	tests/stub_time.$(OBJEXT) $(am__objects_12) \
-	tests/stub_libanyp.$(OBJEXT) $(am__objects_13) \
-	wordlist.$(OBJEXT) tests/stub_tools.$(OBJEXT)
+	event.$(OBJEXT) tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) \
+	fde.$(OBJEXT) filemap.$(OBJEXT) fs_io.$(OBJEXT) \
+	tests/stub_helper.$(OBJEXT) tests/stub_http.$(OBJEXT) \
+	tests/stub_icp.$(OBJEXT) int.$(OBJEXT) \
+	tests/stub_internal.$(OBJEXT) tests/stub_ipc.$(OBJEXT) \
+	tests/stub_ipcache.$(OBJEXT) tests/stub_libanyp.$(OBJEXT) \
+	tests/stub_libauth.$(OBJEXT) tests/stub_libauth_acls.$(OBJEXT) \
+	tests/stub_liberror.$(OBJEXT) tests/stub_libeui.$(OBJEXT) \
+	tests/stub_libformat.$(OBJEXT) tests/stub_libicmp.$(OBJEXT) \
+	tests/stub_liblog.$(OBJEXT) tests/stub_libsecurity.$(OBJEXT) \
+	tests/stub_libstore.$(OBJEXT) mem_node.$(OBJEXT) \
+	tests/stub_mime.$(OBJEXT) tests/stub_neighbors.$(OBJEXT) \
+	tests/stub_pconn.$(OBJEXT) refresh.$(OBJEXT) \
+	tests/stub_stat.$(OBJEXT) stmem.$(OBJEXT) store.$(OBJEXT) \
+	tests/stub_store_client.$(OBJEXT) store_io.$(OBJEXT) \
+	store_key_md5.$(OBJEXT) tests/stub_store_rebuild.$(OBJEXT) \
+	tests/stub_store_stats.$(OBJEXT) store_swapmeta.$(OBJEXT) \
+	store_swapout.$(OBJEXT) tests/stub_time.$(OBJEXT) \
+	tests/stub_tools.$(OBJEXT) wordlist.$(OBJEXT)
 nodist_tests_testDiskIO_OBJECTS = $(am__objects_18) \
-	hier_code.$(OBJEXT) SquidMath.$(OBJEXT) swap_log_op.$(OBJEXT)
+	SquidMath.$(OBJEXT) hier_code.$(OBJEXT) swap_log_op.$(OBJEXT)
 tests_testDiskIO_OBJECTS = $(am_tests_testDiskIO_OBJECTS) \
 	$(nodist_tests_testDiskIO_OBJECTS)
 tests_testDiskIO_DEPENDENCIES = libsquid.la http/libhttp.la \
@@ -829,15 +827,7 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testEnumIterator_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tests_testEvent_SOURCES_DIST = AccessLogEntry.cc BodyPipe.cc \
-	CacheDigest.h tests/stub_CacheDigest.cc cache_cf.h AuthReg.h \
-	RefreshPattern.h CachePeer.cc CachePeer.h cache_manager.cc \
-	carp.h tests/stub_carp.cc cbdata.cc tests/stub_client_db.cc \
-	client_side.h client_side.cc client_side_reply.cc \
-	client_side_request.cc ClientInfo.h clientStream.cc \
-	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
-	ConfigParser.cc CpuAffinityMap.cc CpuAffinityMap.h \
-	CpuAffinitySet.cc CpuAffinitySet.h debug.cc BandwidthBucket.cc \
+am__tests_testEvent_SOURCES_DIST = BandwidthBucket.cc \
 	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -845,113 +835,118 @@
 	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
 	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h fs_io.h fs_io.cc \
-	dlink.h dlink.cc dns_internal.cc errorpage.cc \
-	tests/stub_ETag.cc event.cc EventLoop.h EventLoop.cc \
-	external_acl.cc ExternalACLEntry.cc FadingCounter.cc fatal.h \
-	tests/stub_fatal.cc fd.h fd.cc fde.cc FileMap.h filemap.cc \
-	fqdncache.h fqdncache.cc FwdState.cc FwdState.h gopher.h \
-	tests/stub_gopher.cc HappyConnOpener.cc HappyConnOpener.h \
-	helper.cc hier_code.h htcp.cc htcp.h http.cc HttpBody.h \
-	HttpBody.cc tests/stub_HttpControlMsg.cc HttpHeader.h \
-	HttpHeader.cc HttpHeaderFieldInfo.h HttpHeaderTools.h \
-	HttpHeaderTools.cc HttpHeaderFieldStat.h HttpHdrCc.h \
-	HttpHdrCc.cc HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
-	HttpHdrScTarget.cc HttpReply.cc PeerPoolMgr.h PeerPoolMgr.cc \
-	RequestFlags.h RequestFlags.cc HttpRequest.cc icp_v2.cc \
-	icp_v3.cc SquidIpc.h ipc.cc ipc_win32.cc ipcache.cc int.h \
-	int.cc internal.h internal.cc LogTags.cc \
-	tests/stub_libsecurity.cc MasterXaction.cc MasterXaction.h \
-	tests/stub_libmem.cc mem_node.cc MemBuf.cc MemObject.cc mime.h \
-	mime.cc mime_header.h mime_header.cc multicast.h multicast.cc \
-	neighbors.h neighbors.cc Notes.cc Notes.h Parsing.cc pconn.cc \
-	peer_digest.cc peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc peer_select.cc peer_sourcehash.h \
-	peer_sourcehash.cc peer_userhash.h peer_userhash.cc \
-	Pipeline.cc Pipeline.h redirect.h tests/stub_redirect.cc \
-	refresh.h refresh.cc RemovalPolicy.cc ResolvedPeers.h \
-	ResolvedPeers.cc StrList.h StrList.cc \
-	tests/stub_SBufDetailedStats.cc SnmpRequest.h snmp_core.h \
-	snmp_core.cc snmp_agent.h snmp_agent.cc SquidMath.cc \
-	SquidMath.h IoStats.h stat.h stat.cc StatCounters.h \
-	StatCounters.cc StatHist.h StatHist.cc stmem.cc repl_modules.h \
-	store.cc store_client.cc store_digest.h \
-	tests/stub_store_digest.cc store_io.cc store_key_md5.h \
-	store_key_md5.cc store_log.h store_log.cc store_rebuild.h \
-	store_rebuild.cc store_swapin.h store_swapin.cc \
-	store_swapmeta.cc store_swapout.cc StoreFileSystem.cc \
-	StoreIOState.cc tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc String.cc tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc tests/stub_libstore.cc \
-	tests/CapturingStoreEntry.h tests/testEvent.cc \
-	tests/testEvent.h tests/stub_main_cc.cc \
-	tests/stub_ipc_Forwarder.cc tests/stub_libauth_acls.cc \
-	tests/stub_libauth.cc tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc tests/stub_store_stats.cc time.cc tools.h \
-	tools.cc Transients.cc tests/stub_tunnel.cc MemStore.cc \
-	unlinkd.h unlinkd.cc urn.h urn.cc wccp2.h tests/stub_wccp2.cc \
-	whois.h tests/stub_whois.cc win32.cc wordlist.h wordlist.cc
-am_tests_testEvent_OBJECTS = AccessLogEntry.$(OBJEXT) \
+	ClientDelayConfig.cc ClientDelayConfig.h dns_internal.cc \
+	htcp.cc htcp.h SquidIpc.h ipc.cc ipc_win32.cc SnmpRequest.h \
+	snmp_core.h snmp_core.cc snmp_agent.h snmp_agent.cc unlinkd.h \
+	unlinkd.cc win32.cc AccessLogEntry.cc AuthReg.h BodyPipe.cc \
+	tests/stub_CacheDigest.cc CacheDigest.h CachePeer.cc \
+	CachePeer.h ClientInfo.h tests/stub_CollapsedForwarding.cc \
+	ConfigOption.cc ConfigParser.cc CpuAffinityMap.cc \
+	CpuAffinityMap.h CpuAffinitySet.cc CpuAffinitySet.h \
+	tests/stub_ETag.cc tests/testEvent.cc tests/testEvent.h \
+	EventLoop.cc EventLoop.h ExternalACLEntry.cc FadingCounter.cc \
+	FileMap.h FwdState.cc FwdState.h HappyConnOpener.cc \
+	HappyConnOpener.h HttpBody.cc HttpBody.h \
+	tests/stub_HttpControlMsg.cc HttpHdrCc.cc HttpHdrCc.h \
+	HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
+	HttpHdrScTarget.cc HttpHeader.cc HttpHeader.h \
+	HttpHeaderFieldInfo.h HttpHeaderFieldStat.h HttpHeaderTools.cc \
+	HttpHeaderTools.h HttpReply.cc HttpRequest.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc IoStats.h LogTags.cc \
+	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
+	MemStore.cc Notes.cc Notes.h Parsing.cc PeerPoolMgr.cc \
+	PeerPoolMgr.h Pipeline.cc Pipeline.h RefreshPattern.h \
+	RemovalPolicy.cc RequestFlags.cc RequestFlags.h \
+	ResolvedPeers.cc ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc SquidMath.cc SquidMath.h \
+	StatCounters.cc StatCounters.h StatHist.cc StatHist.h \
+	StoreFileSystem.cc StoreIOState.cc tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc StoreSwapLogData.cc StrList.cc StrList.h \
+	String.cc Transients.cc tests/stub_cache_cf.cc cache_cf.h \
+	cache_manager.cc tests/stub_carp.cc carp.h cbdata.cc \
+	clientStream.cc tests/stub_client_db.cc client_side.cc \
+	client_side.h client_side_reply.cc client_side_request.cc \
+	debug.cc dlink.cc dlink.h errorpage.cc event.cc \
+	external_acl.cc tests/stub_fatal.cc fatal.h fd.cc fd.h fde.cc \
+	filemap.cc fqdncache.cc fqdncache.h fs_io.cc fs_io.h \
+	tests/stub_gopher.cc gopher.h helper.cc hier_code.h http.cc \
+	icp_v2.cc icp_v3.cc int.cc int.h internal.cc internal.h \
+	tests/stub_ipc_Forwarder.cc ipcache.cc tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc tests/stub_libeui.cc \
+	tests/stub_libmem.cc tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc tests/stub_main_cc.cc mem_node.cc \
+	mime.cc mime.h mime_header.cc mime_header.h multicast.cc \
+	multicast.h neighbors.cc neighbors.h pconn.cc peer_digest.cc \
+	peer_proxy_negotiate_auth.cc peer_proxy_negotiate_auth.h \
+	peer_select.cc peer_sourcehash.cc peer_sourcehash.h \
+	peer_userhash.cc peer_userhash.h tests/stub_redirect.cc \
+	redirect.h refresh.cc refresh.h repl_modules.h stat.cc stat.h \
+	stmem.cc store.cc store_client.cc tests/stub_store_digest.cc \
+	store_digest.h store_io.cc store_key_md5.cc store_key_md5.h \
+	store_log.cc store_log.h store_rebuild.cc store_rebuild.h \
+	tests/stub_store_stats.cc store_swapin.cc store_swapin.h \
+	store_swapmeta.cc store_swapout.cc tests/CapturingStoreEntry.h \
+	time.cc tools.cc tools.h tests/stub_tunnel.cc urn.cc urn.h \
+	tests/stub_wccp2.cc wccp2.h tests/stub_whois.cc whois.h \
+	wordlist.cc wordlist.h
+am_tests_testEvent_OBJECTS = $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5) $(am__objects_6) $(am__objects_9) \
+	$(am__objects_11) $(am__objects_12) AccessLogEntry.$(OBJEXT) \
 	BodyPipe.$(OBJEXT) tests/stub_CacheDigest.$(OBJEXT) \
-	CachePeer.$(OBJEXT) cache_manager.$(OBJEXT) \
-	tests/stub_carp.$(OBJEXT) cbdata.$(OBJEXT) \
-	tests/stub_client_db.$(OBJEXT) client_side.$(OBJEXT) \
-	client_side_reply.$(OBJEXT) client_side_request.$(OBJEXT) \
-	clientStream.$(OBJEXT) \
-	tests/stub_CollapsedForwarding.$(OBJEXT) \
+	CachePeer.$(OBJEXT) tests/stub_CollapsedForwarding.$(OBJEXT) \
 	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) \
 	CpuAffinityMap.$(OBJEXT) CpuAffinitySet.$(OBJEXT) \
-	debug.$(OBJEXT) $(am__objects_3) fs_io.$(OBJEXT) \
-	dlink.$(OBJEXT) $(am__objects_4) errorpage.$(OBJEXT) \
-	tests/stub_ETag.$(OBJEXT) event.$(OBJEXT) EventLoop.$(OBJEXT) \
-	external_acl.$(OBJEXT) ExternalACLEntry.$(OBJEXT) \
-	FadingCounter.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
-	fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
-	fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
-	tests/stub_gopher.$(OBJEXT) HappyConnOpener.$(OBJEXT) \
-	helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
-	HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
+	tests/stub_ETag.$(OBJEXT) tests/testEvent.$(OBJEXT) \
+	EventLoop.$(OBJEXT) ExternalACLEntry.$(OBJEXT) \
+	FadingCounter.$(OBJEXT) FwdState.$(OBJEXT) \
+	HappyConnOpener.$(OBJEXT) HttpBody.$(OBJEXT) \
+	tests/stub_HttpControlMsg.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
+	HttpHdrContRange.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
+	HttpHdrSc.$(OBJEXT) HttpHdrScTarget.$(OBJEXT) \
 	HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
-	HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
-	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
-	HttpHdrScTarget.$(OBJEXT) HttpReply.$(OBJEXT) \
-	PeerPoolMgr.$(OBJEXT) RequestFlags.$(OBJEXT) \
-	HttpRequest.$(OBJEXT) icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) \
-	$(am__objects_6) ipcache.$(OBJEXT) int.$(OBJEXT) \
-	internal.$(OBJEXT) LogTags.$(OBJEXT) \
-	tests/stub_libsecurity.$(OBJEXT) MasterXaction.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) mem_node.$(OBJEXT) \
-	MemBuf.$(OBJEXT) MemObject.$(OBJEXT) mime.$(OBJEXT) \
+	HttpReply.$(OBJEXT) HttpRequest.$(OBJEXT) \
+	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
+	LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) MemBuf.$(OBJEXT) \
+	MemObject.$(OBJEXT) MemStore.$(OBJEXT) Notes.$(OBJEXT) \
+	Parsing.$(OBJEXT) PeerPoolMgr.$(OBJEXT) Pipeline.$(OBJEXT) \
+	RemovalPolicy.$(OBJEXT) RequestFlags.$(OBJEXT) \
+	ResolvedPeers.$(OBJEXT) tests/stub_SBufDetailedStats.$(OBJEXT) \
+	SquidMath.$(OBJEXT) StatCounters.$(OBJEXT) StatHist.$(OBJEXT) \
+	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
+	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
+	StoreSwapLogData.$(OBJEXT) StrList.$(OBJEXT) String.$(OBJEXT) \
+	Transients.$(OBJEXT) tests/stub_cache_cf.$(OBJEXT) \
+	cache_manager.$(OBJEXT) tests/stub_carp.$(OBJEXT) \
+	cbdata.$(OBJEXT) clientStream.$(OBJEXT) \
+	tests/stub_client_db.$(OBJEXT) client_side.$(OBJEXT) \
+	client_side_reply.$(OBJEXT) client_side_request.$(OBJEXT) \
+	debug.$(OBJEXT) dlink.$(OBJEXT) errorpage.$(OBJEXT) \
+	event.$(OBJEXT) external_acl.$(OBJEXT) \
+	tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
+	filemap.$(OBJEXT) fqdncache.$(OBJEXT) fs_io.$(OBJEXT) \
+	tests/stub_gopher.$(OBJEXT) helper.$(OBJEXT) http.$(OBJEXT) \
+	icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) int.$(OBJEXT) \
+	internal.$(OBJEXT) tests/stub_ipc_Forwarder.$(OBJEXT) \
+	ipcache.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
+	tests/stub_libauth_acls.$(OBJEXT) \
+	tests/stub_libdiskio.$(OBJEXT) tests/stub_liberror.$(OBJEXT) \
+	tests/stub_libeui.$(OBJEXT) tests/stub_libmem.$(OBJEXT) \
+	tests/stub_libsecurity.$(OBJEXT) tests/stub_libstore.$(OBJEXT) \
+	tests/stub_main_cc.$(OBJEXT) mem_node.$(OBJEXT) mime.$(OBJEXT) \
 	mime_header.$(OBJEXT) multicast.$(OBJEXT) neighbors.$(OBJEXT) \
-	Notes.$(OBJEXT) Parsing.$(OBJEXT) pconn.$(OBJEXT) \
-	peer_digest.$(OBJEXT) peer_proxy_negotiate_auth.$(OBJEXT) \
-	peer_select.$(OBJEXT) peer_sourcehash.$(OBJEXT) \
-	peer_userhash.$(OBJEXT) Pipeline.$(OBJEXT) \
-	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) \
-	RemovalPolicy.$(OBJEXT) ResolvedPeers.$(OBJEXT) \
-	StrList.$(OBJEXT) tests/stub_SBufDetailedStats.$(OBJEXT) \
-	$(am__objects_10) SquidMath.$(OBJEXT) stat.$(OBJEXT) \
-	StatCounters.$(OBJEXT) StatHist.$(OBJEXT) stmem.$(OBJEXT) \
-	store.$(OBJEXT) store_client.$(OBJEXT) \
+	pconn.$(OBJEXT) peer_digest.$(OBJEXT) \
+	peer_proxy_negotiate_auth.$(OBJEXT) peer_select.$(OBJEXT) \
+	peer_sourcehash.$(OBJEXT) peer_userhash.$(OBJEXT) \
+	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) stat.$(OBJEXT) \
+	stmem.$(OBJEXT) store.$(OBJEXT) store_client.$(OBJEXT) \
 	tests/stub_store_digest.$(OBJEXT) store_io.$(OBJEXT) \
 	store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
-	store_rebuild.$(OBJEXT) store_swapin.$(OBJEXT) \
-	store_swapmeta.$(OBJEXT) store_swapout.$(OBJEXT) \
-	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
-	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
-	StoreSwapLogData.$(OBJEXT) String.$(OBJEXT) \
-	tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
-	tests/stub_libstore.$(OBJEXT) tests/testEvent.$(OBJEXT) \
-	tests/stub_main_cc.$(OBJEXT) \
-	tests/stub_ipc_Forwarder.$(OBJEXT) \
-	tests/stub_libauth_acls.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
-	tests/stub_libdiskio.$(OBJEXT) tests/stub_libeui.$(OBJEXT) \
-	tests/stub_store_stats.$(OBJEXT) time.$(OBJEXT) \
-	tools.$(OBJEXT) Transients.$(OBJEXT) \
-	tests/stub_tunnel.$(OBJEXT) MemStore.$(OBJEXT) \
-	$(am__objects_12) urn.$(OBJEXT) tests/stub_wccp2.$(OBJEXT) \
-	tests/stub_whois.$(OBJEXT) $(am__objects_13) \
+	store_rebuild.$(OBJEXT) tests/stub_store_stats.$(OBJEXT) \
+	store_swapin.$(OBJEXT) store_swapmeta.$(OBJEXT) \
+	store_swapout.$(OBJEXT) time.$(OBJEXT) tools.$(OBJEXT) \
+	tests/stub_tunnel.$(OBJEXT) urn.$(OBJEXT) \
+	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
 	wordlist.$(OBJEXT)
 nodist_tests_testEvent_OBJECTS = $(am__objects_17)
 tests_testEvent_OBJECTS = $(am_tests_testEvent_OBJECTS) \
@@ -970,21 +965,13 @@
 	store/libstore.la sbuf/libsbuf.la $(am__DEPENDENCIES_5) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
 tests_testEvent_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testEvent_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tests_testEventLoop_SOURCES_DIST = AccessLogEntry.cc BodyPipe.cc \
-	CacheDigest.h tests/stub_CacheDigest.cc cache_manager.cc \
-	cache_cf.h AuthReg.h RefreshPattern.h CachePeer.cc CachePeer.h \
-	carp.h tests/stub_carp.cc cbdata.cc tests/stub_client_db.cc \
-	client_side.h client_side.cc client_side_reply.cc \
-	client_side_request.cc ClientInfo.h clientStream.cc \
-	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
-	ConfigParser.cc CpuAffinityMap.cc CpuAffinityMap.h \
-	CpuAffinitySet.cc CpuAffinitySet.h debug.cc BandwidthBucket.cc \
+am__tests_testEventLoop_SOURCES_DIST = BandwidthBucket.cc \
 	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -992,112 +979,117 @@
 	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
 	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h fs_io.h fs_io.cc \
-	dlink.h dlink.cc dns_internal.cc errorpage.cc \
-	tests/stub_ETag.cc EventLoop.h EventLoop.cc event.cc \
-	external_acl.cc ExternalACLEntry.cc FadingCounter.cc fatal.h \
-	tests/stub_fatal.cc fd.h fd.cc fde.cc FileMap.h filemap.cc \
-	fqdncache.h fqdncache.cc FwdState.cc FwdState.h gopher.h \
-	tests/stub_gopher.cc HappyConnOpener.cc HappyConnOpener.h \
-	helper.cc hier_code.h htcp.cc htcp.h http.cc HttpBody.h \
-	HttpBody.cc tests/stub_HttpControlMsg.cc HttpHeader.h \
-	HttpHeader.cc HttpHeaderFieldInfo.h HttpHeaderTools.h \
-	HttpHeaderTools.cc HttpHeaderFieldStat.h HttpHdrCc.h \
-	HttpHdrCc.cc HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
-	HttpHdrScTarget.cc HttpReply.cc PeerPoolMgr.h PeerPoolMgr.cc \
-	RequestFlags.h RequestFlags.cc HttpRequest.cc icp_v2.cc \
-	icp_v3.cc SquidIpc.h ipc.cc ipc_win32.cc ipcache.cc int.h \
-	int.cc internal.h internal.cc LogTags.cc MasterXaction.cc \
-	MasterXaction.h MemBuf.cc MemObject.cc tests/stub_libmem.cc \
-	mem_node.cc mime.h mime.cc mime_header.h mime_header.cc \
-	multicast.h multicast.cc neighbors.h neighbors.cc Notes.cc \
-	Notes.h Parsing.cc pconn.cc peer_digest.cc \
-	peer_proxy_negotiate_auth.h peer_proxy_negotiate_auth.cc \
-	peer_select.cc peer_sourcehash.h peer_sourcehash.cc \
-	peer_userhash.h peer_userhash.cc Pipeline.cc Pipeline.h \
-	RemovalPolicy.cc ResolvedPeers.cc ResolvedPeers.h redirect.h \
-	tests/stub_redirect.cc refresh.h refresh.cc \
-	tests/stub_SBufDetailedStats.cc SnmpRequest.h snmp_core.h \
-	snmp_core.cc snmp_agent.h snmp_agent.cc SquidMath.h \
-	SquidMath.cc IoStats.h stat.h stat.cc StatCounters.h \
-	StatCounters.cc StatHist.h StatHist.cc stmem.cc repl_modules.h \
-	store.cc store_client.cc store_digest.h \
-	tests/stub_store_digest.cc store_io.cc store_key_md5.h \
-	store_key_md5.cc store_log.h store_log.cc store_rebuild.h \
-	store_rebuild.cc store_swapin.h store_swapin.cc \
-	store_swapmeta.cc store_swapout.cc StoreFileSystem.cc \
-	StoreIOState.cc tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc String.cc StrList.h StrList.cc \
-	tests/stub_cache_cf.cc tests/stub_HttpUpgradeProtocolAccess.cc \
-	tests/stub_libstore.cc tests/testEventLoop.cc \
-	tests/testEventLoop.h tests/stub_main_cc.cc \
-	tests/stub_ipc_Forwarder.cc tests/stub_libauth_acls.cc \
-	tests/stub_libauth.cc tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc tests/stub_libsecurity.cc \
-	tests/stub_store_stats.cc time.cc tools.h tools.cc \
-	Transients.cc tests/stub_tunnel.cc MemStore.cc unlinkd.h \
-	unlinkd.cc urn.h urn.cc wccp2.h tests/stub_wccp2.cc whois.h \
-	tests/stub_whois.cc win32.cc wordlist.h wordlist.cc
-am_tests_testEventLoop_OBJECTS = AccessLogEntry.$(OBJEXT) \
+	ClientDelayConfig.cc ClientDelayConfig.h dns_internal.cc \
+	htcp.cc htcp.h SquidIpc.h ipc.cc ipc_win32.cc SnmpRequest.h \
+	snmp_core.h snmp_core.cc snmp_agent.h snmp_agent.cc unlinkd.h \
+	unlinkd.cc win32.cc AccessLogEntry.cc AuthReg.h BodyPipe.cc \
+	tests/stub_CacheDigest.cc CacheDigest.h CachePeer.cc \
+	CachePeer.h ClientInfo.h tests/stub_CollapsedForwarding.cc \
+	ConfigOption.cc ConfigParser.cc CpuAffinityMap.cc \
+	CpuAffinityMap.h CpuAffinitySet.cc CpuAffinitySet.h \
+	tests/stub_ETag.cc EventLoop.cc tests/testEventLoop.cc \
+	EventLoop.h tests/testEventLoop.h ExternalACLEntry.cc \
+	FadingCounter.cc FileMap.h FwdState.cc FwdState.h \
+	HappyConnOpener.cc HappyConnOpener.h HttpBody.cc HttpBody.h \
+	tests/stub_HttpControlMsg.cc HttpHdrCc.cc HttpHdrCc.h \
+	HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
+	HttpHdrScTarget.cc HttpHeader.cc HttpHeader.h \
+	HttpHeaderFieldInfo.h HttpHeaderFieldStat.h HttpHeaderTools.cc \
+	HttpHeaderTools.h HttpReply.cc HttpRequest.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc IoStats.h LogTags.cc \
+	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
+	MemStore.cc Notes.cc Notes.h Parsing.cc PeerPoolMgr.cc \
+	PeerPoolMgr.h Pipeline.cc Pipeline.h RefreshPattern.h \
+	RemovalPolicy.cc RequestFlags.cc RequestFlags.h \
+	ResolvedPeers.cc ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc SquidMath.cc SquidMath.h \
+	StatCounters.cc StatCounters.h StatHist.cc StatHist.h \
+	StoreFileSystem.cc StoreIOState.cc tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc StoreSwapLogData.cc StrList.cc StrList.h \
+	String.cc Transients.cc tests/stub_cache_cf.cc cache_cf.h \
+	cache_manager.cc tests/stub_carp.cc carp.h cbdata.cc \
+	clientStream.cc tests/stub_client_db.cc client_side.cc \
+	client_side.h client_side_reply.cc client_side_request.cc \
+	debug.cc dlink.cc dlink.h errorpage.cc event.cc \
+	external_acl.cc tests/stub_fatal.cc fatal.h fd.cc fd.h fde.cc \
+	filemap.cc fqdncache.cc fqdncache.h fs_io.cc fs_io.h \
+	tests/stub_gopher.cc gopher.h helper.cc hier_code.h http.cc \
+	icp_v2.cc icp_v3.cc int.cc int.h internal.cc internal.h \
+	tests/stub_ipc_Forwarder.cc ipcache.cc tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc tests/stub_libeui.cc \
+	tests/stub_libmem.cc tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc tests/stub_main_cc.cc mem_node.cc \
+	mime.cc mime.h mime_header.cc mime_header.h multicast.cc \
+	multicast.h neighbors.cc neighbors.h pconn.cc peer_digest.cc \
+	peer_proxy_negotiate_auth.cc peer_proxy_negotiate_auth.h \
+	peer_select.cc peer_sourcehash.cc peer_sourcehash.h \
+	peer_userhash.cc peer_userhash.h tests/stub_redirect.cc \
+	redirect.h refresh.cc refresh.h repl_modules.h stat.cc stat.h \
+	stmem.cc store.cc store_client.cc tests/stub_store_digest.cc \
+	store_digest.h store_io.cc store_key_md5.cc store_key_md5.h \
+	store_log.cc store_log.h store_rebuild.cc store_rebuild.h \
+	tests/stub_store_stats.cc store_swapin.cc store_swapin.h \
+	store_swapmeta.cc store_swapout.cc time.cc tools.cc tools.h \
+	tests/stub_tunnel.cc urn.cc urn.h tests/stub_wccp2.cc wccp2.h \
+	tests/stub_whois.cc whois.h wordlist.cc wordlist.h
+am_tests_testEventLoop_OBJECTS = $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5) $(am__objects_6) $(am__objects_9) \
+	$(am__objects_11) $(am__objects_12) AccessLogEntry.$(OBJEXT) \
 	BodyPipe.$(OBJEXT) tests/stub_CacheDigest.$(OBJEXT) \
-	cache_manager.$(OBJEXT) CachePeer.$(OBJEXT) \
-	tests/stub_carp.$(OBJEXT) cbdata.$(OBJEXT) \
-	tests/stub_client_db.$(OBJEXT) client_side.$(OBJEXT) \
-	client_side_reply.$(OBJEXT) client_side_request.$(OBJEXT) \
-	clientStream.$(OBJEXT) \
-	tests/stub_CollapsedForwarding.$(OBJEXT) \
+	CachePeer.$(OBJEXT) tests/stub_CollapsedForwarding.$(OBJEXT) \
 	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) \
 	CpuAffinityMap.$(OBJEXT) CpuAffinitySet.$(OBJEXT) \
-	debug.$(OBJEXT) $(am__objects_3) fs_io.$(OBJEXT) \
-	dlink.$(OBJEXT) $(am__objects_4) errorpage.$(OBJEXT) \
-	tests/stub_ETag.$(OBJEXT) EventLoop.$(OBJEXT) event.$(OBJEXT) \
-	external_acl.$(OBJEXT) ExternalACLEntry.$(OBJEXT) \
-	FadingCounter.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
-	fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
-	fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
-	tests/stub_gopher.$(OBJEXT) HappyConnOpener.$(OBJEXT) \
-	helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
-	HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
+	tests/stub_ETag.$(OBJEXT) EventLoop.$(OBJEXT) \
+	tests/testEventLoop.$(OBJEXT) ExternalACLEntry.$(OBJEXT) \
+	FadingCounter.$(OBJEXT) FwdState.$(OBJEXT) \
+	HappyConnOpener.$(OBJEXT) HttpBody.$(OBJEXT) \
+	tests/stub_HttpControlMsg.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
+	HttpHdrContRange.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
+	HttpHdrSc.$(OBJEXT) HttpHdrScTarget.$(OBJEXT) \
 	HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
-	HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
-	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
-	HttpHdrScTarget.$(OBJEXT) HttpReply.$(OBJEXT) \
-	PeerPoolMgr.$(OBJEXT) RequestFlags.$(OBJEXT) \
-	HttpRequest.$(OBJEXT) icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) \
-	$(am__objects_6) ipcache.$(OBJEXT) int.$(OBJEXT) \
-	internal.$(OBJEXT) LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) \
-	MemBuf.$(OBJEXT) MemObject.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) mem_node.$(OBJEXT) mime.$(OBJEXT) \
-	mime_header.$(OBJEXT) multicast.$(OBJEXT) neighbors.$(OBJEXT) \
-	Notes.$(OBJEXT) Parsing.$(OBJEXT) pconn.$(OBJEXT) \
-	peer_digest.$(OBJEXT) peer_proxy_negotiate_auth.$(OBJEXT) \
-	peer_select.$(OBJEXT) peer_sourcehash.$(OBJEXT) \
-	peer_userhash.$(OBJEXT) Pipeline.$(OBJEXT) \
-	RemovalPolicy.$(OBJEXT) ResolvedPeers.$(OBJEXT) \
-	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) \
-	tests/stub_SBufDetailedStats.$(OBJEXT) $(am__objects_10) \
-	SquidMath.$(OBJEXT) stat.$(OBJEXT) StatCounters.$(OBJEXT) \
-	StatHist.$(OBJEXT) stmem.$(OBJEXT) store.$(OBJEXT) \
-	store_client.$(OBJEXT) tests/stub_store_digest.$(OBJEXT) \
-	store_io.$(OBJEXT) store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
-	store_rebuild.$(OBJEXT) store_swapin.$(OBJEXT) \
-	store_swapmeta.$(OBJEXT) store_swapout.$(OBJEXT) \
+	HttpReply.$(OBJEXT) HttpRequest.$(OBJEXT) \
+	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
+	LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) MemBuf.$(OBJEXT) \
+	MemObject.$(OBJEXT) MemStore.$(OBJEXT) Notes.$(OBJEXT) \
+	Parsing.$(OBJEXT) PeerPoolMgr.$(OBJEXT) Pipeline.$(OBJEXT) \
+	RemovalPolicy.$(OBJEXT) RequestFlags.$(OBJEXT) \
+	ResolvedPeers.$(OBJEXT) tests/stub_SBufDetailedStats.$(OBJEXT) \
+	SquidMath.$(OBJEXT) StatCounters.$(OBJEXT) StatHist.$(OBJEXT) \
 	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
 	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
-	StoreSwapLogData.$(OBJEXT) String.$(OBJEXT) StrList.$(OBJEXT) \
-	tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
-	tests/stub_libstore.$(OBJEXT) tests/testEventLoop.$(OBJEXT) \
-	tests/stub_main_cc.$(OBJEXT) \
-	tests/stub_ipc_Forwarder.$(OBJEXT) \
-	tests/stub_libauth_acls.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
-	tests/stub_libdiskio.$(OBJEXT) tests/stub_libeui.$(OBJEXT) \
-	tests/stub_libsecurity.$(OBJEXT) \
-	tests/stub_store_stats.$(OBJEXT) time.$(OBJEXT) \
-	tools.$(OBJEXT) Transients.$(OBJEXT) \
-	tests/stub_tunnel.$(OBJEXT) MemStore.$(OBJEXT) \
-	$(am__objects_12) urn.$(OBJEXT) tests/stub_wccp2.$(OBJEXT) \
-	tests/stub_whois.$(OBJEXT) $(am__objects_13) \
+	StoreSwapLogData.$(OBJEXT) StrList.$(OBJEXT) String.$(OBJEXT) \
+	Transients.$(OBJEXT) tests/stub_cache_cf.$(OBJEXT) \
+	cache_manager.$(OBJEXT) tests/stub_carp.$(OBJEXT) \
+	cbdata.$(OBJEXT) clientStream.$(OBJEXT) \
+	tests/stub_client_db.$(OBJEXT) client_side.$(OBJEXT) \
+	client_side_reply.$(OBJEXT) client_side_request.$(OBJEXT) \
+	debug.$(OBJEXT) dlink.$(OBJEXT) errorpage.$(OBJEXT) \
+	event.$(OBJEXT) external_acl.$(OBJEXT) \
+	tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
+	filemap.$(OBJEXT) fqdncache.$(OBJEXT) fs_io.$(OBJEXT) \
+	tests/stub_gopher.$(OBJEXT) helper.$(OBJEXT) http.$(OBJEXT) \
+	icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) int.$(OBJEXT) \
+	internal.$(OBJEXT) tests/stub_ipc_Forwarder.$(OBJEXT) \
+	ipcache.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
+	tests/stub_libauth_acls.$(OBJEXT) \
+	tests/stub_libdiskio.$(OBJEXT) tests/stub_liberror.$(OBJEXT) \
+	tests/stub_libeui.$(OBJEXT) tests/stub_libmem.$(OBJEXT) \
+	tests/stub_libsecurity.$(OBJEXT) tests/stub_libstore.$(OBJEXT) \
+	tests/stub_main_cc.$(OBJEXT) mem_node.$(OBJEXT) mime.$(OBJEXT) \
+	mime_header.$(OBJEXT) multicast.$(OBJEXT) neighbors.$(OBJEXT) \
+	pconn.$(OBJEXT) peer_digest.$(OBJEXT) \
+	peer_proxy_negotiate_auth.$(OBJEXT) peer_select.$(OBJEXT) \
+	peer_sourcehash.$(OBJEXT) peer_userhash.$(OBJEXT) \
+	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) stat.$(OBJEXT) \
+	stmem.$(OBJEXT) store.$(OBJEXT) store_client.$(OBJEXT) \
+	tests/stub_store_digest.$(OBJEXT) store_io.$(OBJEXT) \
+	store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
+	store_rebuild.$(OBJEXT) tests/stub_store_stats.$(OBJEXT) \
+	store_swapin.$(OBJEXT) store_swapmeta.$(OBJEXT) \
+	store_swapout.$(OBJEXT) time.$(OBJEXT) tools.$(OBJEXT) \
+	tests/stub_tunnel.$(OBJEXT) urn.$(OBJEXT) \
+	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
 	wordlist.$(OBJEXT)
 nodist_tests_testEventLoop_OBJECTS = $(am__objects_17)
 tests_testEventLoop_OBJECTS = $(am_tests_testEventLoop_OBJECTS) \
@@ -1116,25 +1108,26 @@
 	sbuf/libsbuf.la store/libstore.la $(am__DEPENDENCIES_5) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
 tests_testEventLoop_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testEventLoop_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_tests_testHttp1Parser_OBJECTS = MemBuf.$(OBJEXT) \
-	tests/stub_MemObject.$(OBJEXT) mime_header.$(OBJEXT) \
-	String.$(OBJEXT) tests/stub_SBufDetailedStats.$(OBJEXT) \
-	tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_cache_manager.$(OBJEXT) tests/stub_comm.$(OBJEXT) \
-	tests/stub_cbdata.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
-	tests/stub_event.$(OBJEXT) \
+am_tests_testHttp1Parser_OBJECTS =  \
 	tests/stub_HelperChildConfig.$(OBJEXT) \
+	tests/testHttp1Parser.$(OBJEXT) MemBuf.$(OBJEXT) \
+	tests/stub_MemObject.$(OBJEXT) \
+	tests/stub_SBufDetailedStats.$(OBJEXT) String.$(OBJEXT) \
+	tests/stub_cache_cf.$(OBJEXT) \
+	tests/stub_cache_manager.$(OBJEXT) tests/stub_cbdata.$(OBJEXT) \
+	tests/stub_comm.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
+	tests/stub_event.$(OBJEXT) tests/stub_libanyp.$(OBJEXT) \
 	tests/stub_libmem.$(OBJEXT) tests/stub_libsecurity.$(OBJEXT) \
-	tests/stub_stmem.$(OBJEXT) tests/stub_store.$(OBJEXT) \
-	tests/stub_store_stats.$(OBJEXT) tests/stub_tools.$(OBJEXT) \
-	tests/testHttp1Parser.$(OBJEXT) tests/stub_time.$(OBJEXT) \
-	tests/stub_libanyp.$(OBJEXT) wordlist.$(OBJEXT)
+	mime_header.$(OBJEXT) tests/stub_stmem.$(OBJEXT) \
+	tests/stub_store.$(OBJEXT) tests/stub_store_stats.$(OBJEXT) \
+	tests/stub_time.$(OBJEXT) tests/stub_tools.$(OBJEXT) \
+	wordlist.$(OBJEXT)
 nodist_tests_testHttp1Parser_OBJECTS = $(am__objects_18)
 tests_testHttp1Parser_OBJECTS = $(am_tests_testHttp1Parser_OBJECTS) \
 	$(nodist_tests_testHttp1Parser_OBJECTS)
@@ -1148,30 +1141,31 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testHttp1Parser_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_tests_testHttpReply_OBJECTS = cbdata.$(OBJEXT) \
-	ConfigParser.$(OBJEXT) tests/stub_ETag.$(OBJEXT) \
-	tests/stub_fatal.$(OBJEXT) HttpBody.$(OBJEXT) \
-	HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
-	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
-	HttpHdrScTarget.$(OBJEXT) HttpHeader.$(OBJEXT) \
-	HttpHeaderTools.$(OBJEXT) HttpControlMsg.$(OBJEXT) \
-	HttpReply.$(OBJEXT) MasterXaction.$(OBJEXT) MemBuf.$(OBJEXT) \
-	mime_header.$(OBJEXT) Notes.$(OBJEXT) \
-	tests/stub_SBufDetailedStats.$(OBJEXT) String.$(OBJEXT) \
-	StrList.$(OBJEXT) tests/stub_access_log.$(OBJEXT) \
+am_tests_testHttpReply_OBJECTS = ConfigParser.$(OBJEXT) \
+	tests/stub_ETag.$(OBJEXT) \
+	tests/stub_HelperChildConfig.$(OBJEXT) HttpBody.$(OBJEXT) \
+	HttpControlMsg.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
+	HttpHdrContRange.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
+	HttpHdrSc.$(OBJEXT) HttpHdrScTarget.$(OBJEXT) \
+	HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
+	HttpReply.$(OBJEXT) tests/testHttpReply.$(OBJEXT) \
+	tests/stub_HttpRequest.$(OBJEXT) MasterXaction.$(OBJEXT) \
+	MemBuf.$(OBJEXT) Notes.$(OBJEXT) \
+	tests/stub_SBufDetailedStats.$(OBJEXT) StatCounters.$(OBJEXT) \
+	tests/stub_StatHist.$(OBJEXT) StrList.$(OBJEXT) \
+	String.$(OBJEXT) tests/stub_access_log.$(OBJEXT) \
 	tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_cache_manager.$(OBJEXT) tests/stub_comm.$(OBJEXT) \
-	tests/stub_debug.$(OBJEXT) tests/stub_errorpage.$(OBJEXT) \
-	tests/stub_event.$(OBJEXT) tests/stub_fd.$(OBJEXT) \
-	tests/stub_HelperChildConfig.$(OBJEXT) \
-	tests/stub_libformat.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
-	tests/stub_libcomm.$(OBJEXT) tests/stub_libmgr.$(OBJEXT) \
+	tests/stub_cache_manager.$(OBJEXT) cbdata.$(OBJEXT) \
+	tests/stub_comm.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
+	tests/stub_errorpage.$(OBJEXT) tests/stub_event.$(OBJEXT) \
+	tests/stub_fatal.$(OBJEXT) tests/stub_fd.$(OBJEXT) \
+	tests/stub_libanyp.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
+	tests/stub_libcomm.$(OBJEXT) tests/stub_liberror.$(OBJEXT) \
+	tests/stub_libformat.$(OBJEXT) tests/stub_libmgr.$(OBJEXT) \
 	tests/stub_libsecurity.$(OBJEXT) \
-	tests/stub_libsslsquid.$(OBJEXT) StatCounters.$(OBJEXT) \
-	tests/stub_StatHist.$(OBJEXT) tests/stub_store.$(OBJEXT) \
-	tests/stub_store_stats.$(OBJEXT) tests/stub_tools.$(OBJEXT) \
-	tests/stub_HttpRequest.$(OBJEXT) tests/testHttpReply.$(OBJEXT) \
-	tests/stub_time.$(OBJEXT) tests/stub_libanyp.$(OBJEXT) \
+	tests/stub_libsslsquid.$(OBJEXT) mime_header.$(OBJEXT) \
+	tests/stub_store.$(OBJEXT) tests/stub_store_stats.$(OBJEXT) \
+	tests/stub_time.$(OBJEXT) tests/stub_tools.$(OBJEXT) \
 	wordlist.$(OBJEXT)
 nodist_tests_testHttpReply_OBJECTS = $(am__objects_18) \
 	hier_code.$(OBJEXT)
@@ -1190,23 +1184,7 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testHttpReply_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tests_testHttpRequest_SOURCES_DIST = AccessLogEntry.cc \
-	RequestFlags.h RequestFlags.cc HttpRequest.cc \
-	tests/stub_libmem.cc String.cc tests/testHttpRequest.h \
-	tests/testHttpRequest.cc tests/testHttpRequestMethod.h \
-	tests/testHttpRequestMethod.cc tests/stub_libauth.cc \
-	tests/stub_main_cc.cc tests/stub_ipc_Forwarder.cc \
-	tests/stub_libdiskio.cc tests/stub_libeui.cc \
-	tests/stub_store_stats.cc tests/stub_EventLoop.cc time.cc \
-	BodyPipe.cc cache_manager.cc cache_cf.h AuthReg.h \
-	RefreshPattern.h debug.cc CacheDigest.h \
-	tests/stub_CacheDigest.cc CachePeer.cc CachePeer.h carp.h \
-	tests/stub_carp.cc cbdata.cc tests/stub_client_db.cc \
-	client_side.h client_side.cc client_side_reply.cc \
-	client_side_request.cc ClientInfo.h clientStream.cc \
-	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
-	ConfigParser.cc CpuAffinityMap.cc CpuAffinityMap.h \
-	CpuAffinitySet.cc CpuAffinitySet.h BandwidthBucket.cc \
+am__tests_testHttpRequest_SOURCES_DIST = BandwidthBucket.cc \
 	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -1214,107 +1192,120 @@
 	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
 	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h fs_io.h fs_io.cc \
-	dlink.h dlink.cc dns_internal.cc errorpage.cc \
-	tests/stub_ETag.cc external_acl.cc ExternalACLEntry.cc fatal.h \
-	tests/stub_fatal.cc fd.h fd.cc fde.cc fqdncache.h fqdncache.cc \
-	FwdState.cc FwdState.h gopher.h tests/stub_gopher.cc \
-	HappyConnOpener.cc HappyConnOpener.h helper.cc hier_code.h \
-	htcp.cc htcp.h http.cc HttpBody.h HttpBody.cc \
-	tests/stub_HttpControlMsg.cc HttpHeader.h HttpHeader.cc \
-	HttpHeaderFieldInfo.h HttpHeaderTools.h HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h HttpHdrCc.h HttpHdrCc.cc \
+	ClientDelayConfig.cc ClientDelayConfig.h dns_internal.cc \
+	htcp.cc htcp.h SquidIpc.h ipc.cc ipc_win32.cc SnmpRequest.h \
+	snmp_core.h snmp_core.cc snmp_agent.h snmp_agent.cc win32.cc \
+	AccessLogEntry.cc AuthReg.h BodyPipe.cc \
+	tests/stub_CacheDigest.cc CacheDigest.h CachePeer.cc \
+	CachePeer.h ClientInfo.h tests/stub_CollapsedForwarding.cc \
+	ConfigOption.cc ConfigParser.cc CpuAffinityMap.cc \
+	CpuAffinityMap.h CpuAffinitySet.cc CpuAffinitySet.h \
+	tests/stub_ETag.cc tests/stub_EventLoop.cc ExternalACLEntry.cc \
+	FadingCounter.cc FwdState.cc FwdState.h HappyConnOpener.cc \
+	HappyConnOpener.h HttpBody.cc HttpBody.h \
+	tests/stub_HttpControlMsg.cc HttpHdrCc.cc HttpHdrCc.h \
 	HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
-	HttpHdrScTarget.cc HttpReply.cc icp_v2.cc icp_v3.cc SquidIpc.h \
-	ipc.cc ipc_win32.cc ipcache.cc int.h int.cc internal.h \
-	internal.cc LogTags.cc tests/stub_libsecurity.cc \
-	MasterXaction.cc MasterXaction.h multicast.h multicast.cc \
-	mem_node.cc MemBuf.cc MemObject.cc mime.h mime.cc \
-	mime_header.h mime_header.cc neighbors.h neighbors.cc Notes.cc \
-	Notes.h Parsing.cc pconn.cc peer_digest.cc \
-	peer_proxy_negotiate_auth.h peer_proxy_negotiate_auth.cc \
-	peer_select.cc peer_sourcehash.h peer_sourcehash.cc \
-	peer_userhash.h peer_userhash.cc PeerPoolMgr.h PeerPoolMgr.cc \
-	Pipeline.cc Pipeline.h redirect.h tests/stub_libauth_acls.cc \
-	tests/stub_redirect.cc refresh.h refresh.cc RemovalPolicy.cc \
+	HttpHdrScTarget.cc HttpHeader.cc HttpHeader.h \
+	HttpHeaderFieldInfo.h HttpHeaderFieldStat.h HttpHeaderTools.cc \
+	HttpHeaderTools.h HttpReply.cc HttpRequest.cc \
+	tests/testHttpRequest.cc tests/testHttpRequest.h \
+	tests/testHttpRequestMethod.cc tests/testHttpRequestMethod.h \
+	tests/stub_HttpUpgradeProtocolAccess.cc IoStats.h LogTags.cc \
+	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
+	MemStore.cc Notes.cc Notes.h Parsing.cc PeerPoolMgr.cc \
+	PeerPoolMgr.h Pipeline.cc Pipeline.h RefreshPattern.h \
+	RemovalPolicy.cc RequestFlags.cc RequestFlags.h \
 	ResolvedPeers.cc ResolvedPeers.h \
-	tests/stub_SBufDetailedStats.cc SnmpRequest.h snmp_core.h \
-	snmp_core.cc snmp_agent.h snmp_agent.cc SquidMath.h \
-	SquidMath.cc IoStats.h stat.h stat.cc StatCounters.h \
-	StatCounters.cc StatHist.h StatHist.cc stmem.cc repl_modules.h \
-	store.cc store_client.cc store_digest.h \
-	tests/stub_store_digest.cc store_io.cc store_key_md5.h \
-	store_key_md5.cc store_log.h store_log.cc store_rebuild.h \
-	store_rebuild.cc store_swapin.h store_swapin.cc \
-	store_swapmeta.cc store_swapout.cc StoreFileSystem.cc \
-	StoreIOState.cc tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc StrList.h StrList.cc event.cc tools.h \
-	tools.cc Transients.cc tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc tests/stub_tunnel.cc \
-	tests/stub_libstore.cc MemStore.cc urn.h urn.cc wccp2.h \
-	tests/stub_wccp2.cc whois.h tests/stub_whois.cc \
-	FadingCounter.cc win32.cc wordlist.h wordlist.cc
-am_tests_testHttpRequest_OBJECTS = AccessLogEntry.$(OBJEXT) \
-	RequestFlags.$(OBJEXT) HttpRequest.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) String.$(OBJEXT) \
-	tests/testHttpRequest.$(OBJEXT) \
-	tests/testHttpRequestMethod.$(OBJEXT) \
-	tests/stub_libauth.$(OBJEXT) tests/stub_main_cc.$(OBJEXT) \
-	tests/stub_ipc_Forwarder.$(OBJEXT) \
-	tests/stub_libdiskio.$(OBJEXT) tests/stub_libeui.$(OBJEXT) \
-	tests/stub_store_stats.$(OBJEXT) \
-	tests/stub_EventLoop.$(OBJEXT) time.$(OBJEXT) \
-	BodyPipe.$(OBJEXT) cache_manager.$(OBJEXT) debug.$(OBJEXT) \
+	tests/stub_SBufDetailedStats.cc SquidMath.cc SquidMath.h \
+	StatCounters.cc StatCounters.h StatHist.cc StatHist.h \
+	StoreFileSystem.cc StoreIOState.cc tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc StoreSwapLogData.cc StrList.cc StrList.h \
+	String.cc Transients.cc tests/stub_cache_cf.cc cache_cf.h \
+	cache_manager.cc tests/stub_carp.cc carp.h cbdata.cc \
+	clientStream.cc tests/stub_client_db.cc client_side.cc \
+	client_side.h client_side_reply.cc client_side_request.cc \
+	debug.cc dlink.cc dlink.h errorpage.cc event.cc \
+	external_acl.cc tests/stub_fatal.cc fatal.h fd.cc fd.h fde.cc \
+	fqdncache.cc fqdncache.h fs_io.cc fs_io.h tests/stub_gopher.cc \
+	gopher.h helper.cc hier_code.h http.cc icp_v2.cc icp_v3.cc \
+	int.cc int.h internal.cc internal.h \
+	tests/stub_ipc_Forwarder.cc ipcache.cc tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc tests/stub_libeui.cc \
+	tests/stub_libmem.cc tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc tests/stub_main_cc.cc mem_node.cc \
+	mime.cc mime.h mime_header.cc mime_header.h multicast.cc \
+	multicast.h neighbors.cc neighbors.h pconn.cc peer_digest.cc \
+	peer_proxy_negotiate_auth.cc peer_proxy_negotiate_auth.h \
+	peer_select.cc peer_sourcehash.cc peer_sourcehash.h \
+	peer_userhash.cc peer_userhash.h tests/stub_redirect.cc \
+	redirect.h refresh.cc refresh.h repl_modules.h stat.cc stat.h \
+	stmem.cc store.cc store_client.cc tests/stub_store_digest.cc \
+	store_digest.h store_io.cc store_key_md5.cc store_key_md5.h \
+	store_log.cc store_log.h store_rebuild.cc store_rebuild.h \
+	tests/stub_store_stats.cc store_swapin.cc store_swapin.h \
+	store_swapmeta.cc store_swapout.cc time.cc tools.cc tools.h \
+	tests/stub_tunnel.cc urn.cc urn.h tests/stub_wccp2.cc wccp2.h \
+	tests/stub_whois.cc whois.h wordlist.cc wordlist.h
+am_tests_testHttpRequest_OBJECTS = $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5) $(am__objects_6) $(am__objects_9) \
+	$(am__objects_12) AccessLogEntry.$(OBJEXT) BodyPipe.$(OBJEXT) \
 	tests/stub_CacheDigest.$(OBJEXT) CachePeer.$(OBJEXT) \
-	tests/stub_carp.$(OBJEXT) cbdata.$(OBJEXT) \
-	tests/stub_client_db.$(OBJEXT) client_side.$(OBJEXT) \
-	client_side_reply.$(OBJEXT) client_side_request.$(OBJEXT) \
-	clientStream.$(OBJEXT) \
 	tests/stub_CollapsedForwarding.$(OBJEXT) \
 	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) \
 	CpuAffinityMap.$(OBJEXT) CpuAffinitySet.$(OBJEXT) \
-	$(am__objects_3) fs_io.$(OBJEXT) dlink.$(OBJEXT) \
-	$(am__objects_4) errorpage.$(OBJEXT) tests/stub_ETag.$(OBJEXT) \
-	external_acl.$(OBJEXT) ExternalACLEntry.$(OBJEXT) \
-	tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
-	fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
-	tests/stub_gopher.$(OBJEXT) HappyConnOpener.$(OBJEXT) \
-	helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
+	tests/stub_ETag.$(OBJEXT) tests/stub_EventLoop.$(OBJEXT) \
+	ExternalACLEntry.$(OBJEXT) FadingCounter.$(OBJEXT) \
+	FwdState.$(OBJEXT) HappyConnOpener.$(OBJEXT) \
 	HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
-	HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
 	HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
 	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
-	HttpHdrScTarget.$(OBJEXT) HttpReply.$(OBJEXT) icp_v2.$(OBJEXT) \
-	icp_v3.$(OBJEXT) $(am__objects_6) ipcache.$(OBJEXT) \
-	int.$(OBJEXT) internal.$(OBJEXT) LogTags.$(OBJEXT) \
-	tests/stub_libsecurity.$(OBJEXT) MasterXaction.$(OBJEXT) \
-	multicast.$(OBJEXT) mem_node.$(OBJEXT) MemBuf.$(OBJEXT) \
-	MemObject.$(OBJEXT) mime.$(OBJEXT) mime_header.$(OBJEXT) \
-	neighbors.$(OBJEXT) Notes.$(OBJEXT) Parsing.$(OBJEXT) \
+	HttpHdrScTarget.$(OBJEXT) HttpHeader.$(OBJEXT) \
+	HttpHeaderTools.$(OBJEXT) HttpReply.$(OBJEXT) \
+	HttpRequest.$(OBJEXT) tests/testHttpRequest.$(OBJEXT) \
+	tests/testHttpRequestMethod.$(OBJEXT) \
+	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
+	LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) MemBuf.$(OBJEXT) \
+	MemObject.$(OBJEXT) MemStore.$(OBJEXT) Notes.$(OBJEXT) \
+	Parsing.$(OBJEXT) PeerPoolMgr.$(OBJEXT) Pipeline.$(OBJEXT) \
+	RemovalPolicy.$(OBJEXT) RequestFlags.$(OBJEXT) \
+	ResolvedPeers.$(OBJEXT) tests/stub_SBufDetailedStats.$(OBJEXT) \
+	SquidMath.$(OBJEXT) StatCounters.$(OBJEXT) StatHist.$(OBJEXT) \
+	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
+	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
+	StoreSwapLogData.$(OBJEXT) StrList.$(OBJEXT) String.$(OBJEXT) \
+	Transients.$(OBJEXT) tests/stub_cache_cf.$(OBJEXT) \
+	cache_manager.$(OBJEXT) tests/stub_carp.$(OBJEXT) \
+	cbdata.$(OBJEXT) clientStream.$(OBJEXT) \
+	tests/stub_client_db.$(OBJEXT) client_side.$(OBJEXT) \
+	client_side_reply.$(OBJEXT) client_side_request.$(OBJEXT) \
+	debug.$(OBJEXT) dlink.$(OBJEXT) errorpage.$(OBJEXT) \
+	event.$(OBJEXT) external_acl.$(OBJEXT) \
+	tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
+	fqdncache.$(OBJEXT) fs_io.$(OBJEXT) \
+	tests/stub_gopher.$(OBJEXT) helper.$(OBJEXT) http.$(OBJEXT) \
+	icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) int.$(OBJEXT) \
+	internal.$(OBJEXT) tests/stub_ipc_Forwarder.$(OBJEXT) \
+	ipcache.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
+	tests/stub_libauth_acls.$(OBJEXT) \
+	tests/stub_libdiskio.$(OBJEXT) tests/stub_liberror.$(OBJEXT) \
+	tests/stub_libeui.$(OBJEXT) tests/stub_libmem.$(OBJEXT) \
+	tests/stub_libsecurity.$(OBJEXT) tests/stub_libstore.$(OBJEXT) \
+	tests/stub_main_cc.$(OBJEXT) mem_node.$(OBJEXT) mime.$(OBJEXT) \
+	mime_header.$(OBJEXT) multicast.$(OBJEXT) neighbors.$(OBJEXT) \
 	pconn.$(OBJEXT) peer_digest.$(OBJEXT) \
 	peer_proxy_negotiate_auth.$(OBJEXT) peer_select.$(OBJEXT) \
 	peer_sourcehash.$(OBJEXT) peer_userhash.$(OBJEXT) \
-	PeerPoolMgr.$(OBJEXT) Pipeline.$(OBJEXT) \
-	tests/stub_libauth_acls.$(OBJEXT) \
-	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) \
-	RemovalPolicy.$(OBJEXT) ResolvedPeers.$(OBJEXT) \
-	tests/stub_SBufDetailedStats.$(OBJEXT) $(am__objects_10) \
-	SquidMath.$(OBJEXT) stat.$(OBJEXT) StatCounters.$(OBJEXT) \
-	StatHist.$(OBJEXT) stmem.$(OBJEXT) store.$(OBJEXT) \
-	store_client.$(OBJEXT) tests/stub_store_digest.$(OBJEXT) \
-	store_io.$(OBJEXT) store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
-	store_rebuild.$(OBJEXT) store_swapin.$(OBJEXT) \
-	store_swapmeta.$(OBJEXT) store_swapout.$(OBJEXT) \
-	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
-	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
-	StoreSwapLogData.$(OBJEXT) StrList.$(OBJEXT) event.$(OBJEXT) \
-	tools.$(OBJEXT) Transients.$(OBJEXT) \
-	tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
-	tests/stub_tunnel.$(OBJEXT) tests/stub_libstore.$(OBJEXT) \
-	MemStore.$(OBJEXT) urn.$(OBJEXT) tests/stub_wccp2.$(OBJEXT) \
-	tests/stub_whois.$(OBJEXT) FadingCounter.$(OBJEXT) \
-	$(am__objects_13) wordlist.$(OBJEXT)
+	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) stat.$(OBJEXT) \
+	stmem.$(OBJEXT) store.$(OBJEXT) store_client.$(OBJEXT) \
+	tests/stub_store_digest.$(OBJEXT) store_io.$(OBJEXT) \
+	store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
+	store_rebuild.$(OBJEXT) tests/stub_store_stats.$(OBJEXT) \
+	store_swapin.$(OBJEXT) store_swapmeta.$(OBJEXT) \
+	store_swapout.$(OBJEXT) time.$(OBJEXT) tools.$(OBJEXT) \
+	tests/stub_tunnel.$(OBJEXT) urn.$(OBJEXT) \
+	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
+	wordlist.$(OBJEXT)
 nodist_tests_testHttpRequest_OBJECTS = $(am__objects_17)
 tests_testHttpRequest_OBJECTS = $(am_tests_testHttpRequest_OBJECTS) \
 	$(nodist_tests_testHttpRequest_OBJECTS)
@@ -1333,15 +1324,16 @@
 	$(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3) \
+	$(am__DEPENDENCIES_1)
 tests_testHttpRequest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testHttpRequest_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_tests_testIcmp_OBJECTS = tests/testIcmp.$(OBJEXT)
-nodist_tests_testIcmp_OBJECTS = tests/stub_debug.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) tests/stub_SBuf.$(OBJEXT) \
-	time.$(OBJEXT) globals.$(OBJEXT)
+nodist_tests_testIcmp_OBJECTS = tests/stub_SBuf.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT) globals.$(OBJEXT) \
+	tests/stub_libmem.$(OBJEXT) time.$(OBJEXT)
 tests_testIcmp_OBJECTS = $(am_tests_testIcmp_OBJECTS) \
 	$(nodist_tests_testIcmp_OBJECTS)
 tests_testIcmp_DEPENDENCIES = icmp/libicmpcore.la ip/libip.la \
@@ -1352,8 +1344,8 @@
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testIcmp_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_tests_testIpAddress_OBJECTS = tests/testIpAddress.$(OBJEXT)
-nodist_tests_testIpAddress_OBJECTS = tests/stub_debug.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) tests/stub_SBuf.$(OBJEXT) \
+nodist_tests_testIpAddress_OBJECTS = tests/stub_SBuf.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT) tests/stub_libmem.$(OBJEXT) \
 	tests/stub_tools.$(OBJEXT)
 tests_testIpAddress_OBJECTS = $(am_tests_testIpAddress_OBJECTS) \
 	$(nodist_tests_testIpAddress_OBJECTS)
@@ -1365,9 +1357,9 @@
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testIpAddress_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_tests_testLookupTable_OBJECTS = tests/testLookupTable.$(OBJEXT)
-nodist_tests_testLookupTable_OBJECTS = tests/stub_debug.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) \
-	tests/stub_SBufDetailedStats.$(OBJEXT)
+nodist_tests_testLookupTable_OBJECTS =  \
+	tests/stub_SBufDetailedStats.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT) tests/stub_libmem.$(OBJEXT)
 tests_testLookupTable_OBJECTS = $(am_tests_testLookupTable_OBJECTS) \
 	$(nodist_tests_testLookupTable_OBJECTS)
 tests_testLookupTable_DEPENDENCIES = sbuf/libsbuf.la base/libbase.la \
@@ -1389,9 +1381,9 @@
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testMem_LDFLAGS) $(LDFLAGS) \
 	-o $@
 am_tests_testNetDb_OBJECTS = tests/testNetDb.$(OBJEXT)
-nodist_tests_testNetDb_OBJECTS = tests/stub_debug.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) tests/stub_SBuf.$(OBJEXT) \
-	time.$(OBJEXT) globals.$(OBJEXT)
+nodist_tests_testNetDb_OBJECTS = tests/stub_SBuf.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT) globals.$(OBJEXT) \
+	tests/stub_libmem.$(OBJEXT) time.$(OBJEXT)
 tests_testNetDb_OBJECTS = $(am_tests_testNetDb_OBJECTS) \
 	$(nodist_tests_testNetDb_OBJECTS)
 tests_testNetDb_DEPENDENCIES = icmp/libicmp.la ip/libip.la \
@@ -1412,65 +1404,65 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testRefCount_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tests_testRock_SOURCES_DIST = AccessLogEntry.cc AccessLogEntry.h \
-	cbdata.cc CacheDigest.h CollapsedForwarding.h \
-	CollapsedForwarding.cc tests/stub_CacheDigest.cc \
-	ConfigOption.cc ConfigParser.cc fs_io.h fs_io.cc ETag.cc \
-	EventLoop.cc event.cc FadingCounter.cc fatal.h fatal.cc fd.h \
-	fd.cc fde.h fde.cc FileMap.h filemap.cc HttpHeaderFieldStat.h \
-	HttpBody.h HttpBody.cc HttpHdrCc.cc HttpHdrContRange.cc \
-	HttpHdrRange.cc HttpHdrSc.cc HttpHdrScTarget.cc HttpHeader.h \
-	HttpHeader.cc HttpHeaderFieldInfo.h HttpHeaderTools.h \
-	HttpHeaderTools.cc HttpReply.cc int.h int.cc LogTags.cc \
-	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
-	MemStore.cc mem_node.cc Notes.h Notes.cc Parsing.cc \
-	RemovalPolicy.cc RequestFlags.cc RequestFlags.h \
-	ResolvedPeers.cc ResolvedPeers.h StatCounters.h \
-	StatCounters.cc StatHist.h tests/stub_StatHist.cc stmem.cc \
-	repl_modules.h tests/stub_stat.cc store.cc StoreFileSystem.cc \
-	StoreIOState.cc StoreMetaUnpacker.cc StoreMeta.cc StoreMeta.h \
-	StoreMetaMD5.cc StoreMetaMD5.h StoreMetaSTD.cc StoreMetaSTD.h \
-	StoreMetaSTDLFS.cc StoreMetaSTDLFS.h StoreMetaObjSize.h \
-	StoreMetaURL.cc StoreMetaURL.h StoreMetaVary.cc \
-	StoreMetaVary.h StoreSwapLogData.cc store_io.cc \
-	store_key_md5.h store_key_md5.cc store_swapmeta.cc \
-	store_swapout.cc tests/stub_SBufDetailedStats.cc String.cc \
-	StrList.h StrList.cc Transients.h Transients.cc \
-	tests/testRock.cc tests/testRock.h tests/testStoreSupport.cc \
-	tests/testStoreSupport.h log/access_log.h \
-	tests/stub_access_log.cc cache_cf.h tests/stub_cache_cf.cc \
-	tests/stub_cache_manager.cc tests/stub_client_db.cc \
+am__tests_testRock_SOURCES_DIST = BandwidthBucket.cc BandwidthBucket.h \
+	CommonPool.h CompositePoolNode.h delay_pools.cc DelayId.cc \
+	DelayId.h DelayIdComposite.h DelayBucket.cc DelayBucket.h \
+	DelayConfig.cc DelayConfig.h DelayPool.cc DelayPool.h \
+	DelayPools.h DelaySpec.cc DelaySpec.h DelayTagged.cc \
+	DelayTagged.h DelayUser.cc DelayUser.h DelayVector.cc \
+	DelayVector.h MessageBucket.cc MessageBucket.h \
+	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
+	ClientDelayConfig.cc ClientDelayConfig.h StoreMeta.cc \
+	StoreMeta.h StoreMetaMD5.cc StoreMetaMD5.h StoreMetaSTD.cc \
+	StoreMetaSTD.h StoreMetaSTDLFS.cc StoreMetaSTDLFS.h \
+	StoreMetaObjSize.h StoreMetaURL.cc StoreMetaURL.h \
+	StoreMetaVary.cc StoreMetaVary.h unlinkd.h unlinkd.cc \
+	AccessLogEntry.cc AccessLogEntry.h tests/stub_CacheDigest.cc \
+	CacheDigest.h CollapsedForwarding.cc CollapsedForwarding.h \
+	ConfigOption.cc ConfigParser.cc ETag.cc EventLoop.cc \
+	FadingCounter.cc FileMap.h tests/stub_HelperChildConfig.cc \
+	HttpBody.cc HttpBody.h HttpHdrCc.cc HttpHdrContRange.cc \
+	HttpHdrRange.cc HttpHdrSc.cc HttpHdrScTarget.cc HttpHeader.cc \
+	HttpHeader.h HttpHeaderFieldInfo.h HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc HttpHeaderTools.h HttpReply.cc \
+	tests/stub_HttpRequest.cc LogTags.cc MasterXaction.cc \
+	MasterXaction.h MemBuf.cc MemObject.cc MemStore.cc Notes.cc \
+	Notes.h Parsing.cc tests/stub_Port.cc RemovalPolicy.cc \
+	RequestFlags.cc RequestFlags.h ResolvedPeers.cc \
+	ResolvedPeers.h tests/testRock.cc tests/testRock.h \
+	tests/stub_SBufDetailedStats.cc StatCounters.cc StatCounters.h \
+	tests/stub_StatHist.cc StatHist.h StoreFileSystem.cc \
+	StoreIOState.cc StoreMetaUnpacker.cc tests/testStoreSupport.cc \
+	tests/testStoreSupport.h StoreSwapLogData.cc StrList.cc \
+	StrList.h String.cc Transients.cc Transients.h \
+	tests/stub_access_log.cc tests/stub_cache_cf.cc cache_cf.h \
+	tests/stub_cache_manager.cc cbdata.cc tests/stub_client_db.cc \
 	tests/stub_client_side_request.cc tests/stub_debug.cc \
-	tests/stub_errorpage.cc tests/stub_HelperChildConfig.cc \
-	tests/stub_http.cc tests/stub_HttpRequest.cc \
-	tests/stub_libauth.cc tests/stub_icp.cc tests/stub_ipc.cc \
-	tests/stub_ipcache.cc tests/stub_libeui.cc \
-	tests/stub_libformat.cc tests/stub_libicmp.cc \
-	tests/stub_liblog.cc tests/stub_libmgr.cc \
-	tests/stub_libsecurity.cc mime.h tests/stub_mime.cc \
-	tests/stub_neighbors.cc tests/stub_Port.cc tests/stub_pconn.cc \
-	tests/stub_store_client.cc store_rebuild.h \
-	tests/stub_store_rebuild.cc tests/stub_store_stats.cc tools.h \
-	tests/stub_tools.cc time.cc tests/stub_libanyp.cc wordlist.h \
-	wordlist.cc BandwidthBucket.cc BandwidthBucket.h CommonPool.h \
-	CompositePoolNode.h delay_pools.cc DelayId.cc DelayId.h \
-	DelayIdComposite.h DelayBucket.cc DelayBucket.h DelayConfig.cc \
-	DelayConfig.h DelayPool.cc DelayPool.h DelayPools.h \
-	DelaySpec.cc DelaySpec.h DelayTagged.cc DelayTagged.h \
-	DelayUser.cc DelayUser.h DelayVector.cc DelayVector.h \
-	MessageBucket.cc MessageBucket.h MessageDelayPools.h \
-	MessageDelayPools.cc NullDelayId.h ClientDelayConfig.cc \
-	ClientDelayConfig.h unlinkd.h unlinkd.cc
-@ENABLE_FS_ROCK_TRUE@am_tests_testRock_OBJECTS =  \
-@ENABLE_FS_ROCK_TRUE@	AccessLogEntry.$(OBJEXT) cbdata.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	CollapsedForwarding.$(OBJEXT) \
+	tests/stub_errorpage.cc event.cc fatal.cc fatal.h fd.cc fd.h \
+	fde.cc fde.h filemap.cc fs_io.cc fs_io.h tests/stub_http.cc \
+	tests/stub_icp.cc int.cc int.h tests/stub_ipc.cc \
+	tests/stub_ipcache.cc tests/stub_libanyp.cc \
+	tests/stub_libauth.cc tests/stub_liberror.cc \
+	tests/stub_libeui.cc tests/stub_libformat.cc \
+	tests/stub_libicmp.cc tests/stub_liblog.cc \
+	tests/stub_libmgr.cc tests/stub_libsecurity.cc \
+	log/access_log.h mem_node.cc tests/stub_mime.cc mime.h \
+	tests/stub_neighbors.cc tests/stub_pconn.cc repl_modules.h \
+	tests/stub_stat.cc stmem.cc store.cc \
+	tests/stub_store_client.cc store_io.cc store_key_md5.cc \
+	store_key_md5.h tests/stub_store_rebuild.cc store_rebuild.h \
+	tests/stub_store_stats.cc store_swapmeta.cc store_swapout.cc \
+	time.cc tests/stub_tools.cc tools.h wordlist.cc wordlist.h
+@ENABLE_FS_ROCK_TRUE@am_tests_testRock_OBJECTS = $(am__objects_3) \
+@ENABLE_FS_ROCK_TRUE@	$(am__objects_10) $(am__objects_11) \
+@ENABLE_FS_ROCK_TRUE@	AccessLogEntry.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_CacheDigest.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	CollapsedForwarding.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	ConfigOption.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	ConfigParser.$(OBJEXT) fs_io.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	ETag.$(OBJEXT) EventLoop.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	event.$(OBJEXT) FadingCounter.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	fatal.$(OBJEXT) fd.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	fde.$(OBJEXT) filemap.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	ConfigParser.$(OBJEXT) ETag.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	EventLoop.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	FadingCounter.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_HelperChildConfig.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	HttpBody.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	HttpHdrContRange.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	HttpHdrRange.$(OBJEXT) \
@@ -1478,65 +1470,69 @@
 @ENABLE_FS_ROCK_TRUE@	HttpHdrScTarget.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	HttpHeader.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	HttpHeaderTools.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	HttpReply.$(OBJEXT) int.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	HttpReply.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_HttpRequest.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	MemBuf.$(OBJEXT) MemObject.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	MemStore.$(OBJEXT) mem_node.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	Notes.$(OBJEXT) Parsing.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	MemStore.$(OBJEXT) Notes.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	Parsing.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_Port.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	RemovalPolicy.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	RequestFlags.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	ResolvedPeers.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/testRock.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_SBufDetailedStats.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	StatCounters.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_StatHist.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	stmem.$(OBJEXT) tests/stub_stat.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	store.$(OBJEXT) StoreFileSystem.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	StoreFileSystem.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	StoreIOState.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	StoreMetaUnpacker.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	$(am__objects_11) \
+@ENABLE_FS_ROCK_TRUE@	tests/testStoreSupport.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	StoreSwapLogData.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	store_io.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	store_key_md5.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	store_swapmeta.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	store_swapout.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_SBufDetailedStats.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	String.$(OBJEXT) StrList.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	StrList.$(OBJEXT) String.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	Transients.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/testRock.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/testStoreSupport.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_access_log.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_cache_cf.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_cache_manager.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	cbdata.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_client_db.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_client_side_request.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_debug.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_errorpage.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_HelperChildConfig.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	event.$(OBJEXT) fatal.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	fd.$(OBJEXT) fde.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	filemap.$(OBJEXT) fs_io.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_http.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_HttpRequest.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_libauth.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_icp.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_icp.$(OBJEXT) int.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_ipc.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_ipcache.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_libanyp.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_libauth.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_liberror.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libeui.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libformat.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libicmp.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_liblog.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libmgr.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libsecurity.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	mem_node.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_mime.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_neighbors.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_Port.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_pconn.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_stat.$(OBJEXT) stmem.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	store.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_store_client.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	store_io.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	store_key_md5.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_store_rebuild.$(OBJEXT) \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_store_stats.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_tools.$(OBJEXT) time.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_libanyp.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	wordlist.$(OBJEXT) $(am__objects_3) \
-@ENABLE_FS_ROCK_TRUE@	$(am__objects_12)
+@ENABLE_FS_ROCK_TRUE@	store_swapmeta.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	store_swapout.$(OBJEXT) time.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_tools.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	wordlist.$(OBJEXT)
 @ENABLE_FS_ROCK_TRUE@nodist_tests_testRock_OBJECTS =  \
-@ENABLE_FS_ROCK_TRUE@	$(am__objects_18) hier_code.$(OBJEXT) \
-@ENABLE_FS_ROCK_TRUE@	SquidMath.$(OBJEXT) swap_log_op.$(OBJEXT)
+@ENABLE_FS_ROCK_TRUE@	$(am__objects_18) SquidMath.$(OBJEXT) \
+@ENABLE_FS_ROCK_TRUE@	hier_code.$(OBJEXT) swap_log_op.$(OBJEXT)
 tests_testRock_OBJECTS = $(am_tests_testRock_OBJECTS) \
 	$(nodist_tests_testRock_OBJECTS)
 @ENABLE_FS_ROCK_TRUE@tests_testRock_DEPENDENCIES = http/libhttp.la \
@@ -1562,10 +1558,10 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testRock_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_tests_testSBuf_OBJECTS = tests/SBufFindTest.$(OBJEXT) \
-	tests/testSBuf.$(OBJEXT)
-nodist_tests_testSBuf_OBJECTS = tests/stub_debug.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) tests/stub_StatHist.$(OBJEXT)
+am_tests_testSBuf_OBJECTS = tests/testSBuf.$(OBJEXT) \
+	tests/SBufFindTest.$(OBJEXT)
+nodist_tests_testSBuf_OBJECTS = tests/stub_StatHist.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT) tests/stub_libmem.$(OBJEXT)
 tests_testSBuf_OBJECTS = $(am_tests_testSBuf_OBJECTS) \
 	$(nodist_tests_testSBuf_OBJECTS)
 tests_testSBuf_DEPENDENCIES = sbuf/libsbuf.la base/libbase.la \
@@ -1576,8 +1572,8 @@
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testSBuf_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_tests_testSBufList_OBJECTS = tests/testSBufList.$(OBJEXT)
-nodist_tests_testSBufList_OBJECTS = tests/stub_debug.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) tests/stub_StatHist.$(OBJEXT)
+nodist_tests_testSBufList_OBJECTS = tests/stub_StatHist.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT) tests/stub_libmem.$(OBJEXT)
 tests_testSBufList_OBJECTS = $(am_tests_testSBufList_OBJECTS) \
 	$(nodist_tests_testSBufList_OBJECTS)
 tests_testSBufList_DEPENDENCIES = sbuf/libsbuf.la base/libbase.la \
@@ -1587,18 +1583,18 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testSBufList_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_tests_testStatHist_OBJECTS = tests/stub_cbdata.$(OBJEXT) \
-	tests/stub_fatal.$(OBJEXT) tests/stub_MemBuf.$(OBJEXT) \
+am_tests_testStatHist_OBJECTS = tests/stub_DelayId.$(OBJEXT) \
+	tests/stub_HelperChildConfig.$(OBJEXT) \
+	tests/stub_MemBuf.$(OBJEXT) tests/stub_MemObject.$(OBJEXT) \
 	tests/stub_SBufDetailedStats.$(OBJEXT) StatHist.$(OBJEXT) \
-	String.$(OBJEXT) tests/stub_cache_manager.$(OBJEXT) \
+	tests/testStatHist.$(OBJEXT) String.$(OBJEXT) \
+	tests/stub_cache_manager.$(OBJEXT) tests/stub_cbdata.$(OBJEXT) \
 	tests/stub_comm.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
-	tests/stub_DelayId.$(OBJEXT) \
-	tests/stub_HelperChildConfig.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) tests/stub_MemObject.$(OBJEXT) \
+	tests/stub_fatal.$(OBJEXT) tests/stub_libmem.$(OBJEXT) \
 	tests/stub_mime.$(OBJEXT) tests/stub_pconn.$(OBJEXT) \
 	tests/stub_stmem.$(OBJEXT) tests/stub_store.$(OBJEXT) \
 	tests/stub_store_stats.$(OBJEXT) time.$(OBJEXT) \
-	tests/stub_tools.$(OBJEXT) tests/testStatHist.$(OBJEXT)
+	tests/stub_tools.$(OBJEXT)
 nodist_tests_testStatHist_OBJECTS = $(am__objects_18)
 tests_testStatHist_OBJECTS = $(am_tests_testStatHist_OBJECTS) \
 	$(nodist_tests_testStatHist_OBJECTS)
@@ -1610,103 +1606,102 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testStatHist_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tests_testStore_SOURCES_DIST = CacheDigest.h \
-	tests/stub_CacheDigest.cc cbdata.cc ClientInfo.h \
-	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
-	ConfigParser.cc BandwidthBucket.cc BandwidthBucket.h \
-	CommonPool.h CompositePoolNode.h delay_pools.cc DelayId.cc \
-	DelayId.h DelayIdComposite.h DelayBucket.cc DelayBucket.h \
-	DelayConfig.cc DelayConfig.h DelayPool.cc DelayPool.h \
-	DelayPools.h DelaySpec.cc DelaySpec.h DelayTagged.cc \
-	DelayTagged.h DelayUser.cc DelayUser.h DelayVector.cc \
-	DelayVector.h MessageBucket.cc MessageBucket.h \
+am__tests_testStore_SOURCES_DIST = BandwidthBucket.cc \
+	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
+	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
+	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
+	DelayPool.cc DelayPool.h DelayPools.h DelaySpec.cc DelaySpec.h \
+	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
+	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h fs_io.h fs_io.cc \
-	ETag.cc event.cc EventLoop.cc fatal.h tests/stub_fatal.cc \
-	FileMap.h filemap.cc HttpHeaderFieldStat.h HttpHdrCc.h \
-	HttpHdrCc.cc HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
-	HttpHdrScTarget.cc HttpHeaderFieldInfo.h HttpHeaderTools.h \
-	HttpHeaderTools.cc HttpHeader.h HttpHeader.cc RequestFlags.cc \
-	RequestFlags.h int.h int.cc MasterXaction.cc MasterXaction.h \
-	mem_node.cc MemBuf.cc MemObject.cc MemStore.cc Notes.h \
-	Notes.cc Parsing.cc RemovalPolicy.cc refresh.h refresh.cc \
-	StatCounters.h StatCounters.cc StatHist.h StatHist.cc stmem.cc \
-	repl_modules.h store.cc store_io.cc store_swapout.cc \
-	StoreIOState.cc tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc store_key_md5.h store_key_md5.cc \
-	tests/stub_SBufDetailedStats.cc String.cc StrList.h StrList.cc \
-	tests/CapturingStoreEntry.h log/access_log.h \
-	tests/stub_access_log.cc tests/stub_acl.cc cache_cf.h \
-	tests/stub_cache_cf.cc tests/stub_cache_manager.cc \
-	tests/stub_client_side_request.cc tests/stub_comm.cc \
-	tests/stub_debug.cc tests/stub_errorpage.cc fd.h fde.h \
-	tests/stub_fd.cc tests/stub_helper.cc \
-	tests/stub_HelperChildConfig.cc tests/stub_http.cc \
-	tests/stub_libauth.cc tests/stub_libeui.cc \
-	tests/stub_libdiskio.cc tests/stub_libformat.cc \
-	tests/stub_libsecurity.cc tests/stub_libsslsquid.cc HttpBody.h \
-	HttpBody.cc tests/stub_HttpReply.cc tests/stub_HttpRequest.cc \
-	tests/stub_libcomm.cc mime.h tests/stub_mime.cc \
-	tests/stub_Port.cc tests/stub_stat.cc \
-	tests/stub_store_client.cc tests/stub_store_stats.cc \
-	store_rebuild.h tests/stub_store_rebuild.cc \
-	tests/stub_store_swapout.cc tools.h Transients.cc \
-	tests/stub_tools.cc tests/stub_UdsOp.cc \
+	ClientDelayConfig.cc ClientDelayConfig.h \
+	tests/stub_CacheDigest.cc CacheDigest.h ClientInfo.h \
+	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
+	ConfigParser.cc ETag.cc EventLoop.cc FileMap.h \
+	tests/stub_HelperChildConfig.cc HttpBody.cc HttpBody.h \
+	HttpHdrCc.cc HttpHdrCc.h HttpHdrContRange.cc HttpHdrRange.cc \
+	HttpHdrSc.cc HttpHdrScTarget.cc HttpHeader.cc HttpHeader.h \
+	HttpHeaderFieldInfo.h HttpHeaderFieldStat.h HttpHeaderTools.cc \
+	HttpHeaderTools.h tests/stub_HttpReply.cc \
+	tests/stub_HttpRequest.cc MasterXaction.cc MasterXaction.h \
+	MemBuf.cc MemObject.cc MemStore.cc Notes.cc Notes.h \
 	tests/testPackableStream.cc tests/testPackableStream.h \
-	tests/testStore.cc tests/testStore.h \
-	tests/testStoreController.cc tests/testStoreController.h \
-	tests/testStoreHashIndex.cc tests/testStoreHashIndex.h \
+	Parsing.cc tests/stub_Port.cc RemovalPolicy.cc RequestFlags.cc \
+	RequestFlags.h tests/stub_SBufDetailedStats.cc StatCounters.cc \
+	StatCounters.h StatHist.cc StatHist.h tests/testStore.cc \
+	tests/testStore.h tests/testStoreController.cc \
+	tests/testStoreController.h tests/testStoreHashIndex.cc \
+	tests/testStoreHashIndex.h StoreIOState.cc \
+	tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
 	tests/testStoreSupport.cc tests/testStoreSupport.h \
+	StoreSwapLogData.cc StrList.cc StrList.h String.cc \
+	Transients.cc tests/stub_UdsOp.cc tests/stub_access_log.cc \
+	tests/stub_acl.cc tests/stub_cache_cf.cc cache_cf.h \
+	tests/stub_cache_manager.cc cbdata.cc \
+	tests/stub_client_side_request.cc tests/stub_comm.cc \
+	tests/stub_debug.cc tests/stub_errorpage.cc event.cc \
+	tests/stub_fatal.cc fatal.h tests/stub_fd.cc fd.h fde.h \
+	filemap.cc fs_io.cc fs_io.h tests/stub_helper.cc \
+	tests/stub_http.cc int.cc int.h tests/stub_libanyp.cc \
+	tests/stub_libauth.cc tests/stub_libcomm.cc \
+	tests/stub_libdiskio.cc tests/stub_liberror.cc \
+	tests/stub_libeui.cc tests/stub_libformat.cc \
+	tests/stub_libsecurity.cc tests/stub_libsslsquid.cc \
+	log/access_log.h mem_node.cc tests/stub_mime.cc mime.h \
+	refresh.cc refresh.h repl_modules.h tests/stub_stat.cc \
+	stmem.cc store.cc tests/stub_store_client.cc store_io.cc \
+	store_key_md5.cc store_key_md5.h tests/stub_store_rebuild.cc \
+	store_rebuild.h tests/stub_store_stats.cc store_swapout.cc \
+	tests/stub_store_swapout.cc tests/CapturingStoreEntry.h \
 	tests/TestSwapDir.cc tests/TestSwapDir.h tests/stub_time.cc \
-	tests/stub_libanyp.cc wordlist.h wordlist.cc
-am_tests_testStore_OBJECTS = tests/stub_CacheDigest.$(OBJEXT) \
-	cbdata.$(OBJEXT) tests/stub_CollapsedForwarding.$(OBJEXT) \
-	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) $(am__objects_3) \
-	fs_io.$(OBJEXT) ETag.$(OBJEXT) event.$(OBJEXT) \
-	EventLoop.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
-	filemap.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
+	tests/stub_tools.cc tools.h wordlist.cc wordlist.h
+am_tests_testStore_OBJECTS = $(am__objects_3) \
+	tests/stub_CacheDigest.$(OBJEXT) \
+	tests/stub_CollapsedForwarding.$(OBJEXT) \
+	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) ETag.$(OBJEXT) \
+	EventLoop.$(OBJEXT) tests/stub_HelperChildConfig.$(OBJEXT) \
+	HttpBody.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
 	HttpHdrContRange.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
 	HttpHdrSc.$(OBJEXT) HttpHdrScTarget.$(OBJEXT) \
-	HttpHeaderTools.$(OBJEXT) HttpHeader.$(OBJEXT) \
-	RequestFlags.$(OBJEXT) int.$(OBJEXT) MasterXaction.$(OBJEXT) \
-	mem_node.$(OBJEXT) MemBuf.$(OBJEXT) MemObject.$(OBJEXT) \
-	MemStore.$(OBJEXT) Notes.$(OBJEXT) Parsing.$(OBJEXT) \
-	RemovalPolicy.$(OBJEXT) refresh.$(OBJEXT) \
-	StatCounters.$(OBJEXT) StatHist.$(OBJEXT) stmem.$(OBJEXT) \
-	store.$(OBJEXT) store_io.$(OBJEXT) store_swapout.$(OBJEXT) \
-	StoreIOState.$(OBJEXT) tests/stub_StoreMeta.$(OBJEXT) \
-	StoreMetaUnpacker.$(OBJEXT) StoreSwapLogData.$(OBJEXT) \
-	store_key_md5.$(OBJEXT) tests/stub_SBufDetailedStats.$(OBJEXT) \
-	String.$(OBJEXT) StrList.$(OBJEXT) \
-	tests/stub_access_log.$(OBJEXT) tests/stub_acl.$(OBJEXT) \
-	tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_cache_manager.$(OBJEXT) \
+	HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
+	tests/stub_HttpReply.$(OBJEXT) \
+	tests/stub_HttpRequest.$(OBJEXT) MasterXaction.$(OBJEXT) \
+	MemBuf.$(OBJEXT) MemObject.$(OBJEXT) MemStore.$(OBJEXT) \
+	Notes.$(OBJEXT) tests/testPackableStream.$(OBJEXT) \
+	Parsing.$(OBJEXT) tests/stub_Port.$(OBJEXT) \
+	RemovalPolicy.$(OBJEXT) RequestFlags.$(OBJEXT) \
+	tests/stub_SBufDetailedStats.$(OBJEXT) StatCounters.$(OBJEXT) \
+	StatHist.$(OBJEXT) tests/testStore.$(OBJEXT) \
+	tests/testStoreController.$(OBJEXT) \
+	tests/testStoreHashIndex.$(OBJEXT) StoreIOState.$(OBJEXT) \
+	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
+	tests/testStoreSupport.$(OBJEXT) StoreSwapLogData.$(OBJEXT) \
+	StrList.$(OBJEXT) String.$(OBJEXT) Transients.$(OBJEXT) \
+	tests/stub_UdsOp.$(OBJEXT) tests/stub_access_log.$(OBJEXT) \
+	tests/stub_acl.$(OBJEXT) tests/stub_cache_cf.$(OBJEXT) \
+	tests/stub_cache_manager.$(OBJEXT) cbdata.$(OBJEXT) \
 	tests/stub_client_side_request.$(OBJEXT) \
 	tests/stub_comm.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
-	tests/stub_errorpage.$(OBJEXT) tests/stub_fd.$(OBJEXT) \
-	tests/stub_helper.$(OBJEXT) \
-	tests/stub_HelperChildConfig.$(OBJEXT) \
-	tests/stub_http.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
-	tests/stub_libeui.$(OBJEXT) tests/stub_libdiskio.$(OBJEXT) \
+	tests/stub_errorpage.$(OBJEXT) event.$(OBJEXT) \
+	tests/stub_fatal.$(OBJEXT) tests/stub_fd.$(OBJEXT) \
+	filemap.$(OBJEXT) fs_io.$(OBJEXT) tests/stub_helper.$(OBJEXT) \
+	tests/stub_http.$(OBJEXT) int.$(OBJEXT) \
+	tests/stub_libanyp.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
+	tests/stub_libcomm.$(OBJEXT) tests/stub_libdiskio.$(OBJEXT) \
+	tests/stub_liberror.$(OBJEXT) tests/stub_libeui.$(OBJEXT) \
 	tests/stub_libformat.$(OBJEXT) \
 	tests/stub_libsecurity.$(OBJEXT) \
-	tests/stub_libsslsquid.$(OBJEXT) HttpBody.$(OBJEXT) \
-	tests/stub_HttpReply.$(OBJEXT) \
-	tests/stub_HttpRequest.$(OBJEXT) tests/stub_libcomm.$(OBJEXT) \
-	tests/stub_mime.$(OBJEXT) tests/stub_Port.$(OBJEXT) \
-	tests/stub_stat.$(OBJEXT) tests/stub_store_client.$(OBJEXT) \
-	tests/stub_store_stats.$(OBJEXT) \
-	tests/stub_store_rebuild.$(OBJEXT) \
-	tests/stub_store_swapout.$(OBJEXT) Transients.$(OBJEXT) \
-	tests/stub_tools.$(OBJEXT) tests/stub_UdsOp.$(OBJEXT) \
-	tests/testPackableStream.$(OBJEXT) tests/testStore.$(OBJEXT) \
-	tests/testStoreController.$(OBJEXT) \
-	tests/testStoreHashIndex.$(OBJEXT) \
-	tests/testStoreSupport.$(OBJEXT) tests/TestSwapDir.$(OBJEXT) \
-	tests/stub_time.$(OBJEXT) tests/stub_libanyp.$(OBJEXT) \
+	tests/stub_libsslsquid.$(OBJEXT) mem_node.$(OBJEXT) \
+	tests/stub_mime.$(OBJEXT) refresh.$(OBJEXT) \
+	tests/stub_stat.$(OBJEXT) stmem.$(OBJEXT) store.$(OBJEXT) \
+	tests/stub_store_client.$(OBJEXT) store_io.$(OBJEXT) \
+	store_key_md5.$(OBJEXT) tests/stub_store_rebuild.$(OBJEXT) \
+	tests/stub_store_stats.$(OBJEXT) store_swapout.$(OBJEXT) \
+	tests/stub_store_swapout.$(OBJEXT) tests/TestSwapDir.$(OBJEXT) \
+	tests/stub_time.$(OBJEXT) tests/stub_tools.$(OBJEXT) \
 	wordlist.$(OBJEXT)
-nodist_tests_testStore_OBJECTS = SquidMath.$(OBJEXT) \
-	swap_log_op.$(OBJEXT) $(am__objects_18)
+nodist_tests_testStore_OBJECTS = $(am__objects_18) SquidMath.$(OBJEXT) \
+	swap_log_op.$(OBJEXT)
 tests_testStore_OBJECTS = $(am_tests_testStore_OBJECTS) \
 	$(nodist_tests_testStore_OBJECTS)
 tests_testStore_DEPENDENCIES = libsquid.la http/libhttp.la \
@@ -1726,8 +1721,8 @@
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testStore_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_tests_testString_OBJECTS = tests/testString.$(OBJEXT)
-nodist_tests_testString_OBJECTS = String.$(OBJEXT) \
-	tests/stub_SBuf.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
+nodist_tests_testString_OBJECTS = tests/stub_SBuf.$(OBJEXT) \
+	String.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
 	tests/stub_libmem.$(OBJEXT)
 tests_testString_OBJECTS = $(am_tests_testString_OBJECTS) \
 	$(nodist_tests_testString_OBJECTS)
@@ -1738,8 +1733,8 @@
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testString_LDFLAGS) \
 	$(LDFLAGS) -o $@
 am_tests_testTokenizer_OBJECTS = tests/testTokenizer.$(OBJEXT)
-nodist_tests_testTokenizer_OBJECTS = tests/stub_debug.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) tests/stub_StatHist.$(OBJEXT)
+nodist_tests_testTokenizer_OBJECTS = tests/stub_StatHist.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT) tests/stub_libmem.$(OBJEXT)
 tests_testTokenizer_OBJECTS = $(am_tests_testTokenizer_OBJECTS) \
 	$(nodist_tests_testTokenizer_OBJECTS)
 tests_testTokenizer_DEPENDENCIES = parser/libparser.la sbuf/libsbuf.la \
@@ -1751,13 +1746,12 @@
 	$(LDFLAGS) -o $@
 am_tests_testURL_OBJECTS = tests/testURL.$(OBJEXT) \
 	tests/testUriScheme.$(OBJEXT)
-nodist_tests_testURL_OBJECTS = String.$(OBJEXT) \
-	tests/stub_access_log.$(OBJEXT) tests/stub_cbdata.$(OBJEXT) \
-	tests/stub_debug.$(OBJEXT) \
-	tests/stub_HelperChildConfig.$(OBJEXT) \
+nodist_tests_testURL_OBJECTS = tests/stub_HelperChildConfig.$(OBJEXT) \
 	tests/stub_HttpHeader.$(OBJEXT) \
-	tests/stub_HttpRequest.$(OBJEXT) tests/stub_libhttp.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) tests/stub_StatHist.$(OBJEXT)
+	tests/stub_HttpRequest.$(OBJEXT) tests/stub_StatHist.$(OBJEXT) \
+	String.$(OBJEXT) tests/stub_access_log.$(OBJEXT) \
+	tests/stub_cbdata.$(OBJEXT) tests/stub_debug.$(OBJEXT) \
+	tests/stub_libhttp.$(OBJEXT) tests/stub_libmem.$(OBJEXT)
 tests_testURL_OBJECTS = $(am_tests_testURL_OBJECTS) \
 	$(nodist_tests_testURL_OBJECTS)
 tests_testURL_DEPENDENCIES = libsquid.la proxyp/libproxyp.la \
@@ -1769,29 +1763,7 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testURL_LDFLAGS) $(LDFLAGS) \
 	-o $@
-am__tests_testUfs_SOURCES_DIST = AccessLogEntry.cc AccessLogEntry.h \
-	tests/testUfs.cc tests/testUfs.h tests/stub_cache_manager.cc \
-	tests/stub_client_db.cc tests/stub_CollapsedForwarding.cc \
-	tests/stub_HelperChildConfig.cc tests/stub_icp.cc \
-	tests/stub_ipc.cc tests/stub_ipcache.cc tests/stub_libeui.cc \
-	tests/stub_libicmp.cc tests/stub_liblog.cc \
-	tests/stub_neighbors.cc tests/stub_pconn.cc tests/stub_Port.cc \
-	tests/stub_UdsOp.cc internal.h tests/stub_internal.cc \
-	tests/stub_libformat.cc tests/stub_libsecurity.cc \
-	tests/stub_stat.cc store_rebuild.h tests/stub_store_rebuild.cc \
-	tests/stub_store_stats.cc fatal.h tests/stub_fatal.cc fd.h \
-	fd.cc fde.h fde.cc client_db.h FadingCounter.cc fs_io.h \
-	fs_io.cc FileMap.h filemap.cc HttpBody.h HttpBody.cc \
-	HttpReply.cc int.h int.cc LogTags.cc RequestFlags.h \
-	RequestFlags.cc Transients.cc MasterXaction.cc MasterXaction.h \
-	MemObject.cc MemStore.cc Notes.h Notes.cc StoreSwapLogData.cc \
-	StoreIOState.cc StoreMetaUnpacker.cc StoreMeta.cc StoreMeta.h \
-	StoreMetaMD5.cc StoreMetaMD5.h StoreMetaSTD.cc StoreMetaSTD.h \
-	StoreMetaSTDLFS.cc StoreMetaSTDLFS.h StoreMetaObjSize.h \
-	StoreMetaURL.cc StoreMetaURL.h StoreMetaVary.cc \
-	StoreMetaVary.h StoreFileSystem.cc store_io.cc \
-	store_swapout.cc store_swapmeta.cc unlinkd.h unlinkd.cc \
-	win32.cc event.cc BandwidthBucket.cc BandwidthBucket.h \
+am__tests_testUfs_SOURCES_DIST = BandwidthBucket.cc BandwidthBucket.h \
 	CommonPool.h CompositePoolNode.h delay_pools.cc DelayId.cc \
 	DelayId.h DelayIdComposite.h DelayBucket.cc DelayBucket.h \
 	DelayConfig.cc DelayConfig.h DelayPool.cc DelayPool.h \
@@ -1799,103 +1771,127 @@
 	DelayTagged.h DelayUser.cc DelayUser.h DelayVector.cc \
 	DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h CacheDigest.h \
-	tests/stub_CacheDigest.cc ConfigParser.cc EventLoop.cc \
-	RemovalPolicy.cc repl_modules.h store.cc store_key_md5.h \
-	store_key_md5.cc Parsing.cc ConfigOption.cc tests/stub_acl.cc \
-	cache_cf.h tests/stub_cache_cf.cc tests/stub_helper.cc \
-	cbdata.cc tests/stub_SBufDetailedStats.cc String.cc \
-	tests/stub_debug.cc tests/stub_client_side_request.cc \
-	tests/stub_http.cc tests/stub_libauth.cc mem_node.cc stmem.cc \
-	mime.h tests/stub_mime.cc HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h HttpHeaderTools.cc HttpHeader.h \
-	HttpHeader.cc ClientInfo.h MemBuf.cc HttpHdrContRange.cc \
-	HttpHeaderFieldStat.h HttpHdrCc.h HttpHdrCc.cc HttpHdrSc.cc \
-	HttpHdrScTarget.cc tests/stub_libanyp.cc StatCounters.h \
-	StatCounters.cc StatHist.h StatHist.cc StrList.h StrList.cc \
-	HttpHdrRange.cc ETag.cc tests/stub_errorpage.cc \
-	tests/stub_HttpRequest.cc log/access_log.h \
-	tests/stub_access_log.cc refresh.h refresh.cc \
-	tests/stub_store_client.cc tools.h tests/stub_tools.cc \
-	tests/testStoreSupport.cc tests/testStoreSupport.h time.cc \
-	wordlist.h wordlist.cc
-@ENABLE_FS_UFS_TRUE@am_tests_testUfs_OBJECTS =  \
-@ENABLE_FS_UFS_TRUE@	AccessLogEntry.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/testUfs.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_cache_manager.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_client_db.$(OBJEXT) \
+	ClientDelayConfig.cc ClientDelayConfig.h StoreMeta.cc \
+	StoreMeta.h StoreMetaMD5.cc StoreMetaMD5.h StoreMetaSTD.cc \
+	StoreMetaSTD.h StoreMetaSTDLFS.cc StoreMetaSTDLFS.h \
+	StoreMetaObjSize.h StoreMetaURL.cc StoreMetaURL.h \
+	StoreMetaVary.cc StoreMetaVary.h unlinkd.h unlinkd.cc win32.cc \
+	AccessLogEntry.cc AccessLogEntry.h tests/stub_CacheDigest.cc \
+	CacheDigest.h ClientInfo.h tests/stub_CollapsedForwarding.cc \
+	ConfigOption.cc ConfigParser.cc ETag.cc EventLoop.cc \
+	FadingCounter.cc FileMap.h tests/stub_HelperChildConfig.cc \
+	HttpBody.cc HttpBody.h HttpHdrCc.cc HttpHdrCc.h \
+	HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
+	HttpHdrScTarget.cc HttpHeader.cc HttpHeader.h \
+	HttpHeaderFieldInfo.h HttpHeaderFieldStat.h HttpHeaderTools.cc \
+	HttpHeaderTools.h HttpReply.cc tests/stub_HttpRequest.cc \
+	LogTags.cc MasterXaction.cc MasterXaction.h MemBuf.cc \
+	MemObject.cc MemStore.cc Notes.cc Notes.h Parsing.cc \
+	tests/stub_Port.cc RemovalPolicy.cc RequestFlags.cc \
+	RequestFlags.h tests/stub_SBufDetailedStats.cc StatCounters.cc \
+	StatCounters.h StatHist.cc StatHist.h StoreFileSystem.cc \
+	StoreIOState.cc StoreMetaUnpacker.cc tests/testStoreSupport.cc \
+	tests/testStoreSupport.h StoreSwapLogData.cc StrList.cc \
+	StrList.h String.cc Transients.cc tests/stub_UdsOp.cc \
+	tests/testUfs.cc tests/testUfs.h tests/stub_access_log.cc \
+	tests/stub_acl.cc tests/stub_cache_cf.cc cache_cf.h \
+	tests/stub_cache_manager.cc cbdata.cc tests/stub_client_db.cc \
+	client_db.h tests/stub_client_side_request.cc \
+	tests/stub_debug.cc tests/stub_errorpage.cc event.cc \
+	tests/stub_fatal.cc fatal.h fd.cc fd.h fde.cc fde.h filemap.cc \
+	fs_io.cc fs_io.h tests/stub_helper.cc tests/stub_http.cc \
+	tests/stub_icp.cc int.cc int.h tests/stub_internal.cc \
+	internal.h tests/stub_ipc.cc tests/stub_ipcache.cc \
+	tests/stub_libanyp.cc tests/stub_libauth.cc \
+	tests/stub_liberror.cc tests/stub_libeui.cc \
+	tests/stub_libformat.cc tests/stub_libicmp.cc \
+	tests/stub_liblog.cc tests/stub_libsecurity.cc \
+	log/access_log.h mem_node.cc tests/stub_mime.cc mime.h \
+	tests/stub_neighbors.cc tests/stub_pconn.cc refresh.cc \
+	refresh.h repl_modules.h tests/stub_stat.cc stmem.cc store.cc \
+	tests/stub_store_client.cc store_io.cc store_key_md5.cc \
+	store_key_md5.h tests/stub_store_rebuild.cc store_rebuild.h \
+	tests/stub_store_stats.cc store_swapmeta.cc store_swapout.cc \
+	time.cc tests/stub_tools.cc tools.h wordlist.cc wordlist.h
+@ENABLE_FS_UFS_TRUE@am_tests_testUfs_OBJECTS = $(am__objects_3) \
+@ENABLE_FS_UFS_TRUE@	$(am__objects_10) $(am__objects_11) \
+@ENABLE_FS_UFS_TRUE@	$(am__objects_12) AccessLogEntry.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_CacheDigest.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_CollapsedForwarding.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	ConfigOption.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	ConfigParser.$(OBJEXT) ETag.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	EventLoop.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	FadingCounter.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_HelperChildConfig.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_icp.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_ipc.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_ipcache.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libeui.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libicmp.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_liblog.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_neighbors.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_pconn.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	HttpBody.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	HttpHdrContRange.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	HttpHdrScTarget.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	HttpHeader.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	HttpHeaderTools.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	HttpReply.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_HttpRequest.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	MemBuf.$(OBJEXT) MemObject.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	MemStore.$(OBJEXT) Notes.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	Parsing.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_Port.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_UdsOp.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_internal.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libformat.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libsecurity.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_stat.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_store_rebuild.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_store_stats.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	fde.$(OBJEXT) FadingCounter.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	fs_io.$(OBJEXT) filemap.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	HttpBody.$(OBJEXT) HttpReply.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	int.$(OBJEXT) LogTags.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	RemovalPolicy.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	RequestFlags.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	Transients.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	MasterXaction.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	MemObject.$(OBJEXT) MemStore.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	Notes.$(OBJEXT) StoreSwapLogData.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_SBufDetailedStats.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	StatCounters.$(OBJEXT) StatHist.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	StoreFileSystem.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	StoreIOState.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	StoreMetaUnpacker.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	$(am__objects_11) \
-@ENABLE_FS_UFS_TRUE@	StoreFileSystem.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	store_io.$(OBJEXT) store_swapout.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	store_swapmeta.$(OBJEXT) $(am__objects_12) \
-@ENABLE_FS_UFS_TRUE@	$(am__objects_13) event.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	$(am__objects_3) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_CacheDigest.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	ConfigParser.$(OBJEXT) EventLoop.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	RemovalPolicy.$(OBJEXT) store.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	store_key_md5.$(OBJEXT) Parsing.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	ConfigOption.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/testStoreSupport.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	StoreSwapLogData.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	StrList.$(OBJEXT) String.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	Transients.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_UdsOp.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/testUfs.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_access_log.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_acl.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_cache_cf.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_helper.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_cache_manager.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	cbdata.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_SBufDetailedStats.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	String.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_debug.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_client_db.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_client_side_request.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_debug.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_errorpage.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	event.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	fd.$(OBJEXT) fde.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	filemap.$(OBJEXT) fs_io.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_helper.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_http.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_icp.$(OBJEXT) int.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_internal.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_ipc.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_ipcache.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libanyp.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_libauth.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	mem_node.$(OBJEXT) stmem.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_liberror.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libeui.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libformat.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libicmp.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_liblog.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libsecurity.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	mem_node.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_mime.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	HttpHeaderTools.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	HttpHeader.$(OBJEXT) MemBuf.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	HttpHdrContRange.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	HttpHdrCc.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	HttpHdrScTarget.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libanyp.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	StatCounters.$(OBJEXT) StatHist.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	StrList.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	ETag.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_errorpage.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_HttpRequest.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/stub_access_log.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_neighbors.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_pconn.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	refresh.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_stat.$(OBJEXT) stmem.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	store.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_store_client.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	store_io.$(OBJEXT) store_key_md5.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_store_rebuild.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	tests/stub_store_stats.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	store_swapmeta.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	store_swapout.$(OBJEXT) time.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	tests/stub_tools.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	tests/testStoreSupport.$(OBJEXT) \
-@ENABLE_FS_UFS_TRUE@	time.$(OBJEXT) wordlist.$(OBJEXT)
+@ENABLE_FS_UFS_TRUE@	wordlist.$(OBJEXT)
 @ENABLE_FS_UFS_TRUE@nodist_tests_testUfs_OBJECTS = $(am__objects_18) \
-@ENABLE_FS_UFS_TRUE@	hier_code.$(OBJEXT) SquidMath.$(OBJEXT) \
+@ENABLE_FS_UFS_TRUE@	SquidMath.$(OBJEXT) hier_code.$(OBJEXT) \
 @ENABLE_FS_UFS_TRUE@	swap_log_op.$(OBJEXT)
 tests_testUfs_OBJECTS = $(am_tests_testUfs_OBJECTS) \
 	$(nodist_tests_testUfs_OBJECTS)
@@ -1925,8 +1921,8 @@
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testUfs_LDFLAGS) $(LDFLAGS) \
 	-o $@
 am_tests_testYesNoNone_OBJECTS = tests/testYesNoNone.$(OBJEXT)
-nodist_tests_testYesNoNone_OBJECTS = tests/stub_debug.$(OBJEXT) \
-	tests/stub_SBuf.$(OBJEXT)
+nodist_tests_testYesNoNone_OBJECTS = tests/stub_SBuf.$(OBJEXT) \
+	tests/stub_debug.$(OBJEXT)
 tests_testYesNoNone_OBJECTS = $(am_tests_testYesNoNone_OBJECTS) \
 	$(nodist_tests_testYesNoNone_OBJECTS)
 tests_testYesNoNone_DEPENDENCIES = base/libbase.la \
@@ -1936,15 +1932,7 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_testYesNoNone_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__tests_test_http_range_SOURCES_DIST = AccessLogEntry.cc BodyPipe.cc \
-	cache_cf.h AuthReg.h RefreshPattern.h CachePeer.cc CachePeer.h \
-	cache_manager.cc CacheDigest.h tests/stub_CacheDigest.cc \
-	carp.h tests/stub_carp.cc cbdata.cc tests/stub_client_db.cc \
-	client_side.h client_side.cc client_side_reply.cc \
-	client_side_request.cc ClientInfo.h clientStream.cc \
-	tests/stub_CollapsedForwarding.cc ConfigOption.cc \
-	ConfigParser.cc CpuAffinityMap.cc CpuAffinityMap.h \
-	CpuAffinitySet.cc CpuAffinitySet.h debug.cc BandwidthBucket.cc \
+am__tests_test_http_range_SOURCES_DIST = BandwidthBucket.cc \
 	BandwidthBucket.h CommonPool.h CompositePoolNode.h \
 	delay_pools.cc DelayId.cc DelayId.h DelayIdComposite.h \
 	DelayBucket.cc DelayBucket.h DelayConfig.cc DelayConfig.h \
@@ -1952,109 +1940,118 @@
 	DelayTagged.cc DelayTagged.h DelayUser.cc DelayUser.h \
 	DelayVector.cc DelayVector.h MessageBucket.cc MessageBucket.h \
 	MessageDelayPools.h MessageDelayPools.cc NullDelayId.h \
-	ClientDelayConfig.cc ClientDelayConfig.h fs_io.h fs_io.cc \
-	dlink.h dlink.cc dns_internal.cc errorpage.cc \
-	tests/stub_ETag.cc event.cc FadingCounter.cc fatal.h \
-	tests/stub_libauth.cc tests/stub_fatal.cc fd.h fd.cc fde.cc \
-	FileMap.h filemap.cc fqdncache.h fqdncache.cc FwdState.cc \
-	FwdState.h gopher.h tests/stub_gopher.cc HappyConnOpener.cc \
-	HappyConnOpener.h helper.cc hier_code.h htcp.cc htcp.h http.cc \
-	HttpBody.h HttpBody.cc tests/stub_HttpControlMsg.cc \
-	HttpHeaderFieldStat.h HttpHdrCc.h HttpHdrCc.cc \
+	ClientDelayConfig.cc ClientDelayConfig.h dns_internal.cc \
+	htcp.cc htcp.h SquidIpc.h ipc.cc ipc_win32.cc SnmpRequest.h \
+	snmp_core.h snmp_core.cc snmp_agent.h snmp_agent.cc unlinkd.h \
+	unlinkd.cc win32.cc AccessLogEntry.cc AuthReg.h BodyPipe.cc \
+	tests/stub_CacheDigest.cc CacheDigest.h CachePeer.cc \
+	CachePeer.h ClientInfo.h tests/stub_CollapsedForwarding.cc \
+	ConfigOption.cc ConfigParser.cc CpuAffinityMap.cc \
+	CpuAffinityMap.h CpuAffinitySet.cc CpuAffinitySet.h \
+	tests/stub_ETag.cc tests/stub_EventLoop.cc FadingCounter.cc \
+	FileMap.h FwdState.cc FwdState.h HappyConnOpener.cc \
+	HappyConnOpener.h HttpBody.cc HttpBody.h \
+	tests/stub_HttpControlMsg.cc HttpHdrCc.cc HttpHdrCc.h \
 	HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
-	HttpHdrScTarget.cc HttpHeader.h HttpHeader.cc \
-	HttpHeaderFieldInfo.h HttpHeaderTools.h HttpHeaderTools.cc \
-	HttpReply.cc PeerPoolMgr.h PeerPoolMgr.cc RequestFlags.h \
-	RequestFlags.cc HttpRequest.cc icp_v2.cc icp_v3.cc int.h \
-	int.cc internal.h internal.cc SquidIpc.h ipc.cc ipc_win32.cc \
-	ipcache.cc LogTags.cc MasterXaction.cc MasterXaction.h \
-	MemBuf.cc MemObject.cc tests/stub_libmem.cc mem_node.cc mime.h \
-	mime.cc mime_header.h mime_header.cc multicast.h multicast.cc \
-	neighbors.h neighbors.cc Notes.cc Notes.h Parsing.cc \
-	peer_digest.cc peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc peer_select.cc peer_sourcehash.h \
-	peer_sourcehash.cc peer_userhash.h peer_userhash.cc \
-	Pipeline.cc Pipeline.h pconn.cc redirect.h \
-	tests/stub_redirect.cc refresh.h refresh.cc RemovalPolicy.cc \
-	ResolvedPeers.cc ResolvedPeers.h \
-	tests/stub_SBufDetailedStats.cc SnmpRequest.h snmp_core.h \
-	snmp_core.cc snmp_agent.h snmp_agent.cc SquidMath.h \
-	SquidMath.cc IoStats.h stat.h stat.cc StatCounters.h \
-	StatCounters.cc StatHist.h StatHist.cc stmem.cc repl_modules.h \
-	store.cc store_client.cc store_digest.h \
-	tests/stub_store_digest.cc store_key_md5.h store_key_md5.cc \
-	store_io.cc store_log.h store_log.cc store_rebuild.h \
-	store_rebuild.cc store_swapin.h store_swapin.cc \
-	store_swapmeta.cc store_swapout.cc StoreFileSystem.cc \
-	StoreIOState.cc tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc String.cc StrList.h StrList.cc \
-	tests/stub_libstore.cc Transients.cc tests/test_http_range.cc \
-	tests/stub_cache_cf.cc tests/stub_external_acl.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
-	tests/stub_ipc_Forwarder.cc tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc tests/stub_libsecurity.cc \
-	tests/stub_main_cc.cc tests/stub_MemStore.cc \
-	tests/stub_store_stats.cc tests/stub_EventLoop.cc time.cc \
-	tools.h tools.cc tests/stub_tunnel.cc unlinkd.h unlinkd.cc \
-	urn.h urn.cc wccp2.h tests/stub_wccp2.cc whois.h \
-	tests/stub_whois.cc win32.cc wordlist.h wordlist.cc
-am_tests_test_http_range_OBJECTS = AccessLogEntry.$(OBJEXT) \
-	BodyPipe.$(OBJEXT) CachePeer.$(OBJEXT) cache_manager.$(OBJEXT) \
-	tests/stub_CacheDigest.$(OBJEXT) tests/stub_carp.$(OBJEXT) \
-	cbdata.$(OBJEXT) tests/stub_client_db.$(OBJEXT) \
-	client_side.$(OBJEXT) client_side_reply.$(OBJEXT) \
-	client_side_request.$(OBJEXT) clientStream.$(OBJEXT) \
-	tests/stub_CollapsedForwarding.$(OBJEXT) \
+	HttpHdrScTarget.cc HttpHeader.cc HttpHeader.h \
+	HttpHeaderFieldInfo.h HttpHeaderFieldStat.h HttpHeaderTools.cc \
+	HttpHeaderTools.h HttpReply.cc HttpRequest.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc IoStats.h LogTags.cc \
+	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
+	tests/stub_MemStore.cc Notes.cc Notes.h Parsing.cc \
+	PeerPoolMgr.cc PeerPoolMgr.h Pipeline.cc Pipeline.h \
+	RefreshPattern.h RemovalPolicy.cc RequestFlags.cc \
+	RequestFlags.h ResolvedPeers.cc ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc SquidMath.cc SquidMath.h \
+	StatCounters.cc StatCounters.h StatHist.cc StatHist.h \
+	StoreFileSystem.cc StoreIOState.cc tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc StoreSwapLogData.cc StrList.cc StrList.h \
+	String.cc Transients.cc tests/test_http_range.cc \
+	tests/stub_cache_cf.cc cache_cf.h cache_manager.cc \
+	tests/stub_carp.cc carp.h cbdata.cc clientStream.cc \
+	tests/stub_client_db.cc client_side.cc client_side.h \
+	client_side_reply.cc client_side_request.cc debug.cc dlink.cc \
+	dlink.h errorpage.cc event.cc tests/stub_external_acl.cc \
+	tests/stub_fatal.cc fatal.h fd.cc fd.h fde.cc filemap.cc \
+	fqdncache.cc fqdncache.h fs_io.cc fs_io.h tests/stub_gopher.cc \
+	gopher.h helper.cc hier_code.h http.cc icp_v2.cc icp_v3.cc \
+	int.cc int.h internal.cc internal.h \
+	tests/stub_ipc_Forwarder.cc ipcache.cc tests/stub_libauth.cc \
+	tests/stub_libdiskio.cc tests/stub_liberror.cc \
+	tests/stub_libeui.cc tests/stub_libmem.cc \
+	tests/stub_libsecurity.cc tests/stub_libstore.cc \
+	tests/stub_main_cc.cc mem_node.cc mime.cc mime.h \
+	mime_header.cc mime_header.h multicast.cc multicast.h \
+	neighbors.cc neighbors.h pconn.cc peer_digest.cc \
+	peer_proxy_negotiate_auth.cc peer_proxy_negotiate_auth.h \
+	peer_select.cc peer_sourcehash.cc peer_sourcehash.h \
+	peer_userhash.cc peer_userhash.h tests/stub_redirect.cc \
+	redirect.h refresh.cc refresh.h repl_modules.h stat.cc stat.h \
+	stmem.cc store.cc store_client.cc tests/stub_store_digest.cc \
+	store_digest.h store_io.cc store_key_md5.cc store_key_md5.h \
+	store_log.cc store_log.h store_rebuild.cc store_rebuild.h \
+	tests/stub_store_stats.cc store_swapin.cc store_swapin.h \
+	store_swapmeta.cc store_swapout.cc time.cc tools.cc tools.h \
+	tests/stub_tunnel.cc urn.cc urn.h tests/stub_wccp2.cc wccp2.h \
+	tests/stub_whois.cc whois.h wordlist.cc wordlist.h
+am_tests_test_http_range_OBJECTS = $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5) $(am__objects_6) $(am__objects_9) \
+	$(am__objects_11) $(am__objects_12) AccessLogEntry.$(OBJEXT) \
+	BodyPipe.$(OBJEXT) tests/stub_CacheDigest.$(OBJEXT) \
+	CachePeer.$(OBJEXT) tests/stub_CollapsedForwarding.$(OBJEXT) \
 	ConfigOption.$(OBJEXT) ConfigParser.$(OBJEXT) \
 	CpuAffinityMap.$(OBJEXT) CpuAffinitySet.$(OBJEXT) \
-	debug.$(OBJEXT) $(am__objects_3) fs_io.$(OBJEXT) \
-	dlink.$(OBJEXT) $(am__objects_4) errorpage.$(OBJEXT) \
-	tests/stub_ETag.$(OBJEXT) event.$(OBJEXT) \
-	FadingCounter.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
-	tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
-	filemap.$(OBJEXT) fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
-	tests/stub_gopher.$(OBJEXT) HappyConnOpener.$(OBJEXT) \
-	helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
-	HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
-	HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
-	HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
-	HttpHdrScTarget.$(OBJEXT) HttpHeader.$(OBJEXT) \
-	HttpHeaderTools.$(OBJEXT) HttpReply.$(OBJEXT) \
-	PeerPoolMgr.$(OBJEXT) RequestFlags.$(OBJEXT) \
-	HttpRequest.$(OBJEXT) icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) \
-	int.$(OBJEXT) internal.$(OBJEXT) $(am__objects_6) \
-	ipcache.$(OBJEXT) LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) \
-	MemBuf.$(OBJEXT) MemObject.$(OBJEXT) \
-	tests/stub_libmem.$(OBJEXT) mem_node.$(OBJEXT) mime.$(OBJEXT) \
+	tests/stub_ETag.$(OBJEXT) tests/stub_EventLoop.$(OBJEXT) \
+	FadingCounter.$(OBJEXT) FwdState.$(OBJEXT) \
+	HappyConnOpener.$(OBJEXT) HttpBody.$(OBJEXT) \
+	tests/stub_HttpControlMsg.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
+	HttpHdrContRange.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
+	HttpHdrSc.$(OBJEXT) HttpHdrScTarget.$(OBJEXT) \
+	HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
+	HttpReply.$(OBJEXT) HttpRequest.$(OBJEXT) \
+	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
+	LogTags.$(OBJEXT) MasterXaction.$(OBJEXT) MemBuf.$(OBJEXT) \
+	MemObject.$(OBJEXT) tests/stub_MemStore.$(OBJEXT) \
+	Notes.$(OBJEXT) Parsing.$(OBJEXT) PeerPoolMgr.$(OBJEXT) \
+	Pipeline.$(OBJEXT) RemovalPolicy.$(OBJEXT) \
+	RequestFlags.$(OBJEXT) ResolvedPeers.$(OBJEXT) \
+	tests/stub_SBufDetailedStats.$(OBJEXT) SquidMath.$(OBJEXT) \
+	StatCounters.$(OBJEXT) StatHist.$(OBJEXT) \
+	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
+	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
+	StoreSwapLogData.$(OBJEXT) StrList.$(OBJEXT) String.$(OBJEXT) \
+	Transients.$(OBJEXT) tests/test_http_range.$(OBJEXT) \
+	tests/stub_cache_cf.$(OBJEXT) cache_manager.$(OBJEXT) \
+	tests/stub_carp.$(OBJEXT) cbdata.$(OBJEXT) \
+	clientStream.$(OBJEXT) tests/stub_client_db.$(OBJEXT) \
+	client_side.$(OBJEXT) client_side_reply.$(OBJEXT) \
+	client_side_request.$(OBJEXT) debug.$(OBJEXT) dlink.$(OBJEXT) \
+	errorpage.$(OBJEXT) event.$(OBJEXT) \
+	tests/stub_external_acl.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
+	fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
+	fqdncache.$(OBJEXT) fs_io.$(OBJEXT) \
+	tests/stub_gopher.$(OBJEXT) helper.$(OBJEXT) http.$(OBJEXT) \
+	icp_v2.$(OBJEXT) icp_v3.$(OBJEXT) int.$(OBJEXT) \
+	internal.$(OBJEXT) tests/stub_ipc_Forwarder.$(OBJEXT) \
+	ipcache.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
+	tests/stub_libdiskio.$(OBJEXT) tests/stub_liberror.$(OBJEXT) \
+	tests/stub_libeui.$(OBJEXT) tests/stub_libmem.$(OBJEXT) \
+	tests/stub_libsecurity.$(OBJEXT) tests/stub_libstore.$(OBJEXT) \
+	tests/stub_main_cc.$(OBJEXT) mem_node.$(OBJEXT) mime.$(OBJEXT) \
 	mime_header.$(OBJEXT) multicast.$(OBJEXT) neighbors.$(OBJEXT) \
-	Notes.$(OBJEXT) Parsing.$(OBJEXT) peer_digest.$(OBJEXT) \
+	pconn.$(OBJEXT) peer_digest.$(OBJEXT) \
 	peer_proxy_negotiate_auth.$(OBJEXT) peer_select.$(OBJEXT) \
 	peer_sourcehash.$(OBJEXT) peer_userhash.$(OBJEXT) \
-	Pipeline.$(OBJEXT) pconn.$(OBJEXT) \
-	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) \
-	RemovalPolicy.$(OBJEXT) ResolvedPeers.$(OBJEXT) \
-	tests/stub_SBufDetailedStats.$(OBJEXT) $(am__objects_10) \
-	SquidMath.$(OBJEXT) stat.$(OBJEXT) StatCounters.$(OBJEXT) \
-	StatHist.$(OBJEXT) stmem.$(OBJEXT) store.$(OBJEXT) \
-	store_client.$(OBJEXT) tests/stub_store_digest.$(OBJEXT) \
-	store_key_md5.$(OBJEXT) store_io.$(OBJEXT) store_log.$(OBJEXT) \
-	store_rebuild.$(OBJEXT) store_swapin.$(OBJEXT) \
-	store_swapmeta.$(OBJEXT) store_swapout.$(OBJEXT) \
-	StoreFileSystem.$(OBJEXT) StoreIOState.$(OBJEXT) \
-	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
-	StoreSwapLogData.$(OBJEXT) String.$(OBJEXT) StrList.$(OBJEXT) \
-	tests/stub_libstore.$(OBJEXT) Transients.$(OBJEXT) \
-	tests/test_http_range.$(OBJEXT) tests/stub_cache_cf.$(OBJEXT) \
-	tests/stub_external_acl.$(OBJEXT) \
-	tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT) \
-	tests/stub_ipc_Forwarder.$(OBJEXT) \
-	tests/stub_libdiskio.$(OBJEXT) tests/stub_libeui.$(OBJEXT) \
-	tests/stub_libsecurity.$(OBJEXT) tests/stub_main_cc.$(OBJEXT) \
-	tests/stub_MemStore.$(OBJEXT) tests/stub_store_stats.$(OBJEXT) \
-	tests/stub_EventLoop.$(OBJEXT) time.$(OBJEXT) tools.$(OBJEXT) \
-	tests/stub_tunnel.$(OBJEXT) $(am__objects_12) urn.$(OBJEXT) \
+	tests/stub_redirect.$(OBJEXT) refresh.$(OBJEXT) stat.$(OBJEXT) \
+	stmem.$(OBJEXT) store.$(OBJEXT) store_client.$(OBJEXT) \
+	tests/stub_store_digest.$(OBJEXT) store_io.$(OBJEXT) \
+	store_key_md5.$(OBJEXT) store_log.$(OBJEXT) \
+	store_rebuild.$(OBJEXT) tests/stub_store_stats.$(OBJEXT) \
+	store_swapin.$(OBJEXT) store_swapmeta.$(OBJEXT) \
+	store_swapout.$(OBJEXT) time.$(OBJEXT) tools.$(OBJEXT) \
+	tests/stub_tunnel.$(OBJEXT) urn.$(OBJEXT) \
 	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
-	$(am__objects_13) wordlist.$(OBJEXT)
+	wordlist.$(OBJEXT)
 nodist_tests_test_http_range_OBJECTS = $(am__objects_17)
 tests_test_http_range_OBJECTS = $(am_tests_test_http_range_OBJECTS) \
 	$(nodist_tests_test_http_range_OBJECTS)
@@ -2073,25 +2070,27 @@
 	$(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3) \
+	$(am__DEPENDENCIES_1)
 tests_test_http_range_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(tests_test_http_range_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am__ufsdump_SOURCES_DIST = ClientInfo.h cbdata.h cbdata.cc debug.cc \
-	int.h int.cc mem/forward.h MemBuf.cc MemBuf.h Parsing.h \
-	store_key_md5.h store_key_md5.cc tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc String.cc SquidNew.cc tests/stub_time.cc \
-	ufsdump.cc dlink.h dlink.cc helper/ChildConfig.h \
-	tests/stub_HelperChildConfig.cc RemovalPolicy.cc win32.cc fd.h \
-	tests/stub_fd.cc
-am_ufsdump_OBJECTS = cbdata.$(OBJEXT) debug.$(OBJEXT) int.$(OBJEXT) \
-	MemBuf.$(OBJEXT) store_key_md5.$(OBJEXT) \
+am__ufsdump_SOURCES_DIST = win32.cc ClientInfo.h \
+	tests/stub_HelperChildConfig.cc MemBuf.cc MemBuf.h Parsing.h \
+	RemovalPolicy.cc SquidNew.cc tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc String.cc cbdata.cc cbdata.h debug.cc \
+	dlink.cc dlink.h tests/stub_fd.cc fd.h helper/ChildConfig.h \
+	int.cc int.h mem/forward.h store_key_md5.cc store_key_md5.h \
+	tests/stub_time.cc ufsdump.cc
+am_ufsdump_OBJECTS = $(am__objects_12) \
+	tests/stub_HelperChildConfig.$(OBJEXT) MemBuf.$(OBJEXT) \
+	RemovalPolicy.$(OBJEXT) SquidNew.$(OBJEXT) \
 	tests/stub_StoreMeta.$(OBJEXT) StoreMetaUnpacker.$(OBJEXT) \
-	String.$(OBJEXT) SquidNew.$(OBJEXT) tests/stub_time.$(OBJEXT) \
-	ufsdump.$(OBJEXT) dlink.$(OBJEXT) \
-	tests/stub_HelperChildConfig.$(OBJEXT) RemovalPolicy.$(OBJEXT) \
-	$(am__objects_13) tests/stub_fd.$(OBJEXT)
+	String.$(OBJEXT) cbdata.$(OBJEXT) debug.$(OBJEXT) \
+	dlink.$(OBJEXT) tests/stub_fd.$(OBJEXT) int.$(OBJEXT) \
+	store_key_md5.$(OBJEXT) tests/stub_time.$(OBJEXT) \
+	ufsdump.$(OBJEXT)
 nodist_ufsdump_OBJECTS = globals.$(OBJEXT)
 ufsdump_OBJECTS = $(am_ufsdump_OBJECTS) $(nodist_ufsdump_OBJECTS)
 am_unlinkd_OBJECTS = unlinkd_daemon.$(OBJEXT)
@@ -2164,7 +2163,6 @@
 	./$(DEPDIR)/client_side_request.Po ./$(DEPDIR)/comm.Plo \
 	./$(DEPDIR)/debug.Po ./$(DEPDIR)/delay_pools.Po \
 	./$(DEPDIR)/dlink.Po ./$(DEPDIR)/dns_internal.Po \
-	./$(DEPDIR)/err_detail_type.Po ./$(DEPDIR)/err_type.Po \
 	./$(DEPDIR)/errorpage.Po ./$(DEPDIR)/event.Po \
 	./$(DEPDIR)/external_acl.Po ./$(DEPDIR)/fatal.Po \
 	./$(DEPDIR)/fd.Po ./$(DEPDIR)/fde.Po ./$(DEPDIR)/filemap.Po \
@@ -2240,6 +2238,7 @@
 	tests/$(DEPDIR)/stub_libauth_acls.Po \
 	tests/$(DEPDIR)/stub_libcomm.Po \
 	tests/$(DEPDIR)/stub_libdiskio.Po \
+	tests/$(DEPDIR)/stub_liberror.Po \
 	tests/$(DEPDIR)/stub_libeui.Po \
 	tests/$(DEPDIR)/stub_libformat.Po \
 	tests/$(DEPDIR)/stub_libhttp.Po \
@@ -2970,18 +2969,19 @@
 	StoreMetaVary.h
 
 LOADABLE_MODULES_SOURCES = \
-	LoadableModule.h \
 	LoadableModule.cc \
-	LoadableModules.h \
-	LoadableModules.cc
+	LoadableModule.h \
+	LoadableModules.cc \
+	LoadableModules.h
 
-SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format \
-	clients sbuf servers fs repl store DiskIO proxyp \
+SUBDIRS = mem base anyp helper dns ftp parser comm error eui acl \
+	format clients sbuf servers fs repl store DiskIO proxyp \
 	$(am__append_2) http ip icmp ident log ipc mgr $(am__append_3) \
 	security $(am__append_5) $(am__append_6) $(am__append_7)
-DIST_SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format \
-	clients sbuf servers fs repl store DiskIO proxyp auth http ip \
-	icmp ident log ipc mgr ssl security snmp adaptation esi
+DIST_SUBDIRS = mem base anyp helper dns ftp parser comm error eui acl \
+	format clients sbuf servers fs repl store DiskIO proxyp auth \
+	http ip icmp ident log ipc mgr ssl security snmp adaptation \
+	esi
 @ENABLE_AUTH_TRUE@AUTH_LIBS = auth/libauth.la
 @ENABLE_AUTH_TRUE@AUTH_ACL_LIBS = auth/libacls.la
 SSL_LIBS = $(am__append_4)
@@ -3061,106 +3061,109 @@
 cf_gen_SOURCES = cf_gen.cc
 nodist_cf_gen_HEADER = cf_gen_defines.cci
 cf_gen_LDADD = 
-ACL_REGISTRATION_SOURCES = AclRegs.cc AuthReg.cc
+ACL_REGISTRATION_SOURCES = \
+	AclRegs.cc \
+	AuthReg.cc
+
 
 # common library for all the binaries and tests. This is kindof a catch all
 # and smaller libraries split from this are encouraged. Using lt convenience
 # libraries, dependencies should not be a problem either.
 libsquid_la_SOURCES = \
-	comm.cc \
-	comm.h \
 	CommCalls.cc \
 	CommCalls.h \
 	DescriptorSet.cc \
 	DescriptorSet.h \
+	SquidConfig.cc \
 	SquidConfig.h \
-	SquidConfig.cc
+	comm.cc \
+	comm.h
 
-squid_SOURCES = $(ACL_REGISTRATION_SOURCES) AccessLogEntry.cc \
-	AccessLogEntry.h AsyncEngine.cc AsyncEngine.h cache_cf.h \
-	AuthReg.h RefreshPattern.h cache_cf.cc CacheDigest.h \
-	CacheDigest.cc cache_manager.cc NeighborTypeDomainList.h \
-	CachePeer.cc CachePeer.h CacheManager.h carp.h carp.cc \
-	cbdata.cc cbdata.h client_db.h client_db.cc client_side.h \
-	client_side.cc client_side.h client_side_reply.cc \
-	client_side_reply.h client_side_request.cc \
-	client_side_request.h ClientInfo.h BodyPipe.cc BodyPipe.h \
-	ClientInfo.h ClientRequestContext.h clientStream.cc \
-	clientStream.h clientStreamForward.h CollapsedForwarding.cc \
-	CollapsedForwarding.h CollapsingHistory.h CommandLine.cc \
-	CommandLine.h CompletionDispatcher.cc CompletionDispatcher.h \
-	CommRead.h ConfigOption.cc ConfigParser.cc ConfigParser.h \
-	CpuAffinity.cc CpuAffinity.h CpuAffinityMap.cc \
-	CpuAffinityMap.h CpuAffinitySet.cc CpuAffinitySet.h debug.cc \
-	Debug.h defines.h $(DELAY_POOL_SOURCE) fs_io.h fs_io.cc \
-	dlink.h dlink.cc $(DNSSOURCE) Downloader.cc Downloader.h \
-	enums.h err_type.h err_detail_type.h errorpage.cc errorpage.h \
-	ETag.cc ETag.h event.cc event.h EventLoop.h EventLoop.cc \
-	external_acl.cc ExternalACL.h ExternalACLEntry.cc \
-	ExternalACLEntry.h FadingCounter.h FadingCounter.cc fatal.h \
-	fatal.cc fd.h fd.cc fde.cc fde.h FileMap.h filemap.cc \
-	fqdncache.h fqdncache.cc FwdState.cc FwdState.h Generic.h \
-	globals.h gopher.h gopher.cc HappyConnOpener.cc \
-	HappyConnOpener.h helper.cc helper.h hier_code.h \
-	HierarchyLogEntry.h $(HTCPSOURCE) HttpUpgradeProtocolAccess.cc \
-	HttpUpgradeProtocolAccess.h http.cc http.h \
-	HttpHeaderFieldStat.h HttpHdrCc.h HttpHdrCc.cc HttpHdrRange.cc \
+squid_SOURCES = $(ACL_REGISTRATION_SOURCES) $(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) $(HTCPSOURCE) $(IPC_SOURCE) $(LEAKFINDERSOURCE) \
+	$(SNMP_SOURCE) $(STOREMETA_SOURCE) $(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) $(WINSVC_SOURCE) $(XPROF_STATS_SOURCE) \
+	AccessLogEntry.cc AccessLogEntry.h AsyncEngine.cc \
+	AsyncEngine.h AuthReg.h BodyPipe.cc BodyPipe.h CacheDigest.cc \
+	CacheDigest.h CacheManager.h CachePeer.cc CachePeer.h \
+	ClientInfo.h ClientRequestContext.h CollapsedForwarding.cc \
+	CollapsedForwarding.h CollapsingHistory.h CommRead.h \
+	CommandLine.cc CommandLine.h CompletionDispatcher.cc \
+	CompletionDispatcher.h ConfigOption.cc ConfigParser.cc \
+	ConfigParser.h CpuAffinity.cc CpuAffinity.h CpuAffinityMap.cc \
+	CpuAffinityMap.h CpuAffinitySet.cc CpuAffinitySet.h Debug.h \
+	Downloader.cc Downloader.h ETag.cc ETag.h EventLoop.cc \
+	EventLoop.h ExternalACL.h ExternalACLEntry.cc \
+	ExternalACLEntry.h FadingCounter.cc FadingCounter.h FileMap.h \
+	FwdState.cc FwdState.h Generic.h HappyConnOpener.cc \
+	HappyConnOpener.h HierarchyLogEntry.h HttpBody.cc HttpBody.h \
+	HttpControlMsg.cc HttpControlMsg.h HttpHdrCc.cc HttpHdrCc.h \
+	HttpHdrContRange.cc HttpHdrContRange.h HttpHdrRange.cc \
 	HttpHdrSc.cc HttpHdrSc.h HttpHdrScTarget.cc HttpHdrScTarget.h \
-	HttpHdrContRange.cc HttpHdrContRange.h HttpHeaderStat.h \
-	HttpHeader.h HttpHeader.cc HttpHeaderMask.h HttpHeaderRange.h \
-	HttpHeaderFieldInfo.h HttpHeaderTools.h HttpHeaderTools.cc \
-	HttpBody.h HttpBody.cc HttpControlMsg.cc HttpControlMsg.h \
-	HttpReply.cc HttpReply.h RequestFlags.h RequestFlags.cc \
-	HttpRequest.cc HttpRequest.h ICP.h icp_opcode.h icp_v2.cc \
-	icp_v3.cc Instance.h Instance.cc int.h int.cc internal.h \
-	internal.cc $(IPC_SOURCE) ipcache.cc ipcache.h \
-	$(LEAKFINDERSOURCE) LogTags.cc LogTags.h lookup_t.h main.cc \
-	MasterXaction.cc MasterXaction.h mem_node.cc mem_node.h \
-	MemBuf.cc MemObject.cc MemObject.h MessageSizes.h mime.h \
-	mime.cc mime_header.h mime_header.cc multicast.h multicast.cc \
-	neighbors.h neighbors.cc Notes.h Notes.cc Parsing.cc Parsing.h \
-	$(XPROF_STATS_SOURCE) pconn.cc pconn.h PeerDigest.h \
-	peer_digest.cc peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc peer_select.cc peer_sourcehash.h \
-	peer_sourcehash.cc peer_userhash.h peer_userhash.cc \
-	PeerPoolMgr.h PeerPoolMgr.cc PeerSelectState.h PingData.h \
-	Pipeline.cc Pipeline.h protos.h redirect.h redirect.cc \
-	refresh.h refresh.cc RemovalPolicy.cc RemovalPolicy.h \
-	ResolvedPeers.cc ResolvedPeers.h send-announce.h \
-	send-announce.cc SBufStatsAction.h SBufStatsAction.cc \
-	sbuf/StringConvert.h $(SNMP_SOURCE) SquidMath.h SquidMath.cc \
-	SquidNew.cc IoStats.h stat.h stat.cc StatCounters.h \
-	StatCounters.cc StatHist.h StatHist.cc String.cc StrList.h \
-	StrList.cc stmem.cc stmem.h repl_modules.h store.cc Store.h \
-	StoreFileSystem.cc StoreFileSystem.h store_io.cc \
-	StoreIOBuffer.h StoreIOState.cc StoreIOState.h store_client.cc \
-	StoreClient.h store_digest.h store_digest.cc store_key_md5.h \
-	store_key_md5.cc store_log.h store_log.cc store_rebuild.h \
-	store_rebuild.cc store_swapin.h store_swapin.cc \
-	store_swapmeta.cc store_swapout.cc StoreMetaUnpacker.cc \
-	StoreMetaUnpacker.h $(STOREMETA_SOURCE) StoreSearch.h \
-	StoreStats.cc StoreStats.h StoreSwapLogData.cc \
-	StoreSwapLogData.h swap_log_op.h Transients.cc Transients.h \
-	MemStore.cc MemStore.h time.cc TimeOrTag.h tools.h tools.cc \
-	tunnel.cc typedefs.h $(UNLINKDSOURCE) urn.h urn.cc wccp.h \
-	wccp.cc wccp2.h wccp2.cc whois.h whois.cc wordlist.h \
-	wordlist.cc XactionInitiator.h XactionInitiator.cc \
-	XactionStep.h $(WIN32_SOURCE) $(WINSVC_SOURCE) $(am__append_8)
+	HttpHeader.cc HttpHeader.h HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h HttpHeaderMask.h HttpHeaderRange.h \
+	HttpHeaderStat.h HttpHeaderTools.cc HttpHeaderTools.h \
+	HttpReply.cc HttpReply.h HttpRequest.cc HttpRequest.h \
+	HttpUpgradeProtocolAccess.cc HttpUpgradeProtocolAccess.h ICP.h \
+	Instance.cc Instance.h IoStats.h LogTags.cc LogTags.h \
+	MasterXaction.cc MasterXaction.h MemBuf.cc MemObject.cc \
+	MemObject.h MemStore.cc MemStore.h MessageSizes.h \
+	NeighborTypeDomainList.h Notes.cc Notes.h Parsing.cc Parsing.h \
+	PeerDigest.h PeerPoolMgr.cc PeerPoolMgr.h PeerSelectState.h \
+	PingData.h Pipeline.cc Pipeline.h RefreshPattern.h \
+	RemovalPolicy.cc RemovalPolicy.h RequestFlags.cc \
+	RequestFlags.h ResolvedPeers.cc ResolvedPeers.h \
+	SBufStatsAction.cc SBufStatsAction.h SquidMath.cc SquidMath.h \
+	SquidNew.cc StatCounters.cc StatCounters.h StatHist.cc \
+	StatHist.h Store.h StoreClient.h StoreFileSystem.cc \
+	StoreFileSystem.h StoreIOBuffer.h StoreIOState.cc \
+	StoreIOState.h StoreMetaUnpacker.cc StoreMetaUnpacker.h \
+	StoreSearch.h StoreStats.cc StoreStats.h StoreSwapLogData.cc \
+	StoreSwapLogData.h StrList.cc StrList.h String.cc TimeOrTag.h \
+	Transients.cc Transients.h XactionInitiator.cc \
+	XactionInitiator.h XactionStep.h cache_cf.cc cache_cf.h \
+	cache_manager.cc carp.cc carp.h cbdata.cc cbdata.h \
+	clientStream.cc clientStream.h clientStreamForward.h \
+	client_db.cc client_db.h client_side.cc client_side.h \
+	client_side_reply.cc client_side_reply.h \
+	client_side_request.cc client_side_request.h debug.cc \
+	defines.h dlink.cc dlink.h enums.h errorpage.cc errorpage.h \
+	event.cc event.h external_acl.cc fatal.cc fatal.h fd.cc fd.h \
+	fde.cc fde.h filemap.cc fqdncache.cc fqdncache.h fs_io.cc \
+	fs_io.h globals.h gopher.cc gopher.h helper.cc helper.h \
+	hier_code.h http.cc http.h icp_opcode.h icp_v2.cc icp_v3.cc \
+	int.cc int.h internal.cc internal.h ipcache.cc ipcache.h \
+	lookup_t.h main.cc mem_node.cc mem_node.h mime.cc mime.h \
+	mime_header.cc mime_header.h multicast.cc multicast.h \
+	neighbors.cc neighbors.h pconn.cc pconn.h peer_digest.cc \
+	peer_proxy_negotiate_auth.cc peer_proxy_negotiate_auth.h \
+	peer_select.cc peer_sourcehash.cc peer_sourcehash.h \
+	peer_userhash.cc peer_userhash.h protos.h redirect.cc \
+	redirect.h refresh.cc refresh.h repl_modules.h \
+	sbuf/StringConvert.h send-announce.cc send-announce.h stat.cc \
+	stat.h stmem.cc stmem.h store.cc store_client.cc \
+	store_digest.cc store_digest.h store_io.cc store_key_md5.cc \
+	store_key_md5.h store_log.cc store_log.h store_rebuild.cc \
+	store_rebuild.h store_swapin.cc store_swapin.h \
+	store_swapmeta.cc store_swapout.cc swap_log_op.h time.cc \
+	tools.cc tools.h tunnel.cc typedefs.h urn.cc urn.h wccp.cc \
+	wccp.h wccp2.cc wccp2.h whois.cc whois.h wordlist.cc \
+	wordlist.h $(am__append_8)
 EXTRA_squid_SOURCES = \
+	$(DELAY_POOL_ALL_SOURCE) \
+	$(LOADABLE_MODULES_SOURCES) \
+	$(SNMP_ALL_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_ALL_SOURCE) \
 	$(all_AUTHMODULES) \
 	ConfigOption.h \
-	$(DELAY_POOL_ALL_SOURCE) \
+	LeakFinder.cc \
+	LeakFinder.h \
+	ProfStats.cc \
 	htcp.cc \
 	htcp.h \
 	ipc.cc \
-	ipc_win32.cc \
-	ProfStats.cc \
-	LeakFinder.cc \
-	LeakFinder.h \
-	$(SNMP_ALL_SOURCE) \
-	$(UNLINKDSOURCE) \
-	$(WIN32_ALL_SOURCE) \
-	$(LOADABLE_MODULES_SOURCES)
+	ipc_win32.cc
 
 noinst_HEADERS = \
 	MemBuf.h \
@@ -3170,8 +3173,6 @@
 BUILT_SOURCES = \
 	cf_gen_defines.cci \
 	cf_parser.cci \
-	err_type.cc \
-	err_detail_type.cc \
 	globals.cc \
 	hier_code.cc \
 	icp_opcode.cc \
@@ -3188,13 +3189,13 @@
 	helper/libhelper.la http/libhttp.la dns/libdns.la \
 	base/libbase.la libsquid.la ip/libip.la fs/libfs.la \
 	DiskIO/libdiskio.la comm/libcomm.la anyp/libanyp.la \
-	security/libsecurity.la $(SSL_LIBS) ipc/libipc.la \
-	mgr/libmgr.la proxyp/libproxyp.la parser/libparser.la \
-	eui/libeui.la icmp/libicmp.la log/liblog.la \
-	format/libformat.la sbuf/libsbuf.la $(XTRA_OBJS) $(REPL_OBJS) \
-	$(NETTLELIB) $(CRYPTLIB) $(REGEXLIB) $(ADAPTATION_LIBS) \
-	$(ESI_LIBS) $(SNMP_LIBS) mem/libmem.la store/libstore.la \
-	$(top_builddir)/lib/libmisccontainers.la \
+	security/libsecurity.la $(SSL_LIBS) error/liberror.la \
+	ipc/libipc.la mgr/libmgr.la proxyp/libproxyp.la \
+	parser/libparser.la eui/libeui.la icmp/libicmp.la \
+	log/liblog.la format/libformat.la sbuf/libsbuf.la $(XTRA_OBJS) \
+	$(REPL_OBJS) $(NETTLELIB) $(CRYPTLIB) $(REGEXLIB) \
+	$(ADAPTATION_LIBS) $(ESI_LIBS) $(SNMP_LIBS) mem/libmem.la \
+	store/libstore.la $(top_builddir)/lib/libmisccontainers.la \
 	$(top_builddir)/lib/libmiscencoding.la \
 	$(top_builddir)/lib/libmiscutil.la $(SSLLIB) $(EPOLL_LIBS) \
 	$(MINGW_LIBS) $(KRB5LIBS) $(SYSTEMD_LIBS) $(COMPAT_LIB) \
@@ -3207,32 +3208,32 @@
 
 recv_announce_SOURCES = recv-announce.cc
 ufsdump_SOURCES = \
+	$(WIN32_SOURCE) \
 	ClientInfo.h \
-	cbdata.h \
-	cbdata.cc \
-	debug.cc \
-	int.h \
-	int.cc \
-	mem/forward.h \
+	tests/stub_HelperChildConfig.cc \
 	MemBuf.cc \
 	MemBuf.h \
 	Parsing.h \
-	store_key_md5.h \
-	store_key_md5.cc \
+	RemovalPolicy.cc \
+	SquidNew.cc \
 	tests/stub_StoreMeta.cc \
 	StoreMetaUnpacker.cc \
 	String.cc \
-	SquidNew.cc \
-	tests/stub_time.cc \
-	ufsdump.cc \
-	dlink.h \
+	cbdata.cc \
+	cbdata.h \
+	debug.cc \
 	dlink.cc \
-	helper/ChildConfig.h \
-	tests/stub_HelperChildConfig.cc \
-	RemovalPolicy.cc \
-	$(WIN32_SOURCE) \
+	dlink.h \
+	tests/stub_fd.cc \
 	fd.h \
-	tests/stub_fd.cc
+	helper/ChildConfig.h \
+	int.cc \
+	int.h \
+	mem/forward.h \
+	store_key_md5.cc \
+	store_key_md5.h \
+	tests/stub_time.cc \
+	ufsdump.cc
 
 ufsdump_LDADD = \
 	ident/libident.la \
@@ -3345,6 +3346,7 @@
     tests/stub_libauth.cc \
     tests/stub_libcomm.cc \
     tests/stub_libdiskio.cc \
+    tests/stub_liberror.cc \
     tests/stub_libeui.cc \
     tests/stub_libformat.cc \
     tests/stub_libhttp.cc \
@@ -3471,10 +3473,10 @@
 	tests/testLookupTable.h
 
 nodist_tests_testLookupTable_SOURCES = \
+	tests/stub_SBufDetailedStats.cc \
 	base/LookupTable.h \
 	tests/stub_debug.cc \
-	tests/stub_libmem.cc \
-	tests/stub_SBufDetailedStats.cc
+	tests/stub_libmem.cc
 
 tests_testLookupTable_LDADD = \
 	sbuf/libsbuf.la \
@@ -3502,9 +3504,9 @@
 	tests/testYesNoNone.h
 
 nodist_tests_testYesNoNone_SOURCES = \
+	tests/stub_SBuf.cc \
 	base/YesNoNone.h \
-	tests/stub_debug.cc \
-	tests/stub_SBuf.cc
+	tests/stub_debug.cc
 
 tests_testYesNoNone_LDADD = \
 	base/libbase.la \
@@ -3520,18 +3522,18 @@
 	tests/testUriScheme.h
 
 nodist_tests_testURL_SOURCES = \
-	anyp/Uri.h \
-	anyp/UriScheme.h \
+	tests/stub_HelperChildConfig.cc \
+	tests/stub_HttpHeader.cc \
+	tests/stub_HttpRequest.cc \
+	tests/stub_StatHist.cc \
 	String.cc \
 	tests/stub_access_log.cc \
+	anyp/Uri.h \
+	anyp/UriScheme.h \
 	tests/stub_cbdata.cc \
 	tests/stub_debug.cc \
-	tests/stub_HelperChildConfig.cc \
-	tests/stub_HttpHeader.cc \
-	tests/stub_HttpRequest.cc \
 	tests/stub_libhttp.cc \
-	tests/stub_libmem.cc \
-	tests/stub_StatHist.cc
+	tests/stub_libmem.cc
 
 tests_testURL_LDADD = \
 	libsquid.la \
@@ -3564,10 +3566,10 @@
 	tests/testTokenizer.h
 
 nodist_tests_testTokenizer_SOURCES = \
-	parser/Tokenizer.h \
+	tests/stub_StatHist.cc \
 	tests/stub_debug.cc \
 	tests/stub_libmem.cc \
-	tests/stub_StatHist.cc
+	parser/Tokenizer.h
 
 tests_testTokenizer_LDADD = \
 	parser/libparser.la \
@@ -3579,15 +3581,15 @@
 
 tests_testTokenizer_LDFLAGS = $(LIBADD_DL)
 tests_testSBuf_SOURCES = \
-	tests/SBufFindTest.cc \
-	tests/SBufFindTest.h \
 	tests/testSBuf.cc \
-	tests/testSBuf.h
+	tests/testSBuf.h \
+	tests/SBufFindTest.cc \
+	tests/SBufFindTest.h
 
 nodist_tests_testSBuf_SOURCES = \
+	tests/stub_StatHist.cc \
 	tests/stub_debug.cc \
-	tests/stub_libmem.cc \
-	tests/stub_StatHist.cc
+	tests/stub_libmem.cc
 
 tests_testSBuf_LDADD = \
 	sbuf/libsbuf.la \
@@ -3602,9 +3604,9 @@
 	tests/testSBufList.h
 
 nodist_tests_testSBufList_SOURCES = \
+	tests/stub_StatHist.cc \
 	tests/stub_debug.cc \
-	tests/stub_libmem.cc \
-	tests/stub_StatHist.cc
+	tests/stub_libmem.cc
 
 tests_testSBufList_LDADD = \
 	sbuf/libsbuf.la \
@@ -3619,8 +3621,8 @@
 	tests/testString.h
 
 nodist_tests_testString_SOURCES = \
-	String.cc \
 	tests/stub_SBuf.cc \
+	String.cc \
 	tests/stub_debug.cc \
 	tests/stub_libmem.cc
 
@@ -3632,133 +3634,134 @@
 
 tests_testString_LDFLAGS = $(LIBADD_DL)
 @ENABLE_FS_ROCK_TRUE@tests_testRock_SOURCES = \
+@ENABLE_FS_ROCK_TRUE@	$(DELAY_POOL_SOURCE) \
+@ENABLE_FS_ROCK_TRUE@	$(STOREMETA_SOURCE) \
+@ENABLE_FS_ROCK_TRUE@	$(UNLINKDSOURCE) \
 @ENABLE_FS_ROCK_TRUE@	AccessLogEntry.cc \
 @ENABLE_FS_ROCK_TRUE@	AccessLogEntry.h \
-@ENABLE_FS_ROCK_TRUE@	cbdata.cc \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_CacheDigest.cc \
 @ENABLE_FS_ROCK_TRUE@	CacheDigest.h \
-@ENABLE_FS_ROCK_TRUE@	CollapsedForwarding.h \
 @ENABLE_FS_ROCK_TRUE@	CollapsedForwarding.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_CacheDigest.cc \
+@ENABLE_FS_ROCK_TRUE@	CollapsedForwarding.h \
 @ENABLE_FS_ROCK_TRUE@	ConfigOption.cc \
 @ENABLE_FS_ROCK_TRUE@	ConfigParser.cc \
-@ENABLE_FS_ROCK_TRUE@	fs_io.h \
-@ENABLE_FS_ROCK_TRUE@	fs_io.cc \
 @ENABLE_FS_ROCK_TRUE@	ETag.cc \
 @ENABLE_FS_ROCK_TRUE@	EventLoop.cc \
-@ENABLE_FS_ROCK_TRUE@	event.cc \
 @ENABLE_FS_ROCK_TRUE@	FadingCounter.cc \
-@ENABLE_FS_ROCK_TRUE@	fatal.h \
-@ENABLE_FS_ROCK_TRUE@	fatal.cc \
-@ENABLE_FS_ROCK_TRUE@	fd.h \
-@ENABLE_FS_ROCK_TRUE@	fd.cc \
-@ENABLE_FS_ROCK_TRUE@	fde.h \
-@ENABLE_FS_ROCK_TRUE@	fde.cc \
 @ENABLE_FS_ROCK_TRUE@	FileMap.h \
-@ENABLE_FS_ROCK_TRUE@	filemap.cc \
-@ENABLE_FS_ROCK_TRUE@	HttpHeaderFieldStat.h \
-@ENABLE_FS_ROCK_TRUE@	HttpBody.h \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_HelperChildConfig.cc \
 @ENABLE_FS_ROCK_TRUE@	HttpBody.cc \
+@ENABLE_FS_ROCK_TRUE@	HttpBody.h \
 @ENABLE_FS_ROCK_TRUE@	HttpHdrCc.cc \
 @ENABLE_FS_ROCK_TRUE@	HttpHdrContRange.cc \
 @ENABLE_FS_ROCK_TRUE@	HttpHdrRange.cc \
 @ENABLE_FS_ROCK_TRUE@	HttpHdrSc.cc \
 @ENABLE_FS_ROCK_TRUE@	HttpHdrScTarget.cc \
-@ENABLE_FS_ROCK_TRUE@	HttpHeader.h \
 @ENABLE_FS_ROCK_TRUE@	HttpHeader.cc \
+@ENABLE_FS_ROCK_TRUE@	HttpHeader.h \
 @ENABLE_FS_ROCK_TRUE@	HttpHeaderFieldInfo.h \
-@ENABLE_FS_ROCK_TRUE@	HttpHeaderTools.h \
+@ENABLE_FS_ROCK_TRUE@	HttpHeaderFieldStat.h \
 @ENABLE_FS_ROCK_TRUE@	HttpHeaderTools.cc \
+@ENABLE_FS_ROCK_TRUE@	HttpHeaderTools.h \
 @ENABLE_FS_ROCK_TRUE@	HttpReply.cc \
-@ENABLE_FS_ROCK_TRUE@	int.h \
-@ENABLE_FS_ROCK_TRUE@	int.cc \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_HttpRequest.cc \
 @ENABLE_FS_ROCK_TRUE@	LogTags.cc \
 @ENABLE_FS_ROCK_TRUE@	MasterXaction.cc \
 @ENABLE_FS_ROCK_TRUE@	MasterXaction.h \
 @ENABLE_FS_ROCK_TRUE@	MemBuf.cc \
 @ENABLE_FS_ROCK_TRUE@	MemObject.cc \
 @ENABLE_FS_ROCK_TRUE@	MemStore.cc \
-@ENABLE_FS_ROCK_TRUE@	mem_node.cc \
-@ENABLE_FS_ROCK_TRUE@	Notes.h \
 @ENABLE_FS_ROCK_TRUE@	Notes.cc \
+@ENABLE_FS_ROCK_TRUE@	Notes.h \
 @ENABLE_FS_ROCK_TRUE@	Parsing.cc \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_Port.cc \
 @ENABLE_FS_ROCK_TRUE@	RemovalPolicy.cc \
 @ENABLE_FS_ROCK_TRUE@	RequestFlags.cc \
 @ENABLE_FS_ROCK_TRUE@	RequestFlags.h \
 @ENABLE_FS_ROCK_TRUE@	ResolvedPeers.cc \
 @ENABLE_FS_ROCK_TRUE@	ResolvedPeers.h \
-@ENABLE_FS_ROCK_TRUE@	StatCounters.h \
+@ENABLE_FS_ROCK_TRUE@	tests/testRock.cc \
+@ENABLE_FS_ROCK_TRUE@	tests/testRock.h \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_SBufDetailedStats.cc \
 @ENABLE_FS_ROCK_TRUE@	StatCounters.cc \
-@ENABLE_FS_ROCK_TRUE@	StatHist.h \
+@ENABLE_FS_ROCK_TRUE@	StatCounters.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_StatHist.cc \
-@ENABLE_FS_ROCK_TRUE@	stmem.cc \
-@ENABLE_FS_ROCK_TRUE@	repl_modules.h \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_stat.cc \
-@ENABLE_FS_ROCK_TRUE@	store.cc \
+@ENABLE_FS_ROCK_TRUE@	StatHist.h \
 @ENABLE_FS_ROCK_TRUE@	StoreFileSystem.cc \
 @ENABLE_FS_ROCK_TRUE@	StoreIOState.cc \
 @ENABLE_FS_ROCK_TRUE@	StoreMetaUnpacker.cc \
-@ENABLE_FS_ROCK_TRUE@	$(STOREMETA_SOURCE) \
+@ENABLE_FS_ROCK_TRUE@	tests/testStoreSupport.cc \
+@ENABLE_FS_ROCK_TRUE@	tests/testStoreSupport.h \
 @ENABLE_FS_ROCK_TRUE@	StoreSwapLogData.cc \
-@ENABLE_FS_ROCK_TRUE@	store_io.cc \
-@ENABLE_FS_ROCK_TRUE@	store_key_md5.h \
-@ENABLE_FS_ROCK_TRUE@	store_key_md5.cc \
-@ENABLE_FS_ROCK_TRUE@	store_swapmeta.cc \
-@ENABLE_FS_ROCK_TRUE@	store_swapout.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_SBufDetailedStats.cc \
-@ENABLE_FS_ROCK_TRUE@	String.cc \
-@ENABLE_FS_ROCK_TRUE@	StrList.h \
 @ENABLE_FS_ROCK_TRUE@	StrList.cc \
-@ENABLE_FS_ROCK_TRUE@	Transients.h \
+@ENABLE_FS_ROCK_TRUE@	StrList.h \
+@ENABLE_FS_ROCK_TRUE@	String.cc \
 @ENABLE_FS_ROCK_TRUE@	Transients.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/testRock.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/testRock.h \
-@ENABLE_FS_ROCK_TRUE@	tests/testStoreSupport.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/testStoreSupport.h \
-@ENABLE_FS_ROCK_TRUE@	log/access_log.h \
+@ENABLE_FS_ROCK_TRUE@	Transients.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_access_log.cc \
-@ENABLE_FS_ROCK_TRUE@	cache_cf.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_cache_cf.cc \
+@ENABLE_FS_ROCK_TRUE@	cache_cf.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_cache_manager.cc \
+@ENABLE_FS_ROCK_TRUE@	cbdata.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_client_db.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_client_side_request.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_debug.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_errorpage.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_HelperChildConfig.cc \
+@ENABLE_FS_ROCK_TRUE@	event.cc \
+@ENABLE_FS_ROCK_TRUE@	fatal.cc \
+@ENABLE_FS_ROCK_TRUE@	fatal.h \
+@ENABLE_FS_ROCK_TRUE@	fd.cc \
+@ENABLE_FS_ROCK_TRUE@	fd.h \
+@ENABLE_FS_ROCK_TRUE@	fde.cc \
+@ENABLE_FS_ROCK_TRUE@	fde.h \
+@ENABLE_FS_ROCK_TRUE@	filemap.cc \
+@ENABLE_FS_ROCK_TRUE@	fs_io.cc \
+@ENABLE_FS_ROCK_TRUE@	fs_io.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_http.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_HttpRequest.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_libauth.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_icp.cc \
+@ENABLE_FS_ROCK_TRUE@	int.cc \
+@ENABLE_FS_ROCK_TRUE@	int.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_ipc.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_ipcache.cc \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_libanyp.cc \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_libauth.cc \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_liberror.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libeui.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libformat.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libicmp.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_liblog.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libmgr.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_libsecurity.cc \
-@ENABLE_FS_ROCK_TRUE@	mime.h \
+@ENABLE_FS_ROCK_TRUE@	log/access_log.h \
+@ENABLE_FS_ROCK_TRUE@	mem_node.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_mime.cc \
+@ENABLE_FS_ROCK_TRUE@	mime.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_neighbors.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_Port.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_pconn.cc \
+@ENABLE_FS_ROCK_TRUE@	repl_modules.h \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_stat.cc \
+@ENABLE_FS_ROCK_TRUE@	stmem.cc \
+@ENABLE_FS_ROCK_TRUE@	store.cc \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_store_client.cc \
-@ENABLE_FS_ROCK_TRUE@	store_rebuild.h \
+@ENABLE_FS_ROCK_TRUE@	store_io.cc \
+@ENABLE_FS_ROCK_TRUE@	store_key_md5.cc \
+@ENABLE_FS_ROCK_TRUE@	store_key_md5.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_store_rebuild.cc \
+@ENABLE_FS_ROCK_TRUE@	store_rebuild.h \
 @ENABLE_FS_ROCK_TRUE@	tests/stub_store_stats.cc \
-@ENABLE_FS_ROCK_TRUE@	tools.h \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_tools.cc \
+@ENABLE_FS_ROCK_TRUE@	store_swapmeta.cc \
+@ENABLE_FS_ROCK_TRUE@	store_swapout.cc \
 @ENABLE_FS_ROCK_TRUE@	time.cc \
-@ENABLE_FS_ROCK_TRUE@	tests/stub_libanyp.cc \
-@ENABLE_FS_ROCK_TRUE@	wordlist.h \
+@ENABLE_FS_ROCK_TRUE@	tests/stub_tools.cc \
+@ENABLE_FS_ROCK_TRUE@	tools.h \
 @ENABLE_FS_ROCK_TRUE@	wordlist.cc \
-@ENABLE_FS_ROCK_TRUE@	$(DELAY_POOL_SOURCE) \
-@ENABLE_FS_ROCK_TRUE@	$(UNLINKDSOURCE)
+@ENABLE_FS_ROCK_TRUE@	wordlist.h
 
 @ENABLE_FS_ROCK_TRUE@nodist_tests_testRock_SOURCES = \
 @ENABLE_FS_ROCK_TRUE@	$(TESTSOURCES) \
-@ENABLE_FS_ROCK_TRUE@	hier_code.cc \
 @ENABLE_FS_ROCK_TRUE@	SquidMath.cc \
 @ENABLE_FS_ROCK_TRUE@	SquidMath.h \
+@ENABLE_FS_ROCK_TRUE@	hier_code.cc \
 @ENABLE_FS_ROCK_TRUE@	swap_log_op.cc
 
 @ENABLE_FS_ROCK_TRUE@tests_testRock_LDADD = \
@@ -3795,139 +3798,140 @@
 
 @ENABLE_FS_ROCK_TRUE@tests_testRock_LDFLAGS = $(AM_CPPFLAGS) $(LIBADD_DL)
 @ENABLE_FS_UFS_TRUE@tests_testUfs_SOURCES = \
+@ENABLE_FS_UFS_TRUE@	$(DELAY_POOL_SOURCE) \
+@ENABLE_FS_UFS_TRUE@	$(STOREMETA_SOURCE) \
+@ENABLE_FS_UFS_TRUE@	$(UNLINKDSOURCE) \
+@ENABLE_FS_UFS_TRUE@	$(WIN32_SOURCE) \
 @ENABLE_FS_UFS_TRUE@	AccessLogEntry.cc \
 @ENABLE_FS_UFS_TRUE@	AccessLogEntry.h \
-@ENABLE_FS_UFS_TRUE@	tests/testUfs.cc \
-@ENABLE_FS_UFS_TRUE@	tests/testUfs.h \
-@ENABLE_FS_UFS_TRUE@	tests/stub_cache_manager.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_client_db.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_CacheDigest.cc \
+@ENABLE_FS_UFS_TRUE@	CacheDigest.h \
+@ENABLE_FS_UFS_TRUE@	ClientInfo.h \
 @ENABLE_FS_UFS_TRUE@	tests/stub_CollapsedForwarding.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_HelperChildConfig.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_icp.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_ipc.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_ipcache.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libeui.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libicmp.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_liblog.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_neighbors.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_pconn.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_Port.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_UdsOp.cc \
-@ENABLE_FS_UFS_TRUE@	internal.h \
-@ENABLE_FS_UFS_TRUE@	tests/stub_internal.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libformat.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libsecurity.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_stat.cc \
-@ENABLE_FS_UFS_TRUE@	store_rebuild.h \
-@ENABLE_FS_UFS_TRUE@	tests/stub_store_rebuild.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_store_stats.cc \
-@ENABLE_FS_UFS_TRUE@	fatal.h \
-@ENABLE_FS_UFS_TRUE@	tests/stub_fatal.cc \
-@ENABLE_FS_UFS_TRUE@	fd.h \
-@ENABLE_FS_UFS_TRUE@	fd.cc \
-@ENABLE_FS_UFS_TRUE@	fde.h \
-@ENABLE_FS_UFS_TRUE@	fde.cc \
-@ENABLE_FS_UFS_TRUE@	client_db.h \
+@ENABLE_FS_UFS_TRUE@	ConfigOption.cc \
+@ENABLE_FS_UFS_TRUE@	ConfigParser.cc \
+@ENABLE_FS_UFS_TRUE@	ETag.cc \
+@ENABLE_FS_UFS_TRUE@	EventLoop.cc \
 @ENABLE_FS_UFS_TRUE@	FadingCounter.cc \
-@ENABLE_FS_UFS_TRUE@	fs_io.h \
-@ENABLE_FS_UFS_TRUE@	fs_io.cc \
 @ENABLE_FS_UFS_TRUE@	FileMap.h \
-@ENABLE_FS_UFS_TRUE@	filemap.cc \
-@ENABLE_FS_UFS_TRUE@	HttpBody.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_HelperChildConfig.cc \
 @ENABLE_FS_UFS_TRUE@	HttpBody.cc \
+@ENABLE_FS_UFS_TRUE@	HttpBody.h \
+@ENABLE_FS_UFS_TRUE@	HttpHdrCc.cc \
+@ENABLE_FS_UFS_TRUE@	HttpHdrCc.h \
+@ENABLE_FS_UFS_TRUE@	HttpHdrContRange.cc \
+@ENABLE_FS_UFS_TRUE@	HttpHdrRange.cc \
+@ENABLE_FS_UFS_TRUE@	HttpHdrSc.cc \
+@ENABLE_FS_UFS_TRUE@	HttpHdrScTarget.cc \
+@ENABLE_FS_UFS_TRUE@	HttpHeader.cc \
+@ENABLE_FS_UFS_TRUE@	HttpHeader.h \
+@ENABLE_FS_UFS_TRUE@	HttpHeaderFieldInfo.h \
+@ENABLE_FS_UFS_TRUE@	HttpHeaderFieldStat.h \
+@ENABLE_FS_UFS_TRUE@	HttpHeaderTools.cc \
+@ENABLE_FS_UFS_TRUE@	HttpHeaderTools.h \
 @ENABLE_FS_UFS_TRUE@	HttpReply.cc \
-@ENABLE_FS_UFS_TRUE@	int.h \
-@ENABLE_FS_UFS_TRUE@	int.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_HttpRequest.cc \
 @ENABLE_FS_UFS_TRUE@	LogTags.cc \
-@ENABLE_FS_UFS_TRUE@	RequestFlags.h \
-@ENABLE_FS_UFS_TRUE@	RequestFlags.cc \
-@ENABLE_FS_UFS_TRUE@	Transients.cc \
 @ENABLE_FS_UFS_TRUE@	MasterXaction.cc \
 @ENABLE_FS_UFS_TRUE@	MasterXaction.h \
+@ENABLE_FS_UFS_TRUE@	MemBuf.cc \
 @ENABLE_FS_UFS_TRUE@	MemObject.cc \
 @ENABLE_FS_UFS_TRUE@	MemStore.cc \
-@ENABLE_FS_UFS_TRUE@	Notes.h \
 @ENABLE_FS_UFS_TRUE@	Notes.cc \
-@ENABLE_FS_UFS_TRUE@	StoreSwapLogData.cc \
+@ENABLE_FS_UFS_TRUE@	Notes.h \
+@ENABLE_FS_UFS_TRUE@	Parsing.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_Port.cc \
+@ENABLE_FS_UFS_TRUE@	RemovalPolicy.cc \
+@ENABLE_FS_UFS_TRUE@	RequestFlags.cc \
+@ENABLE_FS_UFS_TRUE@	RequestFlags.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_SBufDetailedStats.cc \
+@ENABLE_FS_UFS_TRUE@	StatCounters.cc \
+@ENABLE_FS_UFS_TRUE@	StatCounters.h \
+@ENABLE_FS_UFS_TRUE@	StatHist.cc \
+@ENABLE_FS_UFS_TRUE@	StatHist.h \
+@ENABLE_FS_UFS_TRUE@	StoreFileSystem.cc \
 @ENABLE_FS_UFS_TRUE@	StoreIOState.cc \
 @ENABLE_FS_UFS_TRUE@	StoreMetaUnpacker.cc \
-@ENABLE_FS_UFS_TRUE@	$(STOREMETA_SOURCE) \
-@ENABLE_FS_UFS_TRUE@	StoreFileSystem.cc \
-@ENABLE_FS_UFS_TRUE@	store_io.cc \
-@ENABLE_FS_UFS_TRUE@	store_swapout.cc \
-@ENABLE_FS_UFS_TRUE@	store_swapmeta.cc \
-@ENABLE_FS_UFS_TRUE@	$(UNLINKDSOURCE) \
-@ENABLE_FS_UFS_TRUE@	$(WIN32_SOURCE) \
-@ENABLE_FS_UFS_TRUE@	event.cc \
-@ENABLE_FS_UFS_TRUE@	$(DELAY_POOL_SOURCE) \
-@ENABLE_FS_UFS_TRUE@	CacheDigest.h \
-@ENABLE_FS_UFS_TRUE@	tests/stub_CacheDigest.cc \
-@ENABLE_FS_UFS_TRUE@	ConfigParser.cc \
-@ENABLE_FS_UFS_TRUE@	EventLoop.cc \
-@ENABLE_FS_UFS_TRUE@	RemovalPolicy.cc \
-@ENABLE_FS_UFS_TRUE@	repl_modules.h \
-@ENABLE_FS_UFS_TRUE@	store.cc \
-@ENABLE_FS_UFS_TRUE@	store_key_md5.h \
-@ENABLE_FS_UFS_TRUE@	store_key_md5.cc \
-@ENABLE_FS_UFS_TRUE@	Parsing.cc \
-@ENABLE_FS_UFS_TRUE@	ConfigOption.cc \
+@ENABLE_FS_UFS_TRUE@	tests/testStoreSupport.cc \
+@ENABLE_FS_UFS_TRUE@	tests/testStoreSupport.h \
+@ENABLE_FS_UFS_TRUE@	StoreSwapLogData.cc \
+@ENABLE_FS_UFS_TRUE@	StrList.cc \
+@ENABLE_FS_UFS_TRUE@	StrList.h \
+@ENABLE_FS_UFS_TRUE@	String.cc \
+@ENABLE_FS_UFS_TRUE@	Transients.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_UdsOp.cc \
+@ENABLE_FS_UFS_TRUE@	tests/testUfs.cc \
+@ENABLE_FS_UFS_TRUE@	tests/testUfs.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_access_log.cc \
 @ENABLE_FS_UFS_TRUE@	tests/stub_acl.cc \
-@ENABLE_FS_UFS_TRUE@	cache_cf.h \
 @ENABLE_FS_UFS_TRUE@	tests/stub_cache_cf.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_helper.cc \
+@ENABLE_FS_UFS_TRUE@	cache_cf.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_cache_manager.cc \
 @ENABLE_FS_UFS_TRUE@	cbdata.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_SBufDetailedStats.cc \
-@ENABLE_FS_UFS_TRUE@	String.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_debug.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_client_db.cc \
+@ENABLE_FS_UFS_TRUE@	client_db.h \
 @ENABLE_FS_UFS_TRUE@	tests/stub_client_side_request.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_debug.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_errorpage.cc \
+@ENABLE_FS_UFS_TRUE@	event.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_fatal.cc \
+@ENABLE_FS_UFS_TRUE@	fatal.h \
+@ENABLE_FS_UFS_TRUE@	fd.cc \
+@ENABLE_FS_UFS_TRUE@	fd.h \
+@ENABLE_FS_UFS_TRUE@	fde.cc \
+@ENABLE_FS_UFS_TRUE@	fde.h \
+@ENABLE_FS_UFS_TRUE@	filemap.cc \
+@ENABLE_FS_UFS_TRUE@	fs_io.cc \
+@ENABLE_FS_UFS_TRUE@	fs_io.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_helper.cc \
 @ENABLE_FS_UFS_TRUE@	tests/stub_http.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_icp.cc \
+@ENABLE_FS_UFS_TRUE@	int.cc \
+@ENABLE_FS_UFS_TRUE@	int.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_internal.cc \
+@ENABLE_FS_UFS_TRUE@	internal.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_ipc.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_ipcache.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libanyp.cc \
 @ENABLE_FS_UFS_TRUE@	tests/stub_libauth.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_liberror.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libeui.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libformat.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libicmp.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_liblog.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_libsecurity.cc \
+@ENABLE_FS_UFS_TRUE@	log/access_log.h \
 @ENABLE_FS_UFS_TRUE@	mem_node.cc \
-@ENABLE_FS_UFS_TRUE@	stmem.cc \
-@ENABLE_FS_UFS_TRUE@	mime.h \
 @ENABLE_FS_UFS_TRUE@	tests/stub_mime.cc \
-@ENABLE_FS_UFS_TRUE@	HttpHeaderFieldInfo.h \
-@ENABLE_FS_UFS_TRUE@	HttpHeaderTools.h \
-@ENABLE_FS_UFS_TRUE@	HttpHeaderTools.cc \
-@ENABLE_FS_UFS_TRUE@	HttpHeader.h \
-@ENABLE_FS_UFS_TRUE@	HttpHeader.cc \
-@ENABLE_FS_UFS_TRUE@	ClientInfo.h \
-@ENABLE_FS_UFS_TRUE@	MemBuf.cc \
-@ENABLE_FS_UFS_TRUE@	HttpHdrContRange.cc \
-@ENABLE_FS_UFS_TRUE@	HttpHeaderFieldStat.h \
-@ENABLE_FS_UFS_TRUE@	HttpHdrCc.h \
-@ENABLE_FS_UFS_TRUE@	HttpHdrCc.cc \
-@ENABLE_FS_UFS_TRUE@	HttpHdrSc.cc \
-@ENABLE_FS_UFS_TRUE@	HttpHdrScTarget.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_libanyp.cc \
-@ENABLE_FS_UFS_TRUE@	StatCounters.h \
-@ENABLE_FS_UFS_TRUE@	StatCounters.cc \
-@ENABLE_FS_UFS_TRUE@	StatHist.h \
-@ENABLE_FS_UFS_TRUE@	StatHist.cc \
-@ENABLE_FS_UFS_TRUE@	StrList.h \
-@ENABLE_FS_UFS_TRUE@	StrList.cc \
-@ENABLE_FS_UFS_TRUE@	HttpHdrRange.cc \
-@ENABLE_FS_UFS_TRUE@	ETag.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_errorpage.cc \
-@ENABLE_FS_UFS_TRUE@	tests/stub_HttpRequest.cc \
-@ENABLE_FS_UFS_TRUE@	log/access_log.h \
-@ENABLE_FS_UFS_TRUE@	tests/stub_access_log.cc \
-@ENABLE_FS_UFS_TRUE@	refresh.h \
+@ENABLE_FS_UFS_TRUE@	mime.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_neighbors.cc \
+@ENABLE_FS_UFS_TRUE@	tests/stub_pconn.cc \
 @ENABLE_FS_UFS_TRUE@	refresh.cc \
+@ENABLE_FS_UFS_TRUE@	refresh.h \
+@ENABLE_FS_UFS_TRUE@	repl_modules.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_stat.cc \
+@ENABLE_FS_UFS_TRUE@	stmem.cc \
+@ENABLE_FS_UFS_TRUE@	store.cc \
 @ENABLE_FS_UFS_TRUE@	tests/stub_store_client.cc \
-@ENABLE_FS_UFS_TRUE@	tools.h \
-@ENABLE_FS_UFS_TRUE@	tests/stub_tools.cc \
-@ENABLE_FS_UFS_TRUE@	tests/testStoreSupport.cc \
-@ENABLE_FS_UFS_TRUE@	tests/testStoreSupport.h \
+@ENABLE_FS_UFS_TRUE@	store_io.cc \
+@ENABLE_FS_UFS_TRUE@	store_key_md5.cc \
+@ENABLE_FS_UFS_TRUE@	store_key_md5.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_store_rebuild.cc \
+@ENABLE_FS_UFS_TRUE@	store_rebuild.h \
+@ENABLE_FS_UFS_TRUE@	tests/stub_store_stats.cc \
+@ENABLE_FS_UFS_TRUE@	store_swapmeta.cc \
+@ENABLE_FS_UFS_TRUE@	store_swapout.cc \
 @ENABLE_FS_UFS_TRUE@	time.cc \
-@ENABLE_FS_UFS_TRUE@	wordlist.h \
-@ENABLE_FS_UFS_TRUE@	wordlist.cc
+@ENABLE_FS_UFS_TRUE@	tests/stub_tools.cc \
+@ENABLE_FS_UFS_TRUE@	tools.h \
+@ENABLE_FS_UFS_TRUE@	wordlist.cc \
+@ENABLE_FS_UFS_TRUE@	wordlist.h
 
 @ENABLE_FS_UFS_TRUE@nodist_tests_testUfs_SOURCES = \
 @ENABLE_FS_UFS_TRUE@	$(TESTSOURCES) \
-@ENABLE_FS_UFS_TRUE@	hier_code.cc \
 @ENABLE_FS_UFS_TRUE@	SquidMath.cc \
 @ENABLE_FS_UFS_TRUE@	SquidMath.h \
+@ENABLE_FS_UFS_TRUE@	hier_code.cc \
 @ENABLE_FS_UFS_TRUE@	swap_log_op.cc
 
 @ENABLE_FS_UFS_TRUE@tests_testUfs_LDADD = \
@@ -3969,133 +3973,134 @@
 
 @ENABLE_FS_UFS_TRUE@tests_testUfs_LDFLAGS = $(LIBADD_DL)
 tests_testStore_SOURCES = \
-	CacheDigest.h \
+	$(DELAY_POOL_SOURCE) \
 	tests/stub_CacheDigest.cc \
-	cbdata.cc \
+	CacheDigest.h \
 	ClientInfo.h \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
 	ETag.cc \
-	event.cc \
 	EventLoop.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
 	FileMap.h \
-	filemap.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	tests/stub_HelperChildConfig.cc \
+	HttpBody.cc \
+	HttpBody.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
 	HttpHeaderTools.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	RequestFlags.cc \
-	RequestFlags.h \
-	int.h \
-	int.cc \
+	HttpHeaderTools.h \
+	tests/stub_HttpReply.cc \
+	tests/stub_HttpRequest.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
-	mem_node.cc \
 	MemBuf.cc \
 	MemObject.cc \
 	MemStore.cc \
-	Notes.h \
 	Notes.cc \
+	Notes.h \
+	tests/testPackableStream.cc \
+	tests/testPackableStream.h \
 	Parsing.cc \
+	tests/stub_Port.cc \
 	RemovalPolicy.cc \
-	refresh.h \
-	refresh.cc \
-	StatCounters.h \
+	RequestFlags.cc \
+	RequestFlags.h \
+	tests/stub_SBufDetailedStats.cc \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	StatHist.cc \
-	stmem.cc \
-	repl_modules.h \
-	store.cc \
-	store_io.cc \
-	store_swapout.cc \
+	StatHist.h \
+	tests/testStore.cc \
+	tests/testStore.h \
+	tests/testStoreController.cc \
+	tests/testStoreController.h \
+	tests/testStoreHashIndex.cc \
+	tests/testStoreHashIndex.h \
 	StoreIOState.cc \
 	tests/stub_StoreMeta.cc \
 	StoreMetaUnpacker.cc \
+	tests/testStoreSupport.cc \
+	tests/testStoreSupport.h \
 	StoreSwapLogData.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	tests/stub_SBufDetailedStats.cc \
-	String.cc \
-	StrList.h \
 	StrList.cc \
-	tests/CapturingStoreEntry.h \
-	log/access_log.h \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_UdsOp.cc \
 	tests/stub_access_log.cc \
 	tests/stub_acl.cc \
-	cache_cf.h \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
+	cbdata.cc \
 	tests/stub_client_side_request.cc \
 	tests/stub_comm.cc \
 	tests/stub_debug.cc \
 	tests/stub_errorpage.cc \
+	event.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	tests/stub_fd.cc \
 	fd.h \
 	fde.h \
-	tests/stub_fd.cc \
+	filemap.cc \
+	fs_io.cc \
+	fs_io.h \
 	tests/stub_helper.cc \
-	tests/stub_HelperChildConfig.cc \
 	tests/stub_http.cc \
+	int.cc \
+	int.h \
+	tests/stub_libanyp.cc \
 	tests/stub_libauth.cc \
-	tests/stub_libeui.cc \
+	tests/stub_libcomm.cc \
 	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
 	tests/stub_libformat.cc \
 	tests/stub_libsecurity.cc \
 	tests/stub_libsslsquid.cc \
-	HttpBody.h \
-	HttpBody.cc \
-	tests/stub_HttpReply.cc \
-	tests/stub_HttpRequest.cc \
-	tests/stub_libcomm.cc \
-	mime.h \
+	log/access_log.h \
+	mem_node.cc \
 	tests/stub_mime.cc \
-	tests/stub_Port.cc \
+	mime.h \
+	refresh.cc \
+	refresh.h \
+	repl_modules.h \
 	tests/stub_stat.cc \
+	stmem.cc \
+	store.cc \
 	tests/stub_store_client.cc \
-	tests/stub_store_stats.cc \
-	store_rebuild.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
 	tests/stub_store_rebuild.cc \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
+	store_swapout.cc \
 	tests/stub_store_swapout.cc \
-	tools.h \
-	Transients.cc \
-	tests/stub_tools.cc \
-	tests/stub_UdsOp.cc \
-	tests/testPackableStream.cc \
-	tests/testPackableStream.h \
-	tests/testStore.cc \
-	tests/testStore.h \
-	tests/testStoreController.cc \
-	tests/testStoreController.h \
-	tests/testStoreHashIndex.cc \
-	tests/testStoreHashIndex.h \
-	tests/testStoreSupport.cc \
-	tests/testStoreSupport.h \
+	tests/CapturingStoreEntry.h \
 	tests/TestSwapDir.cc \
 	tests/TestSwapDir.h \
 	tests/stub_time.cc \
-	tests/stub_libanyp.cc \
-	wordlist.h \
-	wordlist.cc
+	tests/stub_tools.cc \
+	tools.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testStore_SOURCES = \
+	$(TESTSOURCES) \
 	SquidMath.cc \
 	SquidMath.h \
-	swap_log_op.cc \
-	$(TESTSOURCES)
+	swap_log_op.cc
 
 tests_testStore_LDADD = \
 	libsquid.la \
@@ -4129,144 +4134,145 @@
 
 tests_testStore_LDFLAGS = $(LIBADD_DL)
 tests_testDiskIO_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
 	AccessLogEntry.h \
-	CacheDigest.h \
 	tests/stub_CacheDigest.cc \
-	cbdata.cc \
-	client_db.h \
+	CacheDigest.h \
 	ClientInfo.h \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
-	$(DELAY_POOL_SOURCE) \
-	FadingCounter.cc \
-	fs_io.h \
-	fs_io.cc \
+	tests/testDiskIO.cc \
+	tests/testDiskIO.h \
 	tests/stub_ETag.cc \
 	EventLoop.cc \
-	event.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.h \
-	fde.cc \
+	FadingCounter.cc \
 	FileMap.h \
-	filemap.cc \
-	HttpBody.h \
+	tests/stub_HelperChildConfig.cc \
 	HttpBody.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	HttpBody.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
+	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
-	HttpHdrRange.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
 	HttpHeaderTools.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	int.h \
-	int.cc \
+	tests/stub_HttpRequest.cc \
 	LogTags.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemObject.cc \
-	mem_node.cc \
-	Notes.h \
+	tests/stub_MemStore.cc \
 	Notes.cc \
+	Notes.h \
 	Parsing.cc \
-	refresh.h \
-	refresh.cc \
+	tests/stub_Port.cc \
 	RemovalPolicy.cc \
-	RequestFlags.h \
 	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
 	ResolvedPeers.h \
-	tests/stub_libsecurity.cc \
-	StatCounters.h \
+	tests/stub_SBufDetailedStats.cc \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	tests/stub_StatHist.cc \
-	stmem.cc \
-	tests/stub_SBufDetailedStats.cc \
+	StatHist.h \
 	StoreFileSystem.cc \
 	StoreIOState.cc \
 	tests/stub_StoreMeta.cc \
 	StoreMetaUnpacker.cc \
+	tests/testStoreSupport.cc \
+	tests/testStoreSupport.h \
 	StoreSwapLogData.cc \
-	store_io.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	store_swapout.cc \
-	store_swapmeta.cc \
-	repl_modules.h \
-	store.cc \
-	String.cc \
-	StrList.h \
 	StrList.cc \
-	tests/stub_libstore.cc \
+	StrList.h \
+	String.cc \
 	Transients.cc \
-	log/access_log.h \
+	tests/stub_UdsOp.cc \
 	tests/stub_access_log.cc \
 	tests/stub_acl.cc \
-	cache_cf.h \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
+	cbdata.cc \
 	tests/stub_client_db.cc \
-	client_side_request.h \
+	client_db.h \
 	tests/stub_client_side_request.cc \
+	client_side_request.h \
 	tests/stub_debug.cc \
 	tests/stub_errorpage.cc \
+	event.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	fde.h \
+	filemap.cc \
+	fs_io.cc \
+	fs_io.h \
 	tests/stub_helper.cc \
-	tests/stub_HelperChildConfig.cc \
-	tests/stub_HttpRequest.cc \
 	tests/stub_http.cc \
 	tests/stub_icp.cc \
-	internal.h \
+	int.cc \
+	int.h \
 	tests/stub_internal.cc \
+	internal.h \
 	tests/stub_ipc.cc \
 	tests/stub_ipcache.cc \
-	tests/stub_libauth_acls.cc \
+	tests/stub_libanyp.cc \
 	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
+	tests/stub_liberror.cc \
 	tests/stub_libeui.cc \
 	tests/stub_libformat.cc \
 	tests/stub_libicmp.cc \
 	tests/stub_liblog.cc \
-	tests/stub_MemStore.cc \
-	mime.h \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	log/access_log.h \
+	mem_node.cc \
 	tests/stub_mime.cc \
+	mime.h \
 	tests/stub_neighbors.cc \
 	tests/stub_pconn.cc \
-	tests/stub_Port.cc \
+	refresh.cc \
+	refresh.h \
+	repl_modules.h \
 	tests/stub_stat.cc \
+	stmem.cc \
+	store.cc \
 	tests/stub_store_client.cc \
-	tests/stub_store_stats.cc \
-	store_rebuild.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
 	tests/stub_store_rebuild.cc \
-	tests/stub_UdsOp.cc \
-	tests/testDiskIO.cc \
-	tests/testDiskIO.h \
-	tests/testStoreSupport.cc \
-	tests/testStoreSupport.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
+	store_swapmeta.cc \
+	store_swapout.cc \
 	tests/stub_time.cc \
-	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc \
+	tests/stub_tools.cc \
 	tools.h \
-	tests/stub_tools.cc
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testDiskIO_SOURCES = \
 	$(TESTSOURCES) \
-	hier_code.cc \
 	SquidMath.cc \
 	SquidMath.h \
+	hier_code.cc \
 	swap_log_op.cc
 
 tests_testDiskIO_LDADD = \
@@ -4312,26 +4318,26 @@
 
 @ENABLE_AUTH_TRUE@nodist_tests_testACLMaxUserIP_SOURCES = \
 @ENABLE_AUTH_TRUE@	ConfigParser.cc \
-@ENABLE_AUTH_TRUE@	dlink.cc \
-@ENABLE_AUTH_TRUE@	globals.cc \
+@ENABLE_AUTH_TRUE@	tests/stub_HelperChildConfig.cc \
+@ENABLE_AUTH_TRUE@	tests/stub_HttpHeader.cc \
+@ENABLE_AUTH_TRUE@	tests/stub_HttpRequest.cc \
+@ENABLE_AUTH_TRUE@	tests/stub_MemBuf.cc \
 @ENABLE_AUTH_TRUE@	Parsing.cc \
+@ENABLE_AUTH_TRUE@	tests/stub_StatHist.cc \
 @ENABLE_AUTH_TRUE@	String.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_access_log.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_cache_cf.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_cbdata.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_client_side.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_debug.cc \
+@ENABLE_AUTH_TRUE@	dlink.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_errorpage.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_fatal.cc \
-@ENABLE_AUTH_TRUE@	tests/stub_HelperChildConfig.cc \
-@ENABLE_AUTH_TRUE@	tests/stub_HttpHeader.cc \
-@ENABLE_AUTH_TRUE@	tests/stub_HttpRequest.cc \
+@ENABLE_AUTH_TRUE@	globals.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_libauth.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_libhttp.cc \
 @ENABLE_AUTH_TRUE@	tests/stub_libmem.cc \
-@ENABLE_AUTH_TRUE@	tests/stub_libsecurity.cc \
-@ENABLE_AUTH_TRUE@	tests/stub_MemBuf.cc \
-@ENABLE_AUTH_TRUE@	tests/stub_StatHist.cc
+@ENABLE_AUTH_TRUE@	tests/stub_libsecurity.cc
 
 @ENABLE_AUTH_TRUE@tests_testACLMaxUserIP_LDADD = \
 @ENABLE_AUTH_TRUE@	$(AUTH_ACL_LIBS) \
@@ -4350,26 +4356,21 @@
 
 @ENABLE_AUTH_TRUE@tests_testACLMaxUserIP_LDFLAGS = $(LIBADD_DL)
 tests_test_http_range_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
-	BodyPipe.cc \
-	cache_cf.h \
 	AuthReg.h \
-	RefreshPattern.h \
+	BodyPipe.cc \
+	tests/stub_CacheDigest.cc \
+	CacheDigest.h \
 	CachePeer.cc \
 	CachePeer.h \
-	cache_manager.cc \
-	CacheDigest.h \
-	tests/stub_CacheDigest.cc \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -4377,166 +4378,172 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	debug.cc \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	event.cc \
+	tests/stub_EventLoop.cc \
 	FadingCounter.cc \
-	fatal.h \
-	tests/stub_libauth.cc \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	hier_code.h \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
+	HttpBody.h \
 	tests/stub_HttpControlMsg.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
-	HttpHeader.h \
 	HttpHeader.cc \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
 	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	PeerPoolMgr.h \
-	PeerPoolMgr.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
 	HttpRequest.cc \
-	icp_v2.cc \
-	icp_v3.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
 	LogTags.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemObject.cc \
-	tests/stub_libmem.cc \
-	mem_node.cc \
-	mime.h \
-	mime.cc \
-	mime_header.h \
-	mime_header.cc \
-	multicast.h \
-	multicast.cc \
-	neighbors.h \
-	neighbors.cc \
+	tests/stub_MemStore.cc \
 	Notes.cc \
 	Notes.h \
 	Parsing.cc \
-	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc \
-	peer_select.cc \
-	peer_sourcehash.h \
-	peer_sourcehash.cc \
-	peer_userhash.h \
-	peer_userhash.cc \
+	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
 	Pipeline.cc \
 	Pipeline.h \
-	pconn.cc \
-	redirect.h \
-	tests/stub_redirect.cc \
-	refresh.h \
-	refresh.cc \
+	RefreshPattern.h \
 	RemovalPolicy.cc \
+	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
 	ResolvedPeers.h \
 	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
 	SquidMath.cc \
-	IoStats.h \
-	stat.h \
-	stat.cc \
-	StatCounters.h \
+	SquidMath.h \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	StatHist.cc \
-	stmem.cc \
-	repl_modules.h \
-	store.cc \
-	store_client.cc \
-	store_digest.h \
-	tests/stub_store_digest.cc \
-	store_key_md5.h \
-	store_key_md5.cc \
-	store_io.cc \
-	store_log.h \
-	store_log.cc \
-	store_rebuild.h \
-	store_rebuild.cc \
-	store_swapin.h \
-	store_swapin.cc \
-	store_swapmeta.cc \
-	store_swapout.cc \
+	StatHist.h \
 	StoreFileSystem.cc \
 	StoreIOState.cc \
 	tests/stub_StoreMeta.cc \
 	StoreMetaUnpacker.cc \
 	StoreSwapLogData.cc \
-	String.cc \
-	StrList.h \
 	StrList.cc \
-	tests/stub_libstore.cc \
+	StrList.h \
+	String.cc \
 	Transients.cc \
 	tests/test_http_range.cc \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
 	tests/stub_external_acl.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
 	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
+	tests/stub_libauth.cc \
 	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
 	tests/stub_libeui.cc \
+	tests/stub_libmem.cc \
 	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
 	tests/stub_main_cc.cc \
-	tests/stub_MemStore.cc \
+	mem_node.cc \
+	mime.cc \
+	mime.h \
+	mime_header.cc \
+	mime_header.h \
+	multicast.cc \
+	multicast.h \
+	neighbors.cc \
+	neighbors.h \
+	pconn.cc \
+	peer_digest.cc \
+	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
+	peer_select.cc \
+	peer_sourcehash.cc \
+	peer_sourcehash.h \
+	peer_userhash.cc \
+	peer_userhash.h \
+	tests/stub_redirect.cc \
+	redirect.h \
+	refresh.cc \
+	refresh.h \
+	repl_modules.h \
+	stat.cc \
+	stat.h \
+	stmem.cc \
+	store.cc \
+	store_client.cc \
+	tests/stub_store_digest.cc \
+	store_digest.h \
+	store_io.cc \
+	store_key_md5.cc \
+	store_key_md5.h \
+	store_log.cc \
+	store_log.h \
+	store_rebuild.cc \
+	store_rebuild.h \
 	tests/stub_store_stats.cc \
-	tests/stub_EventLoop.cc \
+	store_swapin.cc \
+	store_swapin.h \
+	store_swapmeta.cc \
+	store_swapout.cc \
 	time.cc \
-	tools.h \
 	tools.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_test_http_range_SOURCES = \
 	$(BUILT_SOURCES)
@@ -4581,40 +4588,41 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 
 tests_test_http_range_LDFLAGS = $(LIBADD_DL)
 tests_testHttp1Parser_SOURCES = \
 	Debug.h \
+	tests/stub_HelperChildConfig.cc \
+	tests/testHttp1Parser.cc \
+	tests/testHttp1Parser.h \
 	MemBuf.cc \
 	MemBuf.h \
 	tests/stub_MemObject.cc \
-	mime_header.cc \
-	mime_header.h \
-	String.cc \
-	cache_cf.h \
 	tests/stub_SBufDetailedStats.cc \
+	String.cc \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
-	tests/stub_comm.cc \
 	tests/stub_cbdata.cc \
+	tests/stub_comm.cc \
 	tests/stub_debug.cc \
 	tests/stub_event.cc \
-	tests/stub_HelperChildConfig.cc \
+	tests/stub_libanyp.cc \
 	tests/stub_libmem.cc \
 	tests/stub_libsecurity.cc \
+	mime_header.cc \
+	mime_header.h \
 	tests/stub_stmem.cc \
 	tests/stub_store.cc \
 	tests/stub_store_stats.cc \
-	tools.h \
-	tests/stub_tools.cc \
-	tests/testHttp1Parser.cc \
-	tests/testHttp1Parser.h \
 	tests/stub_time.cc \
-	tests/stub_libanyp.cc \
-	wordlist.h \
-	wordlist.cc
+	tests/stub_tools.cc \
+	tools.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testHttp1Parser_SOURCES = \
 	$(TESTSOURCES)
@@ -4635,17 +4643,15 @@
 
 tests_testHttp1Parser_LDFLAGS = $(LIBADD_DL)
 tests_testHttpReply_SOURCES = \
-	cbdata.cc \
-	cbdata.h \
 	ConfigParser.cc \
 	tests/stub_ETag.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	HttpBody.h \
+	tests/stub_HelperChildConfig.cc \
 	HttpBody.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	HttpBody.h \
+	HttpControlMsg.cc \
+	HttpControlMsg.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrContRange.h \
 	HttpHdrRange.cc \
@@ -4653,63 +4659,66 @@
 	HttpHdrSc.h \
 	HttpHdrScTarget.cc \
 	HttpHdrScTarget.h \
-	HttpHeader.h \
 	HttpHeader.cc \
-	HttpHeaderMask.h \
+	HttpHeader.h \
 	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderMask.h \
 	HttpHeaderTools.cc \
-	HttpControlMsg.cc \
-	HttpControlMsg.h \
+	HttpHeaderTools.h \
 	HttpReply.cc \
+	tests/testHttpReply.cc \
 	HttpReply.h \
+	tests/testHttpReply.h \
+	tests/stub_HttpRequest.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemBuf.h \
-	mime_header.h \
-	mime_header.cc \
-	Notes.h \
 	Notes.cc \
+	Notes.h \
+	tests/stub_SBufDetailedStats.cc \
 	SquidString.h \
 	SquidTime.h \
-	tests/stub_SBufDetailedStats.cc \
-	String.cc \
-	StrList.h \
+	StatCounters.cc \
+	StatCounters.h \
+	tests/stub_StatHist.cc \
+	StatHist.h \
 	StrList.cc \
-	log/access_log.h \
+	StrList.h \
+	String.cc \
 	tests/stub_access_log.cc \
-	cache_cf.h \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cache_manager.cc \
+	cbdata.cc \
+	cbdata.h \
 	tests/stub_comm.cc \
 	tests/stub_debug.cc \
 	tests/stub_errorpage.cc \
 	tests/stub_event.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
 	tests/stub_fd.cc \
-	tests/stub_HelperChildConfig.cc \
-	tests/stub_libformat.cc \
+	tests/stub_libanyp.cc \
 	tests/stub_libauth.cc \
 	tests/stub_libcomm.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libformat.cc \
 	tests/stub_libmgr.cc \
 	tests/stub_libsecurity.cc \
 	tests/stub_libsslsquid.cc \
-	StatCounters.h \
-	StatCounters.cc \
-	StatHist.h \
-	tests/stub_StatHist.cc \
+	log/access_log.h \
+	mime_header.cc \
+	mime_header.h \
 	repl_modules.h \
 	tests/stub_store.cc \
 	tests/stub_store_stats.cc \
-	tools.h \
-	tests/stub_tools.cc \
-	tests/stub_HttpRequest.cc \
-	tests/testHttpReply.cc \
-	tests/testHttpReply.h \
 	tests/stub_time.cc \
-	tests/stub_libanyp.cc \
-	wordlist.h \
-	wordlist.cc
+	tests/stub_tools.cc \
+	tools.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testHttpReply_SOURCES = \
 	$(TESTSOURCES) \
@@ -4739,44 +4748,20 @@
 
 tests_testHttpReply_LDFLAGS = $(LIBADD_DL)
 tests_testHttpRequest_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
-	HttpRequest.cc \
-	tests/stub_libmem.cc \
-	String.cc \
-	tests/testHttpRequest.h \
-	tests/testHttpRequest.cc \
-	tests/testHttpRequestMethod.h \
-	tests/testHttpRequestMethod.cc \
-	tests/stub_libauth.cc \
-	tests/stub_main_cc.cc \
-	tests/stub_ipc_Forwarder.cc \
-	tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc \
-	tests/stub_store_stats.cc \
-	tests/stub_EventLoop.cc \
-	time.cc \
-	BodyPipe.cc \
-	cache_manager.cc \
-	cache_cf.h \
 	AuthReg.h \
-	RefreshPattern.h \
-	debug.cc \
-	CacheDigest.h \
+	BodyPipe.cc \
 	tests/stub_CacheDigest.cc \
+	CacheDigest.h \
 	CachePeer.cc \
 	CachePeer.h \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -4784,150 +4769,175 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	external_acl.cc \
+	tests/stub_EventLoop.cc \
 	ExternalACLEntry.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
-	fqdncache.h \
-	fqdncache.cc \
+	FadingCounter.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	hier_code.h \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
+	HttpBody.h \
 	tests/stub_HttpControlMsg.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	icp_v2.cc \
-	icp_v3.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
+	HttpRequest.cc \
+	tests/testHttpRequest.cc \
+	tests/testHttpRequest.h \
+	tests/testHttpRequestMethod.cc \
+	tests/testHttpRequestMethod.h \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
 	LogTags.cc \
-	tests/stub_libsecurity.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
-	multicast.h \
-	multicast.cc \
-	mem_node.cc \
 	MemBuf.cc \
 	MemObject.cc \
-	mime.h \
-	mime.cc \
-	mime_header.h \
-	mime_header.cc \
-	neighbors.h \
-	neighbors.cc \
+	MemStore.cc \
 	Notes.cc \
 	Notes.h \
 	Parsing.cc \
-	pconn.cc \
-	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc \
-	peer_select.cc \
-	peer_sourcehash.h \
-	peer_sourcehash.cc \
-	peer_userhash.h \
-	peer_userhash.cc \
-	PeerPoolMgr.h \
 	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
 	Pipeline.cc \
 	Pipeline.h \
-	redirect.h \
-	tests/stub_libauth_acls.cc \
-	tests/stub_redirect.cc \
-	refresh.h \
-	refresh.cc \
+	RefreshPattern.h \
 	RemovalPolicy.cc \
+	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
 	ResolvedPeers.h \
 	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
 	SquidMath.cc \
-	IoStats.h \
-	stat.h \
-	stat.cc \
-	StatCounters.h \
+	SquidMath.h \
 	StatCounters.cc \
-	StatHist.h \
+	StatCounters.h \
 	StatHist.cc \
-	stmem.cc \
+	StatHist.h \
+	StoreFileSystem.cc \
+	StoreIOState.cc \
+	tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc \
+	StrList.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
+	external_acl.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
+	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
+	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
+	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
+	tests/stub_libmem.cc \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	tests/stub_main_cc.cc \
+	mem_node.cc \
+	mime.cc \
+	mime.h \
+	mime_header.cc \
+	mime_header.h \
+	multicast.cc \
+	multicast.h \
+	neighbors.cc \
+	neighbors.h \
+	pconn.cc \
+	peer_digest.cc \
+	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
+	peer_select.cc \
+	peer_sourcehash.cc \
+	peer_sourcehash.h \
+	peer_userhash.cc \
+	peer_userhash.h \
+	tests/stub_redirect.cc \
+	redirect.h \
+	refresh.cc \
+	refresh.h \
 	repl_modules.h \
+	stat.cc \
+	stat.h \
+	stmem.cc \
 	store.cc \
 	store_client.cc \
-	store_digest.h \
 	tests/stub_store_digest.cc \
+	store_digest.h \
 	store_io.cc \
-	store_key_md5.h \
 	store_key_md5.cc \
-	store_log.h \
+	store_key_md5.h \
 	store_log.cc \
-	store_rebuild.h \
+	store_log.h \
 	store_rebuild.cc \
-	store_swapin.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
 	store_swapin.cc \
+	store_swapin.h \
 	store_swapmeta.cc \
 	store_swapout.cc \
-	StoreFileSystem.cc \
-	StoreIOState.cc \
-	tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc \
-	StrList.h \
-	StrList.cc \
-	event.cc \
-	tools.h \
+	time.cc \
 	tools.cc \
-	Transients.cc \
-	tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	tests/stub_libstore.cc \
-	MemStore.cc \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	FadingCounter.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testHttpRequest_SOURCES = \
 	$(BUILT_SOURCES)
@@ -4972,6 +4982,7 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 
@@ -4981,9 +4992,9 @@
 	tests/testIpAddress.h
 
 nodist_tests_testIpAddress_SOURCES = \
+	tests/stub_SBuf.cc \
 	tests/stub_debug.cc \
 	tests/stub_libmem.cc \
-	tests/stub_SBuf.cc \
 	tests/stub_tools.cc
 
 tests_testIpAddress_LDADD = \
@@ -4996,17 +5007,17 @@
 tests_testIpAddress_LDFLAGS = $(LIBADD_DL)
 # icmp/libicmpcore.la is used by pinger so SHOULD NOT require more dependancies! :-(
 tests_testIcmp_SOURCES = \
-	tests/testIcmp.h \
-	tests/testIcmp.cc
+	tests/testIcmp.cc \
+	tests/testIcmp.h
 
 nodist_tests_testIcmp_SOURCES = \
-	icmp/Icmp.h \
+	tests/stub_SBuf.cc \
 	SquidTime.h \
 	tests/stub_debug.cc \
+	globals.cc \
+	icmp/Icmp.h \
 	tests/stub_libmem.cc \
-	tests/stub_SBuf.cc \
-	time.cc \
-	globals.cc
+	time.cc
 
 tests_testIcmp_LDADD = \
 	icmp/libicmpcore.la \
@@ -5022,12 +5033,12 @@
 	tests/testNetDb.h
 
 nodist_tests_testNetDb_SOURCES = \
+	tests/stub_SBuf.cc \
 	SquidTime.h \
 	tests/stub_debug.cc \
+	globals.cc \
 	tests/stub_libmem.cc \
-	tests/stub_SBuf.cc \
-	time.cc \
-	globals.cc
+	time.cc
 
 tests_testNetDb_LDADD = \
 	icmp/libicmp.la \
@@ -5040,39 +5051,23 @@
 
 tests_testNetDb_LDFLAGS = $(LIBADD_DL)
 tests_testCacheManager_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
-	debug.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
-	HttpRequest.cc \
-	String.cc \
+	AuthReg.h \
+	BodyPipe.cc \
+	tests/stub_CacheDigest.cc \
+	CacheDigest.h \
 	tests/testCacheManager.cc \
 	tests/testCacheManager.h \
-	tests/stub_main_cc.cc \
-	tests/stub_HttpControlMsg.cc \
-	tests/stub_ipc_Forwarder.cc \
-	tests/stub_store_stats.cc \
-	tests/stub_EventLoop.cc \
-	time.cc \
-	BodyPipe.cc \
-	cache_manager.cc \
-	cache_cf.h \
-	AuthReg.h \
-	RefreshPattern.h \
 	CachePeer.cc \
 	CachePeer.h \
-	CacheDigest.h \
-	tests/stub_CacheDigest.cc \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -5080,154 +5075,171 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	event.cc \
-	external_acl.cc \
+	tests/stub_EventLoop.cc \
 	ExternalACLEntry.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
+	FadingCounter.cc \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	hier_code.h \
-	helper.cc \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
+	HttpBody.h \
+	tests/stub_HttpControlMsg.cc \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	icp_v2.cc \
-	icp_v3.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
+	HttpRequest.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
 	LogTags.cc \
-	tests/stub_libsecurity.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
-	multicast.h \
-	multicast.cc \
-	mem_node.cc \
 	MemBuf.cc \
 	MemObject.cc \
-	mime.h \
-	mime.cc \
-	mime_header.h \
-	mime_header.cc \
-	neighbors.h \
-	neighbors.cc \
+	MemStore.cc \
 	Notes.cc \
 	Notes.h \
 	Parsing.cc \
-	pconn.cc \
-	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
-	peer_proxy_negotiate_auth.cc \
-	peer_select.cc \
-	peer_sourcehash.h \
-	peer_sourcehash.cc \
-	peer_userhash.h \
-	peer_userhash.cc \
-	PeerPoolMgr.h \
 	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
 	Pipeline.cc \
 	Pipeline.h \
-	redirect.h \
-	tests/stub_redirect.cc \
-	refresh.h \
-	refresh.cc \
+	RefreshPattern.h \
 	RemovalPolicy.cc \
-	ResolvedPeers.h \
+	RequestFlags.cc \
+	RequestFlags.h \
 	ResolvedPeers.cc \
+	ResolvedPeers.h \
 	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
 	SquidMath.cc \
-	IoStats.h \
-	stat.h \
-	stat.cc \
-	StatCounters.h \
+	SquidMath.h \
 	StatCounters.cc \
+	StatCounters.h \
+	tests/stub_StatHist.cc \
 	StatHist.h \
-	StrList.h \
+	StoreFileSystem.cc \
+	StoreIOState.cc \
+	tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc \
 	StrList.cc \
-	tests/stub_libauth_acls.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
+	external_acl.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
+	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
 	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
 	tests/stub_libdiskio.cc \
-	tests/stub_StatHist.cc \
-	stmem.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	tests/stub_main_cc.cc \
+	mem_node.cc \
+	mime.cc \
+	mime.h \
+	mime_header.cc \
+	mime_header.h \
+	multicast.cc \
+	multicast.h \
+	neighbors.cc \
+	neighbors.h \
+	pconn.cc \
+	peer_digest.cc \
+	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
+	peer_select.cc \
+	peer_sourcehash.cc \
+	peer_sourcehash.h \
+	peer_userhash.cc \
+	peer_userhash.h \
+	tests/stub_redirect.cc \
+	redirect.h \
+	refresh.cc \
+	refresh.h \
 	repl_modules.h \
+	stat.cc \
+	stat.h \
+	stmem.cc \
 	store.cc \
 	store_client.cc \
-	store_digest.h \
 	tests/stub_store_digest.cc \
+	store_digest.h \
 	store_io.cc \
-	store_key_md5.h \
 	store_key_md5.cc \
-	store_log.h \
+	store_key_md5.h \
 	store_log.cc \
-	store_rebuild.h \
+	store_log.h \
 	store_rebuild.cc \
-	store_swapin.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
 	store_swapin.cc \
+	store_swapin.h \
 	store_swapmeta.cc \
 	store_swapout.cc \
-	StoreFileSystem.cc \
-	StoreIOState.cc \
-	tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc \
-	tools.h \
+	time.cc \
 	tools.cc \
-	Transients.cc \
-	tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	tests/stub_libstore.cc \
-	MemStore.cc \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	FadingCounter.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testCacheManager_SOURCES = \
 	$(BUILT_SOURCES)
@@ -5274,38 +5286,39 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 
 tests_testCacheManager_LDFLAGS = $(LIBADD_DL)
 tests_testStatHist_SOURCES = \
-	tests/stub_cbdata.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
+	tests/stub_DelayId.cc \
+	tests/stub_HelperChildConfig.cc \
 	tests/stub_MemBuf.cc \
+	tests/stub_MemObject.cc \
 	tests/stub_SBufDetailedStats.cc \
 	StatHist.cc \
+	tests/testStatHist.cc \
 	StatHist.h \
+	tests/testStatHist.h \
 	String.cc \
 	tests/stub_cache_manager.cc \
+	tests/stub_cbdata.cc \
 	tests/stub_comm.cc \
 	tests/stub_debug.cc \
-	tests/stub_DelayId.cc \
-	tests/stub_HelperChildConfig.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
 	tests/stub_libmem.cc \
-	tests/stub_MemObject.cc \
-	mime.h \
 	tests/stub_mime.cc \
+	mime.h \
 	tests/stub_pconn.cc \
-	tests/stub_stmem.cc \
 	repl_modules.h \
+	tests/stub_stmem.cc \
 	tests/stub_store.cc \
 	tests/stub_store_stats.cc \
 	time.cc \
-	tools.h \
 	tests/stub_tools.cc \
-	tests/testStatHist.cc \
-	tests/testStatHist.h
+	tools.h
 
 nodist_tests_testStatHist_SOURCES = \
 	$(TESTSOURCES)
@@ -5321,25 +5334,25 @@
 tests_testStatHist_LDFLAGS = $(LIBADD_DL)
 tests_testConfigParser_SOURCES = \
 	ClientInfo.h \
-	tests/stub_MemBuf.cc \
-	tests/stub_time.cc \
-	tests/stub_SBufDetailedStats.cc \
-	String.cc \
 	ConfigParser.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
 	tests/testConfigParser.cc \
 	tests/testConfigParser.h \
-	cache_cf.h \
+	tests/stub_HelperChildConfig.cc \
+	tests/stub_MemBuf.cc \
+	tests/stub_SBufDetailedStats.cc \
+	String.cc \
 	tests/stub_cache_cf.cc \
+	cache_cf.h \
 	tests/stub_cbdata.cc \
 	tests/stub_debug.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
 	tests/stub_libmem.cc \
-	tests/stub_HelperChildConfig.cc \
-	tools.h \
+	tests/stub_time.cc \
 	tests/stub_tools.cc \
-	wordlist.h \
-	wordlist.cc
+	tools.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testConfigParser_SOURCES = \
 	$(TESTSOURCES)
@@ -5358,26 +5371,21 @@
 
 tests_testConfigParser_LDFLAGS = $(LIBADD_DL)
 tests_testEvent_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
+	AuthReg.h \
 	BodyPipe.cc \
-	CacheDigest.h \
 	tests/stub_CacheDigest.cc \
-	cache_cf.h \
-	AuthReg.h \
-	RefreshPattern.h \
+	CacheDigest.h \
 	CachePeer.cc \
 	CachePeer.h \
-	cache_manager.cc \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -5385,171 +5393,177 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	debug.cc \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	event.cc \
-	EventLoop.h \
+	tests/testEvent.cc \
+	tests/testEvent.h \
 	EventLoop.cc \
-	external_acl.cc \
+	EventLoop.h \
 	ExternalACLEntry.cc \
 	FadingCounter.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	hier_code.h \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
+	HttpBody.h \
 	tests/stub_HttpControlMsg.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	PeerPoolMgr.h \
+	HttpRequest.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
+	LogTags.cc \
+	MasterXaction.cc \
+	MasterXaction.h \
+	MemBuf.cc \
+	MemObject.cc \
+	MemStore.cc \
+	Notes.cc \
+	Notes.h \
+	Parsing.cc \
 	PeerPoolMgr.cc \
-	RequestFlags.h \
+	PeerPoolMgr.h \
+	Pipeline.cc \
+	Pipeline.h \
+	RefreshPattern.h \
+	RemovalPolicy.cc \
 	RequestFlags.cc \
-	HttpRequest.cc \
+	RequestFlags.h \
+	ResolvedPeers.cc \
+	ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc \
+	SquidMath.cc \
+	SquidMath.h \
+	StatCounters.cc \
+	StatCounters.h \
+	StatHist.cc \
+	StatHist.h \
+	StoreFileSystem.cc \
+	StoreIOState.cc \
+	tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc \
+	StrList.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
+	external_acl.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
 	icp_v2.cc \
 	icp_v3.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	int.h \
 	int.cc \
-	internal.h \
+	int.h \
 	internal.cc \
-	LogTags.cc \
-	tests/stub_libsecurity.cc \
-	MasterXaction.cc \
-	MasterXaction.h \
+	internal.h \
+	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
+	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
+	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
 	tests/stub_libmem.cc \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	tests/stub_main_cc.cc \
 	mem_node.cc \
-	MemBuf.cc \
-	MemObject.cc \
-	mime.h \
 	mime.cc \
-	mime_header.h \
+	mime.h \
 	mime_header.cc \
-	multicast.h \
+	mime_header.h \
 	multicast.cc \
-	neighbors.h \
+	multicast.h \
 	neighbors.cc \
-	Notes.cc \
-	Notes.h \
-	Parsing.cc \
+	neighbors.h \
 	pconn.cc \
 	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
 	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
 	peer_select.cc \
-	peer_sourcehash.h \
 	peer_sourcehash.cc \
-	peer_userhash.h \
+	peer_sourcehash.h \
 	peer_userhash.cc \
-	Pipeline.cc \
-	Pipeline.h \
-	redirect.h \
+	peer_userhash.h \
 	tests/stub_redirect.cc \
-	refresh.h \
+	redirect.h \
 	refresh.cc \
-	RemovalPolicy.cc \
-	ResolvedPeers.h \
-	ResolvedPeers.cc \
-	StrList.h \
-	StrList.cc \
-	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.cc \
-	SquidMath.h \
-	IoStats.h \
-	stat.h \
+	refresh.h \
+	repl_modules.h \
 	stat.cc \
-	StatCounters.h \
-	StatCounters.cc \
-	StatHist.h \
-	StatHist.cc \
+	stat.h \
 	stmem.cc \
-	repl_modules.h \
 	store.cc \
 	store_client.cc \
-	store_digest.h \
 	tests/stub_store_digest.cc \
+	store_digest.h \
 	store_io.cc \
-	store_key_md5.h \
 	store_key_md5.cc \
-	store_log.h \
+	store_key_md5.h \
 	store_log.cc \
-	store_rebuild.h \
+	store_log.h \
 	store_rebuild.cc \
-	store_swapin.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
 	store_swapin.cc \
+	store_swapin.h \
 	store_swapmeta.cc \
 	store_swapout.cc \
-	StoreFileSystem.cc \
-	StoreIOState.cc \
-	tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc \
-	String.cc \
-	tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
-	tests/stub_libstore.cc \
 	tests/CapturingStoreEntry.h \
-	tests/testEvent.cc \
-	tests/testEvent.h \
-	tests/stub_main_cc.cc \
-	tests/stub_ipc_Forwarder.cc \
-	tests/stub_libauth_acls.cc \
-	tests/stub_libauth.cc \
-	tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc \
-	tests/stub_store_stats.cc \
 	time.cc \
-	tools.h \
 	tools.cc \
-	Transients.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	MemStore.cc \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testEvent_SOURCES = \
 	$(BUILT_SOURCES)
@@ -5593,31 +5607,27 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 
 tests_testEvent_LDFLAGS = $(LIBADD_DL)
 tests_testEventLoop_SOURCES = \
+	$(DELAY_POOL_SOURCE) \
+	$(DNSSOURCE) \
+	$(HTCPSOURCE) \
+	$(IPC_SOURCE) \
+	$(SNMP_SOURCE) \
+	$(UNLINKDSOURCE) \
+	$(WIN32_SOURCE) \
 	AccessLogEntry.cc \
+	AuthReg.h \
 	BodyPipe.cc \
-	CacheDigest.h \
 	tests/stub_CacheDigest.cc \
-	cache_manager.cc \
-	cache_cf.h \
-	AuthReg.h \
-	RefreshPattern.h \
+	CacheDigest.h \
 	CachePeer.cc \
 	CachePeer.h \
-	carp.h \
-	tests/stub_carp.cc \
-	cbdata.cc \
-	tests/stub_client_db.cc \
-	client_side.h \
-	client_side.cc \
-	client_side_reply.cc \
-	client_side_request.cc \
 	ClientInfo.h \
-	clientStream.cc \
 	tests/stub_CollapsedForwarding.cc \
 	ConfigOption.cc \
 	ConfigParser.cc \
@@ -5625,170 +5635,176 @@
 	CpuAffinityMap.h \
 	CpuAffinitySet.cc \
 	CpuAffinitySet.h \
-	debug.cc \
-	$(DELAY_POOL_SOURCE) \
-	fs_io.h \
-	fs_io.cc \
-	dlink.h \
-	dlink.cc \
-	$(DNSSOURCE) \
-	errorpage.cc \
 	tests/stub_ETag.cc \
-	EventLoop.h \
 	EventLoop.cc \
-	event.cc \
-	external_acl.cc \
+	tests/testEventLoop.cc \
+	EventLoop.h \
+	tests/testEventLoop.h \
 	ExternalACLEntry.cc \
 	FadingCounter.cc \
-	fatal.h \
-	tests/stub_fatal.cc \
-	fd.h \
-	fd.cc \
-	fde.cc \
 	FileMap.h \
-	filemap.cc \
-	fqdncache.h \
-	fqdncache.cc \
 	FwdState.cc \
 	FwdState.h \
-	gopher.h \
-	tests/stub_gopher.cc \
 	HappyConnOpener.cc \
 	HappyConnOpener.h \
-	helper.cc \
-	hier_code.h \
-	$(HTCPSOURCE) \
-	http.cc \
-	HttpBody.h \
 	HttpBody.cc \
+	HttpBody.h \
 	tests/stub_HttpControlMsg.cc \
-	HttpHeader.h \
-	HttpHeader.cc \
-	HttpHeaderFieldInfo.h \
-	HttpHeaderTools.h \
-	HttpHeaderTools.cc \
-	HttpHeaderFieldStat.h \
-	HttpHdrCc.h \
 	HttpHdrCc.cc \
+	HttpHdrCc.h \
 	HttpHdrContRange.cc \
 	HttpHdrRange.cc \
 	HttpHdrSc.cc \
 	HttpHdrScTarget.cc \
+	HttpHeader.cc \
+	HttpHeader.h \
+	HttpHeaderFieldInfo.h \
+	HttpHeaderFieldStat.h \
+	HttpHeaderTools.cc \
+	HttpHeaderTools.h \
 	HttpReply.cc \
-	PeerPoolMgr.h \
-	PeerPoolMgr.cc \
-	RequestFlags.h \
-	RequestFlags.cc \
 	HttpRequest.cc \
-	icp_v2.cc \
-	icp_v3.cc \
-	$(IPC_SOURCE) \
-	ipcache.cc \
-	int.h \
-	int.cc \
-	internal.h \
-	internal.cc \
+	tests/stub_HttpUpgradeProtocolAccess.cc \
+	IoStats.h \
 	LogTags.cc \
 	MasterXaction.cc \
 	MasterXaction.h \
 	MemBuf.cc \
 	MemObject.cc \
+	MemStore.cc \
+	Notes.cc \
+	Notes.h \
+	Parsing.cc \
+	PeerPoolMgr.cc \
+	PeerPoolMgr.h \
+	Pipeline.cc \
+	Pipeline.h \
+	RefreshPattern.h \
+	RemovalPolicy.cc \
+	RequestFlags.cc \
+	RequestFlags.h \
+	ResolvedPeers.cc \
+	ResolvedPeers.h \
+	tests/stub_SBufDetailedStats.cc \
+	SquidMath.cc \
+	SquidMath.h \
+	StatCounters.cc \
+	StatCounters.h \
+	StatHist.cc \
+	StatHist.h \
+	StoreFileSystem.cc \
+	StoreIOState.cc \
+	tests/stub_StoreMeta.cc \
+	StoreMetaUnpacker.cc \
+	StoreSwapLogData.cc \
+	StrList.cc \
+	StrList.h \
+	String.cc \
+	Transients.cc \
+	tests/stub_cache_cf.cc \
+	cache_cf.h \
+	cache_manager.cc \
+	tests/stub_carp.cc \
+	carp.h \
+	cbdata.cc \
+	clientStream.cc \
+	tests/stub_client_db.cc \
+	client_side.cc \
+	client_side.h \
+	client_side_reply.cc \
+	client_side_request.cc \
+	debug.cc \
+	dlink.cc \
+	dlink.h \
+	errorpage.cc \
+	event.cc \
+	external_acl.cc \
+	tests/stub_fatal.cc \
+	fatal.h \
+	fd.cc \
+	fd.h \
+	fde.cc \
+	filemap.cc \
+	fqdncache.cc \
+	fqdncache.h \
+	fs_io.cc \
+	fs_io.h \
+	tests/stub_gopher.cc \
+	gopher.h \
+	helper.cc \
+	hier_code.h \
+	http.cc \
+	icp_v2.cc \
+	icp_v3.cc \
+	int.cc \
+	int.h \
+	internal.cc \
+	internal.h \
+	tests/stub_ipc_Forwarder.cc \
+	ipcache.cc \
+	tests/stub_libauth.cc \
+	tests/stub_libauth_acls.cc \
+	tests/stub_libdiskio.cc \
+	tests/stub_liberror.cc \
+	tests/stub_libeui.cc \
 	tests/stub_libmem.cc \
+	tests/stub_libsecurity.cc \
+	tests/stub_libstore.cc \
+	tests/stub_main_cc.cc \
 	mem_node.cc \
-	mime.h \
 	mime.cc \
-	mime_header.h \
+	mime.h \
 	mime_header.cc \
-	multicast.h \
+	mime_header.h \
 	multicast.cc \
-	neighbors.h \
+	multicast.h \
 	neighbors.cc \
-	Notes.cc \
-	Notes.h \
-	Parsing.cc \
+	neighbors.h \
 	pconn.cc \
 	peer_digest.cc \
-	peer_proxy_negotiate_auth.h \
 	peer_proxy_negotiate_auth.cc \
+	peer_proxy_negotiate_auth.h \
 	peer_select.cc \
-	peer_sourcehash.h \
 	peer_sourcehash.cc \
-	peer_userhash.h \
+	peer_sourcehash.h \
 	peer_userhash.cc \
-	Pipeline.cc \
-	Pipeline.h \
-	RemovalPolicy.cc \
-	ResolvedPeers.cc \
-	ResolvedPeers.h \
-	redirect.h \
+	peer_userhash.h \
 	tests/stub_redirect.cc \
-	refresh.h \
+	redirect.h \
 	refresh.cc \
-	tests/stub_SBufDetailedStats.cc \
-	$(SNMP_SOURCE) \
-	SquidMath.h \
-	SquidMath.cc \
-	IoStats.h \
-	stat.h \
+	refresh.h \
+	repl_modules.h \
 	stat.cc \
-	StatCounters.h \
-	StatCounters.cc \
-	StatHist.h \
-	StatHist.cc \
+	stat.h \
 	stmem.cc \
-	repl_modules.h \
 	store.cc \
 	store_client.cc \
-	store_digest.h \
 	tests/stub_store_digest.cc \
+	store_digest.h \
 	store_io.cc \
-	store_key_md5.h \
 	store_key_md5.cc \
-	store_log.h \
+	store_key_md5.h \
 	store_log.cc \
-	store_rebuild.h \
+	store_log.h \
 	store_rebuild.cc \
-	store_swapin.h \
+	store_rebuild.h \
+	tests/stub_store_stats.cc \
 	store_swapin.cc \
+	store_swapin.h \
 	store_swapmeta.cc \
 	store_swapout.cc \
-	StoreFileSystem.cc \
-	StoreIOState.cc \
-	tests/stub_StoreMeta.cc \
-	StoreMetaUnpacker.cc \
-	StoreSwapLogData.cc \
-	String.cc \
-	StrList.h \
-	StrList.cc \
-	tests/stub_cache_cf.cc \
-	tests/stub_HttpUpgradeProtocolAccess.cc \
-	tests/stub_libstore.cc \
-	tests/testEventLoop.cc \
-	tests/testEventLoop.h \
-	tests/stub_main_cc.cc \
-	tests/stub_ipc_Forwarder.cc \
-	tests/stub_libauth_acls.cc \
-	tests/stub_libauth.cc \
-	tests/stub_libdiskio.cc \
-	tests/stub_libeui.cc \
-	tests/stub_libsecurity.cc \
-	tests/stub_store_stats.cc \
 	time.cc \
-	tools.h \
 	tools.cc \
-	Transients.cc \
+	tools.h \
 	tests/stub_tunnel.cc \
-	MemStore.cc \
-	$(UNLINKDSOURCE) \
-	urn.h \
 	urn.cc \
-	wccp2.h \
+	urn.h \
 	tests/stub_wccp2.cc \
-	whois.h \
+	wccp2.h \
 	tests/stub_whois.cc \
-	$(WIN32_SOURCE) \
-	wordlist.h \
-	wordlist.cc
+	whois.h \
+	wordlist.cc \
+	wordlist.h
 
 nodist_tests_testEventLoop_SOURCES = \
 	$(BUILT_SOURCES)
@@ -5832,6 +5848,7 @@
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 
@@ -6066,6 +6083,16 @@
 	@: > tests/$(DEPDIR)/$(am__dirstamp)
 tests/testACLMaxUserIP.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_HelperChildConfig.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_HttpHeader.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_HttpRequest.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_MemBuf.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_StatHist.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_access_log.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_cache_cf.$(OBJEXT): tests/$(am__dirstamp) \
@@ -6080,12 +6107,6 @@
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_fatal.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_HelperChildConfig.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_HttpHeader.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_HttpRequest.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libauth.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libhttp.$(OBJEXT): tests/$(am__dirstamp) \
@@ -6094,10 +6115,6 @@
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libsecurity.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_MemBuf.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_StatHist.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 
 tests/testACLMaxUserIP$(EXEEXT): $(tests_testACLMaxUserIP_OBJECTS) $(tests_testACLMaxUserIP_DEPENDENCIES) $(EXTRA_tests_testACLMaxUserIP_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testACLMaxUserIP$(EXEEXT)
@@ -6108,47 +6125,49 @@
 tests/testBoilerplate$(EXEEXT): $(tests_testBoilerplate_OBJECTS) $(tests_testBoilerplate_DEPENDENCIES) $(EXTRA_tests_testBoilerplate_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testBoilerplate$(EXEEXT)
 	$(AM_V_CXXLD)$(tests_testBoilerplate_LINK) $(tests_testBoilerplate_OBJECTS) $(tests_testBoilerplate_LDADD) $(LIBS)
+tests/stub_CacheDigest.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 tests/testCacheManager.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_main_cc.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_CollapsedForwarding.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_HttpControlMsg.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_ETag.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_ipc_Forwarder.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_EventLoop.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_store_stats.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_HttpControlMsg.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_EventLoop.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_CacheDigest.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_SBufDetailedStats.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_StoreMeta.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_carp.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_client_db.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_CollapsedForwarding.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_ETag.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_gopher.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_redirect.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_SBufDetailedStats.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_ipc_Forwarder.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libauth_acls.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libdiskio.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_store_digest.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_liberror.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_StoreMeta.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_libstore.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_HttpUpgradeProtocolAccess.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_main_cc.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_tunnel.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_redirect.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_libstore.$(OBJEXT): tests/$(am__dirstamp) \
+tests/stub_store_digest.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_store_stats.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_tunnel.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_wccp2.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
@@ -6164,16 +6183,26 @@
 tests/testCharacterSet$(EXEEXT): $(tests_testCharacterSet_OBJECTS) $(tests_testCharacterSet_DEPENDENCIES) $(EXTRA_tests_testCharacterSet_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testCharacterSet$(EXEEXT)
 	$(AM_V_CXXLD)$(tests_testCharacterSet_LINK) $(tests_testCharacterSet_OBJECTS) $(tests_testCharacterSet_LDADD) $(LIBS)
-tests/stub_time.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 tests/testConfigParser.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_time.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_tools.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 
 tests/testConfigParser$(EXEEXT): $(tests_testConfigParser_OBJECTS) $(tests_testConfigParser_DEPENDENCIES) $(EXTRA_tests_testConfigParser_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testConfigParser$(EXEEXT)
 	$(AM_V_CXXLD)$(tests_testConfigParser_LINK) $(tests_testConfigParser_OBJECTS) $(tests_testConfigParser_LDADD) $(LIBS)
+tests/testDiskIO.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_MemStore.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_Port.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/testStoreSupport.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_UdsOp.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_acl.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_cache_manager.$(OBJEXT): tests/$(am__dirstamp) \
@@ -6192,6 +6221,8 @@
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_ipcache.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_libanyp.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libeui.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libformat.$(OBJEXT): tests/$(am__dirstamp) \
@@ -6200,30 +6231,18 @@
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_liblog.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_MemStore.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_mime.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_neighbors.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_pconn.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_Port.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_stat.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_store_client.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_store_rebuild.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_UdsOp.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/testDiskIO.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/testStoreSupport.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_libanyp.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 
 tests/testDiskIO$(EXEEXT): $(tests_testDiskIO_OBJECTS) $(tests_testDiskIO_DEPENDENCIES) $(EXTRA_tests_testDiskIO_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testDiskIO$(EXEEXT)
@@ -6252,6 +6271,8 @@
 tests/testEventLoop$(EXEEXT): $(tests_testEventLoop_OBJECTS) $(tests_testEventLoop_DEPENDENCIES) $(EXTRA_tests_testEventLoop_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testEventLoop$(EXEEXT)
 	$(AM_V_CXXLD)$(tests_testEventLoop_LINK) $(tests_testEventLoop_OBJECTS) $(tests_testEventLoop_LDADD) $(LIBS)
+tests/testHttp1Parser.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_MemObject.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_comm.$(OBJEXT): tests/$(am__dirstamp) \
@@ -6262,12 +6283,12 @@
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_store.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/testHttp1Parser.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 
 tests/testHttp1Parser$(EXEEXT): $(tests_testHttp1Parser_OBJECTS) $(tests_testHttp1Parser_DEPENDENCIES) $(EXTRA_tests_testHttp1Parser_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testHttp1Parser$(EXEEXT)
 	$(AM_V_CXXLD)$(tests_testHttp1Parser_LINK) $(tests_testHttp1Parser_OBJECTS) $(tests_testHttp1Parser_LDADD) $(LIBS)
+tests/testHttpReply.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_fd.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libcomm.$(OBJEXT): tests/$(am__dirstamp) \
@@ -6276,8 +6297,6 @@
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/stub_libsslsquid.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/testHttpReply.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 
 tests/testHttpReply$(EXEEXT): $(tests_testHttpReply_OBJECTS) $(tests_testHttpReply_DEPENDENCIES) $(EXTRA_tests_testHttpReply_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testHttpReply$(EXEEXT)
@@ -6334,10 +6353,10 @@
 tests/testRock$(EXEEXT): $(tests_testRock_OBJECTS) $(tests_testRock_DEPENDENCIES) $(EXTRA_tests_testRock_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testRock$(EXEEXT)
 	$(AM_V_CXXLD)$(tests_testRock_LINK) $(tests_testRock_OBJECTS) $(tests_testRock_LDADD) $(LIBS)
-tests/SBufFindTest.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 tests/testSBuf.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
+tests/SBufFindTest.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 
 tests/testSBuf$(EXEEXT): $(tests_testSBuf_OBJECTS) $(tests_testSBuf_DEPENDENCIES) $(EXTRA_tests_testSBuf_DEPENDENCIES) tests/$(am__dirstamp)
 	@rm -f tests/testSBuf$(EXEEXT)
@@ -6358,8 +6377,6 @@
 	$(AM_V_CXXLD)$(tests_testStatHist_LINK) $(tests_testStatHist_OBJECTS) $(tests_testStatHist_LDADD) $(LIBS)
 tests/stub_HttpReply.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
-tests/stub_store_swapout.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
 tests/testPackableStream.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/testStore.$(OBJEXT): tests/$(am__dirstamp) \
@@ -6368,6 +6385,8 @@
 	tests/$(DEPDIR)/$(am__dirstamp)
 tests/testStoreHashIndex.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
+tests/stub_store_swapout.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
 tests/TestSwapDir.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 
@@ -6532,8 +6551,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delay_pools.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlink.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_internal.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err_detail_type.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err_type.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errorpage.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external_acl.Po@am__quote@ # am--include-marker
@@ -6654,6 +6671,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/stub_libauth_acls.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/stub_libcomm.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/stub_libdiskio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/stub_liberror.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/stub_libeui.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/stub_libformat.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/stub_libhttp.Po@am__quote@ # am--include-marker
@@ -7530,8 +7548,6 @@
 	-rm -f ./$(DEPDIR)/delay_pools.Po
 	-rm -f ./$(DEPDIR)/dlink.Po
 	-rm -f ./$(DEPDIR)/dns_internal.Po
-	-rm -f ./$(DEPDIR)/err_detail_type.Po
-	-rm -f ./$(DEPDIR)/err_type.Po
 	-rm -f ./$(DEPDIR)/errorpage.Po
 	-rm -f ./$(DEPDIR)/event.Po
 	-rm -f ./$(DEPDIR)/external_acl.Po
@@ -7652,6 +7668,7 @@
 	-rm -f tests/$(DEPDIR)/stub_libauth_acls.Po
 	-rm -f tests/$(DEPDIR)/stub_libcomm.Po
 	-rm -f tests/$(DEPDIR)/stub_libdiskio.Po
+	-rm -f tests/$(DEPDIR)/stub_liberror.Po
 	-rm -f tests/$(DEPDIR)/stub_libeui.Po
 	-rm -f tests/$(DEPDIR)/stub_libformat.Po
 	-rm -f tests/$(DEPDIR)/stub_libhttp.Po
@@ -7864,8 +7881,6 @@
 	-rm -f ./$(DEPDIR)/delay_pools.Po
 	-rm -f ./$(DEPDIR)/dlink.Po
 	-rm -f ./$(DEPDIR)/dns_internal.Po
-	-rm -f ./$(DEPDIR)/err_detail_type.Po
-	-rm -f ./$(DEPDIR)/err_type.Po
 	-rm -f ./$(DEPDIR)/errorpage.Po
 	-rm -f ./$(DEPDIR)/event.Po
 	-rm -f ./$(DEPDIR)/external_acl.Po
@@ -7986,6 +8001,7 @@
 	-rm -f tests/$(DEPDIR)/stub_libauth_acls.Po
 	-rm -f tests/$(DEPDIR)/stub_libcomm.Po
 	-rm -f tests/$(DEPDIR)/stub_libdiskio.Po
+	-rm -f tests/$(DEPDIR)/stub_liberror.Po
 	-rm -f tests/$(DEPDIR)/stub_libeui.Po
 	-rm -f tests/$(DEPDIR)/stub_libformat.Po
 	-rm -f tests/$(DEPDIR)/stub_libhttp.Po
@@ -8112,12 +8128,6 @@
 hier_code.cc: hier_code.h mk-string-arrays.awk
 	$(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/hier_code.h > $@ || ($(RM) -f $@ && exit 1)
 
-err_type.cc: err_type.h mk-string-arrays.awk
-	$(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/err_type.h > $@ || ($(RM) -f $@ && exit 1)
-
-err_detail_type.cc: err_detail_type.h mk-string-arrays.awk
-	$(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/err_detail_type.h | sed 's/ERR_DETAIL_//' > $@ || ($(RM) -f $@ && exit 1)
-
 lookup_t.cc: lookup_t.h mk-string-arrays.awk
 	$(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/lookup_t.h > $@ || ($(RM) -f $@ && exit 1)
 
diff -u -r -N squid-5.0.5/src/mem/Makefile.am squid-5.0.6/src/mem/Makefile.am
--- squid-5.0.5/src/mem/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mem/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -13,13 +13,13 @@
 libmem_la_SOURCES = \
 	AllocatorProxy.cc \
 	AllocatorProxy.h \
-	forward.h \
 	Meter.h \
-	old_api.cc \
 	Pool.cc \
 	Pool.h \
 	PoolChunked.cc \
 	PoolChunked.h \
-	PoolingAllocator.h \
 	PoolMalloc.cc \
-	PoolMalloc.h
+	PoolMalloc.h \
+	PoolingAllocator.h \
+	forward.h \
+	old_api.cc
diff -u -r -N squid-5.0.5/src/mem/Makefile.in squid-5.0.6/src/mem/Makefile.in
--- squid-5.0.5/src/mem/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/mem/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -164,8 +164,8 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libmem_la_LIBADD =
-am_libmem_la_OBJECTS = AllocatorProxy.lo old_api.lo Pool.lo \
-	PoolChunked.lo PoolMalloc.lo
+am_libmem_la_OBJECTS = AllocatorProxy.lo Pool.lo PoolChunked.lo \
+	PoolMalloc.lo old_api.lo
 libmem_la_OBJECTS = $(am_libmem_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -733,16 +733,16 @@
 libmem_la_SOURCES = \
 	AllocatorProxy.cc \
 	AllocatorProxy.h \
-	forward.h \
 	Meter.h \
-	old_api.cc \
 	Pool.cc \
 	Pool.h \
 	PoolChunked.cc \
 	PoolChunked.h \
-	PoolingAllocator.h \
 	PoolMalloc.cc \
-	PoolMalloc.h
+	PoolMalloc.h \
+	PoolingAllocator.h \
+	forward.h \
+	old_api.cc
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/mgr/Action.cc squid-5.0.6/src/mgr/Action.cc
--- squid-5.0.5/src/mgr/Action.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Action.cc	2021-05-10 21:02:34.000000000 +1200
@@ -79,7 +79,7 @@
 }
 
 void
-Mgr::Action::sendResponse(unsigned int requestId)
+Mgr::Action::sendResponse(const Ipc::RequestId requestId)
 {
     Response response(requestId, this);
     Ipc::TypedMsgHdr message;
diff -u -r -N squid-5.0.5/src/mgr/Action.h squid-5.0.6/src/mgr/Action.h
--- squid-5.0.5/src/mgr/Action.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Action.h	2021-05-10 21:02:34.000000000 +1200
@@ -55,7 +55,7 @@
     virtual void unpack(const Ipc::TypedMsgHdr &) {}
 
     /// notify Coordinator that this action is done with local processing
-    void sendResponse(unsigned int requestId);
+    void sendResponse(Ipc::RequestId);
 
     /* Action properties */
 
diff -u -r -N squid-5.0.5/src/mgr/Filler.cc squid-5.0.6/src/mgr/Filler.cc
--- squid-5.0.5/src/mgr/Filler.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Filler.cc	2021-05-10 21:02:34.000000000 +1200
@@ -11,6 +11,7 @@
 #include "squid.h"
 #include "base/TextException.h"
 #include "comm/Connection.h"
+#include "ipc/RequestId.h"
 #include "mgr/Filler.h"
 #include "mgr/Response.h"
 #include "Store.h"
@@ -18,7 +19,7 @@
 CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler);
 
 Mgr::Filler::Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn,
-                    unsigned int aRequestId):
+                    const Ipc::RequestId aRequestId):
     StoreToCommWriter(conn, anAction->createStoreEntry()),
     action(anAction),
     requestId(aRequestId)
diff -u -r -N squid-5.0.5/src/mgr/Filler.h squid-5.0.6/src/mgr/Filler.h
--- squid-5.0.5/src/mgr/Filler.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Filler.h	2021-05-10 21:02:34.000000000 +1200
@@ -12,6 +12,7 @@
 #define SQUID_MGR_FILLER_H
 
 #include "comm/forward.h"
+#include "ipc/forward.h"
 #include "mgr/Action.h"
 #include "mgr/StoreToCommWriter.h"
 
@@ -24,7 +25,7 @@
     CBDATA_CLASS(Filler);
 
 public:
-    Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn, unsigned int aRequestId);
+    Filler(const Action::Pointer &, const Comm::ConnectionPointer &, Ipc::RequestId);
 
 protected:
     /* AsyncJob API */
@@ -33,7 +34,7 @@
 
 private:
     Action::Pointer action; ///< action that will run() and sendResponse()
-    unsigned int requestId; ///< the ID of the Request we are responding to
+    Ipc::RequestId requestId; ///< the ID of the Request we are responding to
 };
 
 } // namespace Mgr
diff -u -r -N squid-5.0.5/src/mgr/Forwarder.cc squid-5.0.6/src/mgr/Forwarder.cc
--- squid-5.0.5/src/mgr/Forwarder.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Forwarder.cc	2021-05-10 21:02:34.000000000 +1200
@@ -28,7 +28,10 @@
 
 Mgr::Forwarder::Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams,
                           HttpRequest* aRequest, StoreEntry* anEntry, const AccessLogEntryPointer &anAle):
-    Ipc::Forwarder(new Request(KidIdentifier, 0, aConn, aParams), 10),
+    // TODO: Add virtual Forwarder::makeRequest() to avoid prematurely creating
+    // this dummy request with a dummy ID that are finalized by Ipc::Forwarder.
+    // Same for Snmp::Forwarder.
+    Ipc::Forwarder(new Request(KidIdentifier, Ipc::RequestId(/*XXX*/), aConn, aParams), 10),
     httpRequest(aRequest), entry(anEntry), conn(aConn), ale(anAle)
 {
     debugs(16, 5, HERE << conn);
diff -u -r -N squid-5.0.5/src/mgr/FunAction.cc squid-5.0.6/src/mgr/FunAction.cc
--- squid-5.0.5/src/mgr/FunAction.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/FunAction.cc	2021-05-10 21:02:34.000000000 +1200
@@ -12,6 +12,7 @@
 #include "base/TextException.h"
 #include "comm/Connection.h"
 #include "globals.h"
+#include "ipc/RequestId.h"
 #include "ipc/UdsOp.h"
 #include "mgr/Command.h"
 #include "mgr/Filler.h"
diff -u -r -N squid-5.0.5/src/mgr/InfoAction.cc squid-5.0.6/src/mgr/InfoAction.cc
--- squid-5.0.5/src/mgr/InfoAction.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/InfoAction.cc	2021-05-10 21:02:34.000000000 +1200
@@ -14,6 +14,7 @@
 #include "globals.h"
 #include "HttpReply.h"
 #include "ipc/Messages.h"
+#include "ipc/RequestId.h"
 #include "ipc/TypedMsgHdr.h"
 #include "ipc/UdsOp.h"
 #include "mgr/Filler.h"
diff -u -r -N squid-5.0.5/src/mgr/Makefile.am squid-5.0.6/src/mgr/Makefile.am
--- squid-5.0.5/src/mgr/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -12,12 +12,12 @@
 
 libmgr_la_SOURCES = \
 	Action.cc \
-	ActionCreator.h \
 	Action.h \
+	ActionCreator.h \
 	ActionParams.cc \
 	ActionParams.h \
-	ActionPasswordList.h \
 	ActionPasswordList.cc \
+	ActionPasswordList.h \
 	ActionProfile.h \
 	ActionWriter.cc \
 	ActionWriter.h \
@@ -31,17 +31,21 @@
 	Filler.h \
 	Forwarder.cc \
 	Forwarder.h \
-	forward.h \
 	FunAction.cc \
 	FunAction.h \
 	InfoAction.cc \
 	InfoAction.h \
 	Inquirer.cc \
 	Inquirer.h \
+	IntParam.cc \
+	IntParam.h \
 	IntervalAction.cc \
 	IntervalAction.h \
 	IoAction.cc \
 	IoAction.h \
+	QueryParam.h \
+	QueryParams.cc \
+	QueryParams.h \
 	Registration.cc \
 	Registration.h \
 	Request.cc \
@@ -54,10 +58,6 @@
 	StoreIoAction.h \
 	StoreToCommWriter.cc \
 	StoreToCommWriter.h \
-	QueryParam.h \
-	QueryParams.cc \
-	QueryParams.h \
-	IntParam.cc \
-	IntParam.h \
 	StringParam.cc \
-	StringParam.h
+	StringParam.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/mgr/Makefile.in squid-5.0.6/src/mgr/Makefile.in
--- squid-5.0.5/src/mgr/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/mgr/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -167,9 +167,9 @@
 am_libmgr_la_OBJECTS = Action.lo ActionParams.lo ActionPasswordList.lo \
 	ActionWriter.lo BasicActions.lo Command.lo CountersAction.lo \
 	Filler.lo Forwarder.lo FunAction.lo InfoAction.lo Inquirer.lo \
-	IntervalAction.lo IoAction.lo Registration.lo Request.lo \
-	Response.lo ServiceTimesAction.lo StoreIoAction.lo \
-	StoreToCommWriter.lo QueryParams.lo IntParam.lo StringParam.lo
+	IntParam.lo IntervalAction.lo IoAction.lo QueryParams.lo \
+	Registration.lo Request.lo Response.lo ServiceTimesAction.lo \
+	StoreIoAction.lo StoreToCommWriter.lo StringParam.lo
 libmgr_la_OBJECTS = $(am_libmgr_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -747,12 +747,12 @@
 noinst_LTLIBRARIES = libmgr.la
 libmgr_la_SOURCES = \
 	Action.cc \
-	ActionCreator.h \
 	Action.h \
+	ActionCreator.h \
 	ActionParams.cc \
 	ActionParams.h \
-	ActionPasswordList.h \
 	ActionPasswordList.cc \
+	ActionPasswordList.h \
 	ActionProfile.h \
 	ActionWriter.cc \
 	ActionWriter.h \
@@ -766,17 +766,21 @@
 	Filler.h \
 	Forwarder.cc \
 	Forwarder.h \
-	forward.h \
 	FunAction.cc \
 	FunAction.h \
 	InfoAction.cc \
 	InfoAction.h \
 	Inquirer.cc \
 	Inquirer.h \
+	IntParam.cc \
+	IntParam.h \
 	IntervalAction.cc \
 	IntervalAction.h \
 	IoAction.cc \
 	IoAction.h \
+	QueryParam.h \
+	QueryParams.cc \
+	QueryParams.h \
 	Registration.cc \
 	Registration.h \
 	Request.cc \
@@ -789,13 +793,9 @@
 	StoreIoAction.h \
 	StoreToCommWriter.cc \
 	StoreToCommWriter.h \
-	QueryParam.h \
-	QueryParams.cc \
-	QueryParams.h \
-	IntParam.cc \
-	IntParam.h \
 	StringParam.cc \
-	StringParam.h
+	StringParam.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/mgr/QueryParams.cc squid-5.0.6/src/mgr/QueryParams.cc
--- squid-5.0.5/src/mgr/QueryParams.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/QueryParams.cc	2021-05-10 21:02:34.000000000 +1200
@@ -14,6 +14,10 @@
 #include "mgr/IntParam.h"
 #include "mgr/QueryParams.h"
 #include "mgr/StringParam.h"
+#include "parser/Tokenizer.h"
+#include "sbuf/StringConvert.h"
+
+#include <limits>
 
 Mgr::QueryParam::Pointer
 Mgr::QueryParams::get(const String& name) const
@@ -65,61 +69,76 @@
     return iter;
 }
 
-bool
-Mgr::QueryParams::ParseParam(const String& paramStr, Param& param)
+/**
+ * Parses the value part of a "param=value" URL section.
+ * Value can be a comma-separated list of integers or an opaque string.
+ *
+ *   value  = *pchar | ( 1*DIGIT *( ',' 1*DIGIT ) )
+ *
+ * \note opaque string may be a list with a non-integer (e.g., "1,2,3,z")
+ */
+Mgr::QueryParam::Pointer
+ParseParamValue(const SBuf &rawValue)
+{
+    static const CharacterSet comma("comma", ",");
+
+    Parser::Tokenizer tok(rawValue);
+    std::vector<int> array;
+    int64_t intVal = 0;
+    while (tok.int64(intVal, 10, false)) {
+        Must(intVal >= std::numeric_limits<int>::min());
+        Must(intVal <= std::numeric_limits<int>::max());
+        array.emplace_back(intVal);
+        // integer list has comma between values.
+        // Require at least one potential DIGIT after the skipped ','
+        if (tok.remaining().length() > 1)
+            (void)tok.skipOne(comma);
+    }
+
+    if (tok.atEnd())
+        return new Mgr::IntParam(array);
+    else
+        return new Mgr::StringParam(SBufToString(rawValue));
+}
+
+/**
+ * Syntax:
+ *   query  = [ param *( '&' param ) ]
+ *   param  = name '=' value
+ *   name   = [a-zA-Z0-9]+
+ *   value  = *pchar | ( 1*DIGIT *( ',' 1*DIGIT ) )
+ */
+void
+Mgr::QueryParams::Parse(Parser::Tokenizer &tok, QueryParams &aParams)
 {
-    bool parsed = false;
-    regmatch_t pmatch[3];
-    regex_t intExpr;
-    regcomp(&intExpr, "^([a-z][a-z0-9_]*)=([0-9]+((,[0-9]+))*)$", REG_EXTENDED | REG_ICASE);
-    regex_t stringExpr;
-    regcomp(&stringExpr, "^([a-z][a-z0-9_]*)=([^&= ]+)$", REG_EXTENDED | REG_ICASE);
-    if (regexec(&intExpr, paramStr.termedBuf(), 3, pmatch, 0) == 0) {
-        param.first = paramStr.substr(pmatch[1].rm_so, pmatch[1].rm_eo);
-        std::vector<int> array;
-        int n = pmatch[2].rm_so;
-        for (int i = n; i < pmatch[2].rm_eo; ++i) {
-            if (paramStr[i] == ',') {
-                array.push_back(atoi(paramStr.substr(n, i).termedBuf()));
-                n = i + 1;
-            }
-        }
-        if (n < pmatch[2].rm_eo)
-            array.push_back(atoi(paramStr.substr(n, pmatch[2].rm_eo).termedBuf()));
-        param.second = new IntParam(array);
-        parsed = true;
-    } else if (regexec(&stringExpr, paramStr.termedBuf(), 3, pmatch, 0) == 0) {
-        param.first = paramStr.substr(pmatch[1].rm_so, pmatch[1].rm_eo);
-        param.second = new StringParam(paramStr.substr(pmatch[2].rm_so, pmatch[2].rm_eo));
-        parsed = true;
-    }
-    regfree(&stringExpr);
-    regfree(&intExpr);
-    return parsed;
-}
-
-bool
-Mgr::QueryParams::Parse(const String& aParamsStr, QueryParams& aParams)
-{
-    if (aParamsStr.size() != 0) {
-        Param param;
-        size_t n = 0;
-        size_t len = aParamsStr.size();
-        for (size_t i = n; i < len; ++i) {
-            if (aParamsStr[i] == '&') {
-                if (!ParseParam(aParamsStr.substr(n, i), param))
-                    return false;
-                aParams.params.push_back(param);
-                n = i + 1;
-            }
-        }
-        if (n < len) {
-            if (!ParseParam(aParamsStr.substr(n, len), param))
-                return false;
-            aParams.params.push_back(param);
-        }
+    static const CharacterSet nameChars = CharacterSet("param-name", "_") + CharacterSet::ALPHA + CharacterSet::DIGIT;
+    static const CharacterSet valueChars = CharacterSet("param-value", "&= #").complement();
+    static const CharacterSet delimChars("param-delim", "&");
+
+    while (!tok.atEnd()) {
+
+        // TODO: remove '#' processing when AnyP::Uri splits 'query#fragment' properly
+        // #fragment handled by caller. Do not throw.
+        if (tok.remaining()[0] == '#')
+            return;
+
+        if (tok.skipAll(delimChars))
+            continue;
+
+        SBuf nameStr;
+        if (!tok.prefix(nameStr, nameChars))
+            throw TextException("invalid query parameter name", Here());
+        if (!tok.skip('='))
+            throw TextException("missing parameter value", Here());
+
+        SBuf valueStr;
+        if (!tok.prefix(valueStr, valueChars))
+            throw TextException("missing or malformed parameter value", Here());
+
+        const auto name = SBufToString(nameStr);
+        const auto value = ParseParamValue(valueStr);
+        aParams.params.emplace_back(name, value);
     }
-    return true;
 }
 
 Mgr::QueryParam::Pointer
@@ -138,4 +157,3 @@
     }
     return NULL;
 }
-
diff -u -r -N squid-5.0.5/src/mgr/QueryParams.h squid-5.0.6/src/mgr/QueryParams.h
--- squid-5.0.5/src/mgr/QueryParams.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/QueryParams.h	2021-05-10 21:02:34.000000000 +1200
@@ -13,9 +13,11 @@
 
 #include "ipc/forward.h"
 #include "mgr/QueryParam.h"
+#include "parser/forward.h"
 #include "SquidString.h"
-#include <vector>
+
 #include <utility>
+#include <vector>
 
 namespace Mgr
 {
@@ -32,15 +34,13 @@
     void pack(Ipc::TypedMsgHdr& msg) const; ///< store params into msg
     void unpack(const Ipc::TypedMsgHdr& msg); ///< load params from msg
     /// parses the query string parameters
-    static bool Parse(const String& aParamsStr, QueryParams& aParams);
+    static void Parse(Parser::Tokenizer &, QueryParams &);
 
 private:
     /// find query parameter by name
     Params::const_iterator find(const String& name) const;
     /// creates a parameter of the specified type
     static QueryParam::Pointer CreateParam(QueryParam::Type aType);
-    /// parses string like "param=value"; returns true if success
-    static bool ParseParam(const String& paramStr, Param& param);
 
 private:
     Params params;
diff -u -r -N squid-5.0.5/src/mgr/Request.cc squid-5.0.6/src/mgr/Request.cc
--- squid-5.0.5/src/mgr/Request.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Request.cc	2021-05-10 21:02:34.000000000 +1200
@@ -16,7 +16,9 @@
 #include "mgr/ActionParams.h"
 #include "mgr/Request.h"
 
-Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, const Comm::ConnectionPointer &aConn,
+Mgr::Request::Request(const int aRequestorId,
+                      const Ipc::RequestId aRequestId,
+                      const Comm::ConnectionPointer &aConn,
                       const ActionParams &aParams):
     Ipc::Request(aRequestorId, aRequestId),
     conn(aConn),
@@ -25,14 +27,7 @@
     Must(requestorId > 0);
 }
 
-Mgr::Request::Request(const Request& request):
-    Ipc::Request(request.requestorId, request.requestId),
-    conn(request.conn), params(request.params)
-{
-}
-
-Mgr::Request::Request(const Ipc::TypedMsgHdr& msg):
-    Ipc::Request(0, 0)
+Mgr::Request::Request(const Ipc::TypedMsgHdr &msg)
 {
     msg.checkType(Ipc::mtCacheMgrRequest);
     msg.getPod(requestorId);
diff -u -r -N squid-5.0.5/src/mgr/Request.h squid-5.0.6/src/mgr/Request.h
--- squid-5.0.5/src/mgr/Request.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Request.h	2021-05-10 21:02:34.000000000 +1200
@@ -22,7 +22,7 @@
 class Request: public Ipc::Request
 {
 public:
-    Request(int aRequestorId, unsigned int aRequestId, const Comm::ConnectionPointer &aConn,
+    Request(int aRequestorId, Ipc::RequestId, const Comm::ConnectionPointer &aConn,
             const ActionParams &aParams);
 
     explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
@@ -30,9 +30,6 @@
     virtual void pack(Ipc::TypedMsgHdr& msg) const;
     virtual Pointer clone() const;
 
-private:
-    Request(const Request& request);
-
 public:
     Comm::ConnectionPointer conn; ///< HTTP client connection descriptor
 
diff -u -r -N squid-5.0.5/src/mgr/Response.cc squid-5.0.6/src/mgr/Response.cc
--- squid-5.0.5/src/mgr/Response.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Response.cc	2021-05-10 21:02:34.000000000 +1200
@@ -12,24 +12,19 @@
 #include "base/TextException.h"
 #include "CacheManager.h"
 #include "ipc/Messages.h"
+#include "ipc/RequestId.h"
 #include "ipc/TypedMsgHdr.h"
 #include "mgr/ActionCreator.h"
 #include "mgr/ActionProfile.h"
 #include "mgr/Response.h"
 
-Mgr::Response::Response(unsigned int aRequestId, Action::Pointer anAction):
+Mgr::Response::Response(const Ipc::RequestId aRequestId, const Action::Pointer anAction):
     Ipc::Response(aRequestId), action(anAction)
 {
     Must(!action || action->name()); // if there is an action, it must be named
 }
 
-Mgr::Response::Response(const Response& response):
-    Ipc::Response(response.requestId), action(response.action)
-{
-}
-
-Mgr::Response::Response(const Ipc::TypedMsgHdr& msg):
-    Ipc::Response(0)
+Mgr::Response::Response(const Ipc::TypedMsgHdr &msg)
 {
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(requestId);
diff -u -r -N squid-5.0.5/src/mgr/Response.h squid-5.0.6/src/mgr/Response.h
--- squid-5.0.5/src/mgr/Response.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mgr/Response.h	2021-05-10 21:02:34.000000000 +1200
@@ -23,7 +23,8 @@
 class Response: public Ipc::Response
 {
 public:
-    Response(unsigned int aRequestId, Action::Pointer anAction = NULL);
+    /// sender's constructor
+    Response(Ipc::RequestId, Action::Pointer anAction = nullptr);
 
     explicit Response(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
 
@@ -34,9 +35,6 @@
     bool hasAction() const; ///< whether response contain action object
     const Action& getAction() const; ///< returns action object
 
-private:
-    Response(const Response& response);
-
 public:
     Action::Pointer action; ///< action relating to response
 };
diff -u -r -N squid-5.0.5/src/mk-string-arrays.awk squid-5.0.6/src/mk-string-arrays.awk
--- squid-5.0.5/src/mk-string-arrays.awk	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/mk-string-arrays.awk	2021-05-10 21:02:34.000000000 +1200
@@ -74,7 +74,8 @@
 
 END {
 	if (sbuf) print "#include \"sbuf/SBuf.h\""
-	print "#include \"" nspath type ".h\""
+	if (ifile != "") print "#include \"" ifile "\""
+        else print "#include \"" nspath type ".h\""
 
 	# if namespace is not empty ??
 	if (namespace) print "namespace " namespace
diff -u -r -N squid-5.0.5/src/multicast.cc squid-5.0.6/src/multicast.cc
--- squid-5.0.5/src/multicast.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/multicast.cc	2021-05-10 21:02:34.000000000 +1200
@@ -42,7 +42,7 @@
         return;
     }
 
-    for (const auto ip: ia->goodAndBad()) { // TODO: Consider using just good().
+    for (const auto &ip: ia->goodAndBad()) { // TODO: Consider using just good().
         debugs(7, 9, "Listening for ICP requests on " << ip);
 
         if (!ip.isIPv4()) {
diff -u -r -N squid-5.0.5/src/Notes.cc squid-5.0.6/src/Notes.cc
--- squid-5.0.5/src/Notes.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/Notes.cc	2021-05-10 21:02:34.000000000 +1200
@@ -76,7 +76,7 @@
     if (reply)
         HTTPMSGLOCK(ch.reply);
 
-    for (auto v: values) {
+    for (const auto &v: values) {
         assert(v->aclList);
         const auto ret = ch.fastCheck(v->aclList);
         debugs(93, 5, "Check for header name: " << theKey << ": " << v->value() <<
@@ -93,7 +93,7 @@
 void
 Note::updateNotePairs(NotePairs::Pointer pairs, const CharacterSet *delimiters, const AccessLogEntryPointer &al)
 {
-    for (auto v: values) {
+    for (const auto &v: values) {
         const SBuf &formatted = v->format(al);
         if (!pairs->empty() && v->method() == Value::mhReplace)
             pairs->remove(theKey);
@@ -107,7 +107,7 @@
 void
 Note::dump(StoreEntry *entry, const char *k)
 {
-    for (auto v: values) {
+    for (const auto &v: values) {
         storeAppendPrintf(entry, "%s %.*s %s",
                           k, key().length(), key().rawContent(), ConfigParser::QuoteString(SBufToString(v->value())));
         dump_acl_list(entry, v->aclList);
@@ -119,14 +119,14 @@
 Note::toString(const char *sep) const
 {
     SBuf result;
-    for (auto val: values)
+    for (const auto &val: values)
         result.appendf("%.*s: %.*s%s", key().length(), key().rawContent(),
                        val->value().length(), val->value().rawContent(), sep);
     return result;
 }
 
 const Notes::Keys &
-Notes::BlackList()
+Notes::ReservedKeys()
 {
     // these keys are used for internal Squid-helper communication
     static const char *names[] = {
@@ -147,12 +147,12 @@
     return keys;
 }
 
-Notes::Notes(const char *aDescr, const Keys *extraBlacklist, bool allowFormatted):
+Notes::Notes(const char *aDescr, const Keys *extraReservedKeys, bool allowFormatted):
     descr(aDescr),
     formattedValues(allowFormatted)
 {
-    if (extraBlacklist)
-        blacklist = *extraBlacklist;
+    if (extraReservedKeys)
+        reservedKeys = *extraReservedKeys;
 }
 
 Note::Pointer
@@ -167,7 +167,7 @@
 Note::Pointer
 Notes::find(const SBuf &noteKey)
 {
-    for (auto n: notes)
+    for (const auto &n: notes)
         if (n->key() == noteKey)
             return n;
     return nullptr;
@@ -183,8 +183,8 @@
 void
 Notes::validateKey(const SBuf &key) const
 {
-    banReservedKey(key, BlackList());
-    banReservedKey(key, blacklist);
+    banReservedKey(key, ReservedKeys());
+    banReservedKey(key, reservedKeys);
 
     // TODO: fix code duplication: the same set of specials is produced
     // by isKeyNameChar().
@@ -247,14 +247,14 @@
 void
 Notes::updateNotePairs(NotePairs::Pointer pairs, const CharacterSet *delimiters, const AccessLogEntry::Pointer &al)
 {
-    for (auto n: notes)
+    for (const auto &n: notes)
         n->updateNotePairs(pairs, delimiters, al);
 }
 
 void
 Notes::dump(StoreEntry *entry, const char *key)
 {
-    for (auto n: notes)
+    for (const auto &n: notes)
         n->dump(entry, key);
 }
 
@@ -263,7 +263,7 @@
 {
     static SBuf result;
     result.clear();
-    for (auto note: notes)
+    for (const auto &note: notes)
         result.append(note->toString(sep));
     return result.isEmpty() ? nullptr : result.c_str();
 }
@@ -272,7 +272,7 @@
 NotePairs::find(SBuf &resultNote, const char *noteKey, const char *sep) const
 {
     resultNote.clear();
-    for (auto e: entries) {
+    for (const auto &e: entries) {
         if (!e->name().cmp(noteKey)) {
             if (!resultNote.isEmpty())
                 resultNote.append(sep);
@@ -287,7 +287,7 @@
 {
     static SBuf result;
     result.clear();
-    for (auto e: entries)
+    for (const auto &e: entries)
         result.appendf("%.*s: %.*s%s", e->name().length(), e->name().rawContent(),
                        e->value().length(), e->value().rawContent(), sep);
     return result.isEmpty() ? nullptr : result.c_str();
@@ -296,7 +296,7 @@
 const char *
 NotePairs::findFirst(const char *noteKey) const
 {
-    for (auto e: entries)
+    for (const auto &e: entries)
         if (!e->name().cmp(noteKey))
             return const_cast<SBuf &>(e->value()).c_str();
     return nullptr;
@@ -348,7 +348,7 @@
     if (delimiters) {
         static NotePairs::Entries expandedEntries;
         expandedEntries.clear();
-        for(auto entry: entries)
+        for (const auto &entry: entries)
             AppendTokens(expandedEntries, entry->name(), entry->value(), *delimiters);
         return expandedEntries;
     }
@@ -364,7 +364,7 @@
 bool
 NotePairs::hasPair(const SBuf &key, const SBuf &value) const
 {
-    for (auto e: entries)
+    for (const auto &e: entries)
         if (e->name() == key && e->value() == value)
             return true;
     return false;
@@ -373,14 +373,14 @@
 void
 NotePairs::append(const NotePairs *src)
 {
-    for (auto e: src->entries)
+    for (const auto &e: src->entries)
         entries.push_back(new NotePairs::Entry(e->name(), e->value()));
 }
 
 void
 NotePairs::appendNewOnly(const NotePairs *src)
 {
-    for (auto e: src->entries) {
+    for (const auto &e: src->entries) {
         if (!hasPair(e->name(), e->value()))
             entries.push_back(new NotePairs::Entry(e->name(), e->value()));
     }
@@ -389,7 +389,7 @@
 void
 NotePairs::replaceOrAddOrAppend(const NotePairs *src, const NotePairs::Names &appendables)
 {
-    for (const auto e: src->entries) {
+    for (const auto &e: src->entries) {
         if (std::find(appendables.begin(), appendables.end(), e->name()) == appendables.end())
             remove(e->name());
     }
@@ -399,7 +399,7 @@
 void
 NotePairs::replaceOrAdd(const NotePairs *src)
 {
-    for (auto e: src->entries)
+    for (const auto &e: src->entries)
         remove(e->name());
     append(src);
 }
diff -u -r -N squid-5.0.5/src/Notes.h squid-5.0.6/src/Notes.h
--- squid-5.0.5/src/Notes.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/Notes.h	2021-05-10 21:02:34.000000000 +1200
@@ -114,7 +114,7 @@
     typedef NotesList::iterator iterator; ///< iterates over the notes list
     typedef NotesList::const_iterator const_iterator; ///< iterates over the notes list
 
-    explicit Notes(const char *aDescr, const Keys *extraBlacklist = nullptr, bool allowFormatted = true);
+    explicit Notes(const char *aDescr, const Keys *extraReservedKeys = nullptr, bool allowFormatted = true);
     Notes() = default;
     ~Notes() { notes.clear(); }
     Notes(const Notes&) = delete;
@@ -146,7 +146,7 @@
     /// Makes sure the given key is not on the given list of banned names.
     void banReservedKey(const SBuf &key, const Keys &banned) const;
 
-    /// Verifies that the key is not blacklisted (fatal error) and
+    /// Verifies that the key is not reserved (fatal error) and
     /// does not contain special characters (non-fatal error).
     void validateKey(const SBuf &key) const;
 
@@ -160,10 +160,10 @@
     NotesList notes; ///< The Note::Pointer objects array list
     const char *descr = nullptr; ///< identifies note source in error messages
 
-    Keys blacklist; ///< a list of additional prohibited key names
+    Keys reservedKeys; ///< a list of additional prohibited key names
     bool formattedValues = false; ///< whether to expand quoted logformat %codes
 
-    static const Notes::Keys &BlackList(); ///< always prohibited key names
+    static const Notes::Keys &ReservedKeys(); ///< always prohibited key names
 };
 
 /**
diff -u -r -N squid-5.0.5/src/parser/Makefile.am squid-5.0.6/src/parser/Makefile.am
--- squid-5.0.5/src/parser/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/parser/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,9 +11,9 @@
 noinst_LTLIBRARIES = libparser.la
 
 libparser_la_SOURCES = \
-	BinaryTokenizer.h \
 	BinaryTokenizer.cc \
-	forward.h \
+	BinaryTokenizer.h \
+	Tokenizer.cc \
 	Tokenizer.h \
-	Tokenizer.cc
+	forward.h
 
diff -u -r -N squid-5.0.5/src/parser/Makefile.in squid-5.0.6/src/parser/Makefile.in
--- squid-5.0.5/src/parser/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/parser/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -729,11 +729,11 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libparser.la
 libparser_la_SOURCES = \
-	BinaryTokenizer.h \
 	BinaryTokenizer.cc \
-	forward.h \
+	BinaryTokenizer.h \
+	Tokenizer.cc \
 	Tokenizer.h \
-	Tokenizer.cc
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/Pipeline.cc squid-5.0.6/src/Pipeline.cc
--- squid-5.0.5/src/Pipeline.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/Pipeline.cc	2021-05-10 21:02:34.000000000 +1200
@@ -49,18 +49,6 @@
 }
 
 void
-Pipeline::terminateAll(int xerrno)
-{
-    while (!requests.empty()) {
-        Http::StreamPointer context = requests.front();
-        debugs(33, 3, "Pipeline " << (void*)this << " notify(" << xerrno << ") " << context);
-        context->noteIoError(xerrno);
-        context->finished();  // cleanup and self-deregister
-        assert(context != requests.front());
-    }
-}
-
-void
 Pipeline::popMe(const Http::StreamPointer &which)
 {
     if (requests.empty())
diff -u -r -N squid-5.0.5/src/Pipeline.h squid-5.0.6/src/Pipeline.h
--- squid-5.0.5/src/Pipeline.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/Pipeline.h	2021-05-10 21:02:34.000000000 +1200
@@ -55,9 +55,6 @@
     /// whether there are none or any requests currently pipelined
     bool empty() const {return requests.empty();}
 
-    /// tell everybody about the err, and abort all waiting requests
-    void terminateAll(const int xerrno);
-
     /// deregister the front request from the pipeline
     void popMe(const Http::StreamPointer &);
 
diff -u -r -N squid-5.0.5/src/proxyp/Makefile.am squid-5.0.6/src/proxyp/Makefile.am
--- squid-5.0.5/src/proxyp/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/proxyp/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,11 +11,11 @@
 noinst_LTLIBRARIES = libproxyp.la
 
 libproxyp_la_SOURCES = \
-	forward.h \
-	Elements.h \
 	Elements.cc \
+	Elements.h \
 	Header.cc \
 	Header.h \
 	Parser.cc \
-	Parser.h
+	Parser.h \
+	forward.h
 
diff -u -r -N squid-5.0.5/src/proxyp/Makefile.in squid-5.0.6/src/proxyp/Makefile.in
--- squid-5.0.5/src/proxyp/Makefile.in	2021-02-08 13:40:47.000000000 +1300
+++ squid-5.0.6/src/proxyp/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -729,13 +729,13 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libproxyp.la
 libproxyp_la_SOURCES = \
-	forward.h \
-	Elements.h \
 	Elements.cc \
+	Elements.h \
 	Header.cc \
 	Header.h \
 	Parser.cc \
-	Parser.h
+	Parser.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/proxyp/Parser.cc squid-5.0.6/src/proxyp/Parser.cc
--- squid-5.0.5/src/proxyp/Parser.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/proxyp/Parser.cc	2021-05-10 21:02:34.000000000 +1200
@@ -15,6 +15,7 @@
 #include "sbuf/Stream.h"
 
 #include <algorithm>
+#include <limits>
 
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
diff -u -r -N squid-5.0.5/src/repl/Makefile.am squid-5.0.6/src/repl/Makefile.am
--- squid-5.0.5/src/repl/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/repl/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -16,7 +16,10 @@
 noinst_LIBRARIES = $(REPL_LIBS)
 
 liblru_a_SOURCES = lru/store_repl_lru.cc
-libheap_a_SOURCES = heap/store_heap_replacement.h heap/store_heap_replacement.cc heap/store_repl_heap.cc
+libheap_a_SOURCES = \
+	heap/store_heap_replacement.cc \
+	heap/store_heap_replacement.h \
+	heap/store_repl_heap.cc
 
 
 ## Until such time as we have a makefile in src/repl/heap etc.
diff -u -r -N squid-5.0.5/src/repl/Makefile.in squid-5.0.6/src/repl/Makefile.in
--- squid-5.0.5/src/repl/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/src/repl/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -744,7 +744,11 @@
 EXTRA_LIBRARIES = liblru.a libheap.a
 noinst_LIBRARIES = $(REPL_LIBS)
 liblru_a_SOURCES = lru/store_repl_lru.cc
-libheap_a_SOURCES = heap/store_heap_replacement.h heap/store_heap_replacement.cc heap/store_repl_heap.cc
+libheap_a_SOURCES = \
+	heap/store_heap_replacement.cc \
+	heap/store_heap_replacement.h \
+	heap/store_repl_heap.cc
+
 all: all-am
 
 .SUFFIXES:
diff -u -r -N squid-5.0.5/src/sbuf/Makefile.am squid-5.0.6/src/sbuf/Makefile.am
--- squid-5.0.5/src/sbuf/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/sbuf/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -15,7 +15,6 @@
 	Algorithms.h \
 	DetailedStats.cc \
 	DetailedStats.h \
-	forward.h \
 	List.cc \
 	List.h \
 	MemBlob.cc \
@@ -24,4 +23,5 @@
 	SBuf.h \
 	Stats.cc \
 	Stats.h \
-	Stream.h
+	Stream.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/sbuf/Makefile.in squid-5.0.6/src/sbuf/Makefile.in
--- squid-5.0.5/src/sbuf/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/src/sbuf/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -736,7 +736,6 @@
 	Algorithms.h \
 	DetailedStats.cc \
 	DetailedStats.h \
-	forward.h \
 	List.cc \
 	List.h \
 	MemBlob.cc \
@@ -745,7 +744,8 @@
 	SBuf.h \
 	Stats.cc \
 	Stats.h \
-	Stream.h
+	Stream.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/sbuf/SBuf.cc squid-5.0.6/src/sbuf/SBuf.cc
--- squid-5.0.5/src/sbuf/SBuf.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/sbuf/SBuf.cc	2021-05-10 21:02:34.000000000 +1200
@@ -148,7 +148,7 @@
     debugs(24, 8, id << " finish appending " << actualSize << " bytes");
 
     size_type newSize = length() + actualSize;
-    Must2(newSize <= min(maxSize,store_->capacity-off_), "raw append overflow");
+    Must3(newSize <= min(maxSize, store_->capacity-off_), "raw append fits", Here());
     len_ = newSize;
     store_->size = off_ + newSize;
 }
@@ -258,7 +258,7 @@
     va_copy(ap, vargs);
     sz = vsnprintf(space, spaceSize(), fmt, ap);
     va_end(ap);
-    Must2(sz >= 0, "vsnprintf() output error");
+    Must3(sz >= 0, "vsnprintf() succeeds", Here());
 
     /* check for possible overflow */
     /* snprintf on Linux returns -1 on output errors, or the size
@@ -270,7 +270,7 @@
         requiredSpaceEstimate = sz*2; // TODO: tune heuristics
         space = rawSpace(requiredSpaceEstimate);
         sz = vsnprintf(space, spaceSize(), fmt, vargs);
-        Must2(sz >= 0, "vsnprintf() output error despite increased buffer space");
+        Must3(sz >= 0, "vsnprintf() succeeds (with increased buffer space)", Here());
     }
 
     // data was appended, update internal state
diff -u -r -N squid-5.0.5/src/security/cert_validators/fake/security_fake_certverify.8 squid-5.0.6/src/security/cert_validators/fake/security_fake_certverify.8
--- squid-5.0.5/src/security/cert_validators/fake/security_fake_certverify.8	2021-02-08 13:46:40.000000000 +1300
+++ squid-5.0.6/src/security/cert_validators/fake/security_fake_certverify.8	2021-05-10 23:02:25.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "SECURITY_FAKE_CERTVERIFY 8"
-.TH SECURITY_FAKE_CERTVERIFY 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH SECURITY_FAKE_CERTVERIFY 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/security/ErrorDetail.cc squid-5.0.6/src/security/ErrorDetail.cc
--- squid-5.0.5/src/security/ErrorDetail.cc	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/security/ErrorDetail.cc	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,744 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#include "squid.h"
+#include "error/SysErrorDetail.h"
+#include "html_quote.h"
+#include "sbuf/SBuf.h"
+#include "sbuf/Stream.h"
+#include "security/ErrorDetail.h"
+#include "security/forward.h"
+#include "security/Io.h"
+#include "util.h"
+
+#if USE_OPENSSL
+#include "ssl/ErrorDetailManager.h"
+#elif USE_GNUTLS
+#if HAVE_GNUTLS_GNUTLS_H
+#include <gnutls/gnutls.h>
+#endif
+#endif
+#include <map>
+
+namespace Security {
+
+// we use std::map to optimize search; TODO: Use std::unordered_map instead?
+typedef std::map<ErrorCode, const char *> ErrorCodeNames;
+static const ErrorCodeNames TheErrorCodeNames = {
+    {   SQUID_TLS_ERR_ACCEPT,
+        "SQUID_TLS_ERR_ACCEPT"
+    },
+    {   SQUID_TLS_ERR_CONNECT,
+        "SQUID_TLS_ERR_CONNECT"
+    },
+    {   SQUID_X509_V_ERR_INFINITE_VALIDATION,
+        "SQUID_X509_V_ERR_INFINITE_VALIDATION"
+    },
+    {   SQUID_X509_V_ERR_CERT_CHANGE,
+        "SQUID_X509_V_ERR_CERT_CHANGE"
+    },
+    {   SQUID_X509_V_ERR_DOMAIN_MISMATCH,
+        "SQUID_X509_V_ERR_DOMAIN_MISMATCH"
+    },
+#if USE_OPENSSL
+    {   X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
+        "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT"
+    },
+    {   X509_V_ERR_UNABLE_TO_GET_CRL,
+        "X509_V_ERR_UNABLE_TO_GET_CRL"
+    },
+    {   X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE,
+        "X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE"
+    },
+    {   X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE,
+        "X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE"
+    },
+    {   X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,
+        "X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY"
+    },
+    {   X509_V_ERR_CERT_SIGNATURE_FAILURE,
+        "X509_V_ERR_CERT_SIGNATURE_FAILURE"
+    },
+    {   X509_V_ERR_CRL_SIGNATURE_FAILURE,
+        "X509_V_ERR_CRL_SIGNATURE_FAILURE"
+    },
+    {   X509_V_ERR_CERT_NOT_YET_VALID,
+        "X509_V_ERR_CERT_NOT_YET_VALID"
+    },
+    {   X509_V_ERR_CERT_HAS_EXPIRED,
+        "X509_V_ERR_CERT_HAS_EXPIRED"
+    },
+    {   X509_V_ERR_CRL_NOT_YET_VALID,
+        "X509_V_ERR_CRL_NOT_YET_VALID"
+    },
+    {   X509_V_ERR_CRL_HAS_EXPIRED,
+        "X509_V_ERR_CRL_HAS_EXPIRED"
+    },
+    {   X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD,
+        "X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD"
+    },
+    {   X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD,
+        "X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD"
+    },
+    {   X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD,
+        "X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD"
+    },
+    {   X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD,
+        "X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD"
+    },
+    {   X509_V_ERR_OUT_OF_MEM,
+        "X509_V_ERR_OUT_OF_MEM"
+    },
+    {   X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
+        "X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT"
+    },
+    {   X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
+        "X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN"
+    },
+    {   X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
+        "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY"
+    },
+    {   X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
+        "X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE"
+    },
+    {   X509_V_ERR_CERT_CHAIN_TOO_LONG,
+        "X509_V_ERR_CERT_CHAIN_TOO_LONG"
+    },
+    {   X509_V_ERR_CERT_REVOKED,
+        "X509_V_ERR_CERT_REVOKED"
+    },
+    {   X509_V_ERR_INVALID_CA,
+        "X509_V_ERR_INVALID_CA"
+    },
+    {   X509_V_ERR_PATH_LENGTH_EXCEEDED,
+        "X509_V_ERR_PATH_LENGTH_EXCEEDED"
+    },
+    {   X509_V_ERR_INVALID_PURPOSE,
+        "X509_V_ERR_INVALID_PURPOSE"
+    },
+    {   X509_V_ERR_CERT_UNTRUSTED,
+        "X509_V_ERR_CERT_UNTRUSTED"
+    },
+    {   X509_V_ERR_CERT_REJECTED,
+        "X509_V_ERR_CERT_REJECTED"
+    },
+    {   X509_V_ERR_SUBJECT_ISSUER_MISMATCH,
+        "X509_V_ERR_SUBJECT_ISSUER_MISMATCH"
+    },
+    {   X509_V_ERR_AKID_SKID_MISMATCH,
+        "X509_V_ERR_AKID_SKID_MISMATCH"
+    },
+    {   X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH,
+        "X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH"
+    },
+    {   X509_V_ERR_KEYUSAGE_NO_CERTSIGN,
+        "X509_V_ERR_KEYUSAGE_NO_CERTSIGN"
+    },
+#if defined(X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER)
+    {
+        X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER, // 33
+        "X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER"
+    },
+#endif
+#if defined(X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION)
+    {
+        X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION, // 34
+        "X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION"
+    },
+#endif
+#if defined(X509_V_ERR_KEYUSAGE_NO_CRL_SIGN)
+    {
+        X509_V_ERR_KEYUSAGE_NO_CRL_SIGN, // 35
+        "X509_V_ERR_KEYUSAGE_NO_CRL_SIGN"
+    },
+#endif
+#if defined(X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION)
+    {
+        X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION, // 36
+        "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION"
+    },
+#endif
+#if defined(X509_V_ERR_INVALID_NON_CA)
+    {
+        X509_V_ERR_INVALID_NON_CA, // 37
+        "X509_V_ERR_INVALID_NON_CA"
+    },
+#endif
+#if defined(X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED)
+    {
+        X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED, // 38
+        "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED"
+    },
+#endif
+#if defined(X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE)
+    {
+        X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE, // 39
+        "X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE"
+    },
+#endif
+#if defined(X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED)
+    {
+        X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED, // 40
+        "X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED"
+    },
+#endif
+#if defined(X509_V_ERR_INVALID_EXTENSION)
+    {
+        X509_V_ERR_INVALID_EXTENSION, // 41
+        "X509_V_ERR_INVALID_EXTENSION"
+    },
+#endif
+#if defined(X509_V_ERR_INVALID_POLICY_EXTENSION)
+    {
+        X509_V_ERR_INVALID_POLICY_EXTENSION, // 42
+        "X509_V_ERR_INVALID_POLICY_EXTENSION"
+    },
+#endif
+#if defined(X509_V_ERR_NO_EXPLICIT_POLICY)
+    {
+        X509_V_ERR_NO_EXPLICIT_POLICY, // 43
+        "X509_V_ERR_NO_EXPLICIT_POLICY"
+    },
+#endif
+#if defined(X509_V_ERR_DIFFERENT_CRL_SCOPE)
+    {
+        X509_V_ERR_DIFFERENT_CRL_SCOPE, // 44
+        "X509_V_ERR_DIFFERENT_CRL_SCOPE"
+    },
+#endif
+#if defined(X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE)
+    {
+        X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE, // 45
+        "X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE"
+    },
+#endif
+#if defined(X509_V_ERR_UNNESTED_RESOURCE)
+    {
+        X509_V_ERR_UNNESTED_RESOURCE, // 46
+        "X509_V_ERR_UNNESTED_RESOURCE"
+    },
+#endif
+#if defined(X509_V_ERR_PERMITTED_VIOLATION)
+    {
+        X509_V_ERR_PERMITTED_VIOLATION, // 47
+        "X509_V_ERR_PERMITTED_VIOLATION"
+    },
+#endif
+#if defined(X509_V_ERR_EXCLUDED_VIOLATION)
+    {
+        X509_V_ERR_EXCLUDED_VIOLATION, // 48
+        "X509_V_ERR_EXCLUDED_VIOLATION"
+    },
+#endif
+#if defined(X509_V_ERR_SUBTREE_MINMAX)
+    {
+        X509_V_ERR_SUBTREE_MINMAX, // 49
+        "X509_V_ERR_SUBTREE_MINMAX"
+    },
+#endif
+    {   X509_V_ERR_APPLICATION_VERIFICATION, // 50
+        "X509_V_ERR_APPLICATION_VERIFICATION"
+    },
+#if defined(X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE)
+    {
+        X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE, // 51
+        "X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE"
+    },
+#endif
+#if defined(X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX)
+    {
+        X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX, // 52
+        "X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX"
+    },
+#endif
+#if defined(X509_V_ERR_UNSUPPORTED_NAME_SYNTAX)
+    {
+        X509_V_ERR_UNSUPPORTED_NAME_SYNTAX, // 53
+        "X509_V_ERR_UNSUPPORTED_NAME_SYNTAX"
+    },
+#endif
+#if defined(X509_V_ERR_CRL_PATH_VALIDATION_ERROR)
+    {
+        X509_V_ERR_CRL_PATH_VALIDATION_ERROR, // 54
+        "X509_V_ERR_CRL_PATH_VALIDATION_ERROR"
+    },
+#endif
+#if defined(X509_V_ERR_PATH_LOOP)
+    {
+        X509_V_ERR_PATH_LOOP, // 55
+        "X509_V_ERR_PATH_LOOP"
+    },
+#endif
+#if defined(X509_V_ERR_SUITE_B_INVALID_VERSION)
+    {
+        X509_V_ERR_SUITE_B_INVALID_VERSION, // 56
+        "X509_V_ERR_SUITE_B_INVALID_VERSION"
+    },
+#endif
+#if defined(X509_V_ERR_SUITE_B_INVALID_ALGORITHM)
+    {
+        X509_V_ERR_SUITE_B_INVALID_ALGORITHM, // 57
+        "X509_V_ERR_SUITE_B_INVALID_ALGORITHM"
+    },
+#endif
+#if defined(X509_V_ERR_SUITE_B_INVALID_CURVE)
+    {
+        X509_V_ERR_SUITE_B_INVALID_CURVE, // 58
+        "X509_V_ERR_SUITE_B_INVALID_CURVE"
+    },
+#endif
+#if defined(X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM)
+    {
+        X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM, // 59
+        "X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM"
+    },
+#endif
+#if defined(X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED)
+    {
+        X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED, // 60
+        "X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED"
+    },
+#endif
+#if defined(X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256)
+    {
+        X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256, // 61
+        "X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256"
+    },
+#endif
+#if defined(X509_V_ERR_HOSTNAME_MISMATCH)
+    {
+        X509_V_ERR_HOSTNAME_MISMATCH, // 62
+        "X509_V_ERR_HOSTNAME_MISMATCH"
+    },
+#endif
+#if defined(X509_V_ERR_EMAIL_MISMATCH)
+    {
+        X509_V_ERR_EMAIL_MISMATCH, // 63
+        "X509_V_ERR_EMAIL_MISMATCH"
+    },
+#endif
+#if defined(X509_V_ERR_IP_ADDRESS_MISMATCH)
+    {
+        X509_V_ERR_IP_ADDRESS_MISMATCH, // 64
+        "X509_V_ERR_IP_ADDRESS_MISMATCH"
+    },
+#endif
+#if defined(X509_V_ERR_DANE_NO_MATCH)
+    {
+        X509_V_ERR_DANE_NO_MATCH, // 65
+        "X509_V_ERR_DANE_NO_MATCH"
+    },
+#endif
+#if defined(X509_V_ERR_EE_KEY_TOO_SMALL)
+    {
+        X509_V_ERR_EE_KEY_TOO_SMALL, // 66
+        "X509_V_ERR_EE_KEY_TOO_SMALL"
+    },
+#endif
+#if defined(X509_V_ERR_CA_KEY_TOO_SMALL)
+    {
+        X509_V_ERR_CA_KEY_TOO_SMALL, // 67
+        "X509_V_ERR_CA_KEY_TOO_SMALL"
+    },
+#endif
+#if defined(X509_V_ERR_CA_MD_TOO_WEAK)
+    {
+        X509_V_ERR_CA_MD_TOO_WEAK, // 68
+        "X509_V_ERR_CA_MD_TOO_WEAK"
+    },
+#endif
+#if defined(X509_V_ERR_INVALID_CALL)
+    {
+        X509_V_ERR_INVALID_CALL, // 69
+        "X509_V_ERR_INVALID_CALL"
+    },
+#endif
+#if defined(X509_V_ERR_STORE_LOOKUP)
+    {
+        X509_V_ERR_STORE_LOOKUP, // 70
+        "X509_V_ERR_STORE_LOOKUP"
+    },
+#endif
+#if defined(X509_V_ERR_NO_VALID_SCTS)
+    {
+        X509_V_ERR_NO_VALID_SCTS, // 71
+        "X509_V_ERR_NO_VALID_SCTS"
+    },
+#endif
+#if defined(X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION)
+    {
+        X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION, // 72
+        "X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION"
+    },
+#endif
+#if defined(X509_V_ERR_OCSP_VERIFY_NEEDED)
+    {
+        X509_V_ERR_OCSP_VERIFY_NEEDED, // 73
+        "X509_V_ERR_OCSP_VERIFY_NEEDED"
+    },
+#endif
+#if defined(X509_V_ERR_OCSP_VERIFY_FAILED)
+    {
+        X509_V_ERR_OCSP_VERIFY_FAILED, // 74
+        "X509_V_ERR_OCSP_VERIFY_FAILED"
+    },
+#endif
+#if defined(X509_V_ERR_OCSP_CERT_UNKNOWN)
+    {
+        X509_V_ERR_OCSP_CERT_UNKNOWN, // 75
+        "X509_V_ERR_OCSP_CERT_UNKNOWN"
+    },
+#endif
+    {
+        SSL_ERROR_NONE,
+        "SSL_ERROR_NONE"
+    },
+#endif // USE_OPENSSL
+};
+
+} // namespace Security
+
+Security::ErrorCode
+Security::ErrorCodeFromName(const char *name)
+{
+    static auto TheCmp = [](const char *a, const char *b) {return strcmp(a, b) < 0;};
+    static std::map<const char *, ErrorCode, decltype(TheCmp)> TheErrorCodeByNameIndx(TheCmp);
+    if (TheErrorCodeByNameIndx.empty()) {
+        for (const auto &i: TheErrorCodeNames)
+            TheErrorCodeByNameIndx.insert(std::make_pair(i.second, i.first));
+
+        // redirector to support legacy error translations
+        TheErrorCodeByNameIndx.insert(std::make_pair("SQUID_ERR_SSL_HANDSHAKE", SQUID_TLS_ERR_CONNECT));
+    }
+
+    const auto it = TheErrorCodeByNameIndx.find(name);
+    if (it != TheErrorCodeByNameIndx.end())
+        return it->second;
+
+    return 0;
+}
+
+const char *
+Security::ErrorNameFromCode(const ErrorCode err, const bool prefixRawCode)
+{
+    const auto it = TheErrorCodeNames.find(err);
+    if (it != TheErrorCodeNames.end())
+        return it->second;
+
+    static char tmpBuffer[128];
+    snprintf(tmpBuffer, sizeof(tmpBuffer), "%s%d",
+             (prefixRawCode ? "SSL_ERR=" : ""), static_cast<int>(err));
+    return tmpBuffer;
+}
+
+/* Security::ErrorDetail */
+
+/// helper constructor implementing the logic shared by the two public ones
+Security::ErrorDetail::ErrorDetail(const ErrorCode err, const int aSysErrorNo):
+    error_no(err),
+    // We could restrict errno(3) collection to cases where the TLS library
+    // explicitly talks about the errno being set, but correctly detecting those
+    // cases is difficult. We simplify in hope that all other cases will either
+    // have a useful errno or a zero errno.
+    sysErrorNo(aSysErrorNo)
+{
+#if USE_OPENSSL
+    /// Extract and remember errors stored internally by the TLS library.
+    if ((lib_error_no = ERR_get_error())) {
+        debugs(83, 7, "got " << asHex(lib_error_no));
+        // more errors may be stacked
+        // TODO: Save/detail all stacked errors by always flushing stale ones.
+        ForgetErrors();
+    }
+#else
+    // other libraries return errors explicitly instead of auto-storing them
+#endif
+}
+
+Security::ErrorDetail::ErrorDetail(const ErrorCode anErrorCode, const CertPointer &cert, const CertPointer &broken, const char *aReason):
+    ErrorDetail(anErrorCode, 0)
+{
+    errReason = aReason;
+    peer_cert = cert;
+    broken_cert = broken ? broken : cert;
+}
+
+#if USE_OPENSSL
+Security::ErrorDetail::ErrorDetail(const ErrorCode anErrorCode, const int anIoErrorNo, const int aSysErrorNo):
+    ErrorDetail(anErrorCode, aSysErrorNo)
+{
+    ioErrorNo = anIoErrorNo;
+}
+
+#elif USE_GNUTLS
+Security::ErrorDetail::ErrorDetail(const ErrorCode anErrorCode, const LibErrorCode aLibErrorNo, const int aSysErrorNo):
+    ErrorDetail(anErrorCode, aSysErrorNo)
+{
+    lib_error_no = aLibErrorNo;
+}
+#endif
+
+void
+Security::ErrorDetail::setPeerCertificate(const CertPointer &cert)
+{
+    assert(cert);
+    assert(!peer_cert);
+    assert(!broken_cert);
+    peer_cert = cert;
+    // unlike the constructor, the supplied certificate is not a broken_cert
+}
+
+SBuf
+Security::ErrorDetail::brief() const
+{
+    SBuf buf(err_code()); // TODO: Upgrade err_code()/etc. to return SBuf.
+
+    if (lib_error_no) {
+#if USE_OPENSSL
+        // TODO: Log ERR_error_string_n() instead, despite length, whitespace?
+        // Example: `error:1408F09C:SSL routines:ssl3_get_record:http request`.
+        buf.append(ToSBuf("+TLS_LIB_ERR=", std::hex, std::uppercase, lib_error_no));
+#elif USE_GNUTLS
+        buf.append(ToSBuf("+", gnutls_strerror_name(lib_error_no)));
+#endif
+    }
+
+#if USE_OPENSSL
+    // TODO: Consider logging long but human-friendly names (e.g.,
+    // SSL_ERROR_SYSCALL).
+    if (ioErrorNo)
+        buf.append(ToSBuf("+TLS_IO_ERR=", ioErrorNo));
+#endif
+
+    if (sysErrorNo) {
+        buf.append('+');
+        buf.append(SysErrorDetail::Brief(sysErrorNo));
+    }
+
+    if (broken_cert)
+        buf.append("+broken_cert");
+
+    return buf;
+}
+
+SBuf
+Security::ErrorDetail::verbose(const HttpRequestPointer &request) const
+{
+    char const *format = nullptr;
+#if USE_OPENSSL
+    if (Ssl::ErrorDetailsManager::GetInstance().getErrorDetail(error_no, request, detailEntry))
+        format = detailEntry.detail.termedBuf();
+#endif
+    if (!format)
+        format = "SSL handshake error (%err_name)";
+
+    SBuf errDetailStr;
+    assert(format);
+    auto remainder = format;
+    while (auto p = strchr(remainder, '%')) {
+        errDetailStr.append(remainder, p - remainder);
+        char const *converted = nullptr;
+        const auto formattingCodeLen = convert(++p, &converted);
+        if (formattingCodeLen)
+            errDetailStr.append(converted);
+        else
+            errDetailStr.append("%");
+        remainder = p + formattingCodeLen;
+    }
+    errDetailStr.append(remainder, strlen(remainder));
+    return errDetailStr;
+}
+
+/// textual representation of the subject of the broken certificate
+const char *
+Security::ErrorDetail::subject() const
+{
+#if USE_OPENSSL
+    if (broken_cert.get()) {
+        static char tmpBuffer[256]; // A temporary buffer
+        if (X509_NAME_oneline(X509_get_subject_name(broken_cert.get()), tmpBuffer, sizeof(tmpBuffer))) {
+            // quote to avoid possible html code injection through
+            // certificate subject
+            return html_quote(tmpBuffer);
+        }
+    }
+#endif // USE_OPENSSL
+    return "[Not available]";
+}
+
+#if USE_OPENSSL
+/// helper function to collect CNs using Ssl::matchX509CommonNames()
+static int
+copy_cn(void *check_data,  ASN1_STRING *cn_data)
+{
+    const auto str = static_cast<String*>(check_data);
+    if (!str) // no data? abort
+        return 0;
+    if (cn_data && cn_data->length) {
+        if (str->size() > 0)
+            str->append(", ");
+        str->append(reinterpret_cast<const char *>(cn_data->data), cn_data->length);
+    }
+    return 1;
+}
+#endif // USE_OPENSSL
+
+/// a list of the broken certificates CN and alternate names
+const char *
+Security::ErrorDetail::cn() const
+{
+#if USE_OPENSSL
+    if (broken_cert.get()) {
+        static String tmpStr;
+        tmpStr.clean();
+        Ssl::matchX509CommonNames(broken_cert.get(), &tmpStr, copy_cn);
+        if (tmpStr.size()) {
+            // quote to avoid possible HTML code injection through
+            // certificate subject
+            return html_quote(tmpStr.termedBuf());
+        }
+    }
+#endif // USE_OPENSSL
+    return "[Not available]";
+}
+
+/// the issuer of the broken certificate
+const char *
+Security::ErrorDetail::ca_name() const
+{
+#if USE_OPENSSL
+    if (broken_cert.get()) {
+        static char tmpBuffer[256]; // A temporary buffer
+        if (X509_NAME_oneline(X509_get_issuer_name(broken_cert.get()), tmpBuffer, sizeof(tmpBuffer))) {
+            // quote to avoid possible html code injection through
+            // certificate issuer subject
+            return html_quote(tmpBuffer);
+        }
+    }
+#endif // USE_OPENSSL
+    return "[Not available]";
+}
+
+/// textual representation of the "not before" field of the broken certificate
+const char *
+Security::ErrorDetail::notbefore() const
+{
+#if USE_OPENSSL
+    if (broken_cert.get()) {
+        if (const auto tm = X509_getm_notBefore(broken_cert.get())) {
+            static char tmpBuffer[256]; // A temporary buffer
+            Ssl::asn1timeToString(tm, tmpBuffer, sizeof(tmpBuffer));
+            return tmpBuffer;
+        }
+    }
+#endif // USE_OPENSSL
+    return "[Not available]";
+}
+
+/// textual representation of the "not after" field of the broken certificate
+const char *
+Security::ErrorDetail::notafter() const
+{
+#if USE_OPENSSL
+    if (broken_cert.get()) {
+        if (const auto tm = X509_getm_notAfter(broken_cert.get())) {
+            static char tmpBuffer[256]; // A temporary buffer
+            Ssl::asn1timeToString(tm, tmpBuffer, sizeof(tmpBuffer));
+            return tmpBuffer;
+        }
+    }
+#endif // USE_OPENSSL
+    return "[Not available]";
+}
+
+/// textual representation of error_no
+const char *
+Security::ErrorDetail::err_code() const
+{
+#if USE_OPENSSL
+    // try detailEntry first because it is faster
+    if (const char *err = detailEntry.name.termedBuf())
+        return err;
+#endif
+
+    return ErrorNameFromCode(error_no);
+}
+
+/// short description of error_no
+const char *
+Security::ErrorDetail::err_descr() const
+{
+    if (!error_no)
+        return "[No Error]";
+#if USE_OPENSSL
+    if (const char *err = detailEntry.descr.termedBuf())
+        return err;
+#endif
+    return "[Not available]";
+}
+
+/// textual representation of lib_error_no
+const char *
+Security::ErrorDetail::err_lib_error() const
+{
+    if (errReason.size() > 0)
+        return errReason.termedBuf();
+    else if (lib_error_no)
+        return ErrorString(lib_error_no);
+    else
+        return "[No Error]";
+    return "[Not available]";
+}
+
+/**
+ * Converts the code to a string value. Supported formatting codes are:
+ *
+ * Error meta information:
+ * %err_name: The name of a high-level SSL error (e.g., X509_V_ERR_*)
+ * %ssl_error_descr: A short description of the SSL error
+ * %ssl_lib_error: human-readable low-level error string by ErrorString()
+ *
+ * Certificate information extracted from broken (not necessarily peer!) cert
+ * %ssl_cn: The comma-separated list of common and alternate names
+ * %ssl_subject: The certificate subject
+ * %ssl_ca_name: The certificate issuer name
+ * %ssl_notbefore: The certificate "not before" field
+ * %ssl_notafter: The certificate "not after" field
+ *
+ \returns the length of the code (the number of characters to be replaced by value)
+ \retval 0 for unsupported codes
+*/
+size_t
+Security::ErrorDetail::convert(const char *code, const char **value) const
+{
+    typedef const char *(ErrorDetail::*PartDescriber)() const;
+    static const std::map<const char*, PartDescriber> PartDescriberByCode = {
+        {"ssl_subject", &ErrorDetail::subject},
+        {"ssl_ca_name", &ErrorDetail::ca_name},
+        {"ssl_cn", &ErrorDetail::cn},
+        {"ssl_notbefore", &ErrorDetail::notbefore},
+        {"ssl_notafter", &ErrorDetail::notafter},
+        {"err_name", &ErrorDetail::err_code},
+        {"ssl_error_descr", &ErrorDetail::err_descr},
+        {"ssl_lib_error", &ErrorDetail::err_lib_error}
+    };
+
+    for (const auto &pair: PartDescriberByCode) {
+        const auto len = strlen(pair.first);
+        if (strncmp(code, pair.first, len) == 0) {
+            const auto method = pair.second;
+            *value = (this->*method)();
+            return len;
+        }
+    }
+
+    // TODO: Support logformat %codes.
+    *value = ""; // unused with zero return
+    return 0;
+}
+
diff -u -r -N squid-5.0.5/src/security/ErrorDetail.h squid-5.0.6/src/security/ErrorDetail.h
--- squid-5.0.5/src/security/ErrorDetail.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/security/ErrorDetail.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef SQUID_SRC_SECURITY_DETAIL_H
+#define SQUID_SRC_SECURITY_DETAIL_H
+
+#include "base/RefCount.h"
+#include "error/Detail.h"
+#include "http/forward.h"
+#include "security/forward.h"
+#include "SquidString.h"
+
+#if USE_OPENSSL
+#include "ssl/ErrorDetailManager.h"
+#endif
+
+namespace Security {
+
+/// Details a TLS-related error. Two kinds of errors can be detailed:
+/// * certificate validation errors (including built-in and helper-driven) and
+/// * TLS logic and I/O errors (detected by Squid or the TLS library).
+///
+/// The following details may be available (only the first one is required):
+/// * for all errors: problem classification (\see ErrorCode)
+/// * for all errors: peer certificate
+/// * for certificate validation errors: the broken certificate
+/// * for certificate validation errors: validation failure reason
+/// * for non-validation errors: TLS library-reported error(s)
+/// * for non-validation errors: system call errno(3)
+class ErrorDetail: public ::ErrorDetail
+{
+    MEMPROXY_CLASS(Security::ErrorDetail);
+
+public:
+    typedef ErrorDetailPointer Pointer;
+
+    /// Details a server-side certificate verification failure.
+    /// If `broken` is nil, then the broken certificate is the peer certificate.
+    ErrorDetail(ErrorCode err_no, const CertPointer &peer, const CertPointer &broken, const char *aReason = NULL);
+
+#if USE_OPENSSL
+    /// Details (or starts detailing) a non-validation failure.
+    /// \param anIoErrorNo TLS I/O function outcome; \see ErrorDetail::ioErrorNo
+    /// \param aSysErrorNo saved errno(3); \see ErrorDetail::sysErrorNo
+    ErrorDetail(ErrorCode anErrorCode, int anIoErrorNo, int aSysErrorNo);
+#elif USE_GNUTLS
+    /// Details (or starts detailing) a non-validation failure.
+    /// \param anLibErrorNo TLS function outcome; \see ErrorDetail::lib_error_no
+    /// \param aSysErrorNo saved errno(3); \see ErrorDetail::sysErrorNo
+    ErrorDetail(ErrorCode anErrorCode, LibErrorCode aLibErrorNo, int aSysErrorNo);
+#endif
+
+    /* ErrorDetail API */
+    virtual SBuf brief() const;
+    virtual SBuf verbose(const HttpRequestPointer &) const;
+
+    /// \returns error category; \see ErrorCode
+    ErrorCode errorNo() const { return error_no; }
+
+    /// \returns the previously saved errno(3) or zero
+    int sysError() const { return sysErrorNo; }
+
+    /* Certificate manipulation API. TODO: Add GnuTLS implementations, users. */
+
+    /// the peer certificate (or nil)
+    Certificate *peerCert() { return peer_cert.get(); }
+
+    /// peer or intermediate certificate that failed validation (or nil)
+    Certificate *brokenCert() {return broken_cert.get(); }
+
+    /// remember the SSL certificate of our peer; requires nil peerCert()
+    /// unlike the cert-setting constructor, does not assume the cert is bad
+    void setPeerCertificate(const CertPointer &);
+
+private:
+    ErrorDetail(ErrorCode err, int aSysErrorNo);
+
+    /* methods for formatting error details using admin-configurable %codes */
+    const char *subject() const;
+    const char *ca_name() const;
+    const char *cn() const;
+    const char *notbefore() const;
+    const char *notafter() const;
+    const char *err_code() const;
+    const char *err_descr() const;
+    const char *err_lib_error() const;
+    size_t convert(const char *code, const char **value) const;
+
+    CertPointer peer_cert; ///< A pointer to the peer certificate
+    CertPointer broken_cert; ///< A pointer to the broken certificate (peer or intermediate)
+
+    /// Squid-discovered error, validation error, or zero; \see ErrorCode
+    ErrorCode error_no = 0;
+
+    /// TLS library-reported non-validation error or zero; \see LibErrorCode
+    LibErrorCode lib_error_no = 0;
+
+    /// errno(3); system call failure code or zero
+    int sysErrorNo = 0;
+
+#if USE_OPENSSL
+    /// OpenSSL-specific (first-level or intermediate) TLS I/O operation result
+    /// reported by SSL_get_error(3SSL) (e.g., SSL_ERROR_SYSCALL) or zero.
+    /// Unlike lib_error_no, this error is mostly meant for I/O control and has
+    /// no OpenSSL-provided human-friendly text representation.
+    int ioErrorNo = 0;
+
+    using ErrorDetailEntry = Ssl::ErrorDetailEntry;
+    mutable ErrorDetailEntry detailEntry;
+#else
+    // other TLS libraries do not use custom ErrorDetail members
+#endif
+
+    String errReason; ///< a custom reason for the error
+};
+
+/// \returns ErrorCode with a given name (or zero)
+ErrorCode ErrorCodeFromName(const char *name);
+
+/// \returns string representation of ErrorCode, including raw X.509 error codes
+/// \param prefixRawCode whether to prefix raw codes with "SSL_ERR="
+const char *ErrorNameFromCode(ErrorCode err, bool prefixRawCode = false);
+
+}
+
+#endif
+
diff -u -r -N squid-5.0.5/src/security/forward.h squid-5.0.6/src/security/forward.h
--- squid-5.0.5/src/security/forward.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/forward.h	2021-05-10 21:02:34.000000000 +1200
@@ -10,6 +10,7 @@
 #define SQUID_SRC_SECURITY_FORWARD_H
 
 #include "base/CbDataList.h"
+#include "base/forward.h"
 #include "security/Context.h"
 #include "security/Session.h"
 
@@ -17,6 +18,7 @@
 #include <gnutls/abstract.h>
 #endif
 #include <list>
+#include <limits>
 #if USE_OPENSSL
 #include "compat/openssl.h"
 #if HAVE_OPENSSL_BN_H
@@ -60,12 +62,20 @@
 typedef CbDataList<Security::CertError> CertErrors;
 
 #if USE_OPENSSL
+typedef X509 Certificate;
+#elif USE_GNUTLS
+typedef struct gnutls_x509_crt_int Certificate;
+#else
+typedef class {} Certificate;
+#endif
+
+#if USE_OPENSSL
 CtoCpp1(X509_free, X509 *);
 typedef Security::LockingPointer<X509, X509_free_cpp, HardFun<int, X509 *, X509_up_ref> > CertPointer;
 #elif USE_GNUTLS
 typedef std::shared_ptr<struct gnutls_x509_crt_int> CertPointer;
 #else
-typedef std::shared_ptr<void> CertPointer;
+typedef std::shared_ptr<Certificate> CertPointer;
 #endif
 
 #if USE_OPENSSL
@@ -91,10 +101,26 @@
 
 class EncryptorAnswer;
 
-/// Squid defined error code (<0), an error code returned by X.509 API, or SSL_ERROR_NONE
+/// Squid-defined error code (<0), an error code returned by X.509 API, or zero
 typedef int ErrorCode;
 
-inline const char *ErrorString(const ErrorCode code) {
+/// TLS library-reported non-validation error
+#if USE_OPENSSL
+/// the result of the first ERR_get_error(3SSL) call after a library call;
+/// `openssl errstr` expands these numbers into human-friendlier strings like
+/// `error:1408F09C:SSL routines:ssl3_get_record:http request`
+typedef unsigned long LibErrorCode;
+#elif USE_GNUTLS
+/// the result of an API function like gnutls_handshake() (e.g.,
+/// GNUTLS_E_WARNING_ALERT_RECEIVED)
+typedef int LibErrorCode;
+#else
+/// should always be zero and virtually unused
+typedef int LibErrorCode;
+#endif
+
+/// converts numeric LibErrorCode into a human-friendlier string
+inline const char *ErrorString(const LibErrorCode code) {
 #if USE_OPENSSL
     return ERR_error_string(code, nullptr);
 #elif USE_GNUTLS
@@ -127,6 +153,9 @@
 
 } // namespace Io
 
+// TODO: Either move to Security::Io or remove/restrict the Io namespace.
+class IoResult;
+
 class KeyData;
 
 #if USE_OPENSSL
@@ -156,7 +185,29 @@
 
 class ServerOptions;
 
+class ErrorDetail;
+typedef RefCount<ErrorDetail> ErrorDetailPointer;
+
 } // namespace Security
 
+/// Squid-specific TLS handling errors (a subset of ErrorCode)
+/// These errors either distinguish high-level library calls/contexts or
+/// supplement official certificate validation errors to cover special cases.
+/// We use negative values, assuming that those official errors are positive.
+enum {
+    SQUID_TLS_ERR_OFFSET = std::numeric_limits<int>::min(),
+
+    /* TLS library calls/contexts other than validation (e.g., I/O) */
+    SQUID_TLS_ERR_ACCEPT, ///< failure to accept a connection from a TLS client
+    SQUID_TLS_ERR_CONNECT, ///< failure to establish a connection with a TLS server
+
+    /* certificate validation problems not covered by official errors */
+    SQUID_X509_V_ERR_CERT_CHANGE,
+    SQUID_X509_V_ERR_DOMAIN_MISMATCH,
+    SQUID_X509_V_ERR_INFINITE_VALIDATION,
+
+    SQUID_TLS_ERR_END
+};
+
 #endif /* SQUID_SRC_SECURITY_FORWARD_H */
 
diff -u -r -N squid-5.0.5/src/security/Handshake.cc squid-5.0.6/src/security/Handshake.cc
--- squid-5.0.5/src/security/Handshake.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/Handshake.cc	2021-05-10 21:02:34.000000000 +1200
@@ -366,11 +366,6 @@
         if (Tls1p3orLater(details->tlsSupportedVersion))
             done = "ServerHello in v1.3+";
         return;
-    case HandshakeType::hskCertificate:
-        Must(state < atCertificatesReceived);
-        parseServerCertificates(message.msg_body);
-        state = atCertificatesReceived;
-        return;
     case HandshakeType::hskServerHelloDone:
         Must(state < atHelloDoneReceived);
         // zero-length
@@ -664,47 +659,6 @@
     return false; // unreached
 }
 
-/// Creates and returns a certificate by parsing a DER-encoded X509 structure.
-/// Throws on failures.
-Security::CertPointer
-Security::HandshakeParser::ParseCertificate(const SBuf &raw)
-{
-    Security::CertPointer pCert;
-#if USE_OPENSSL
-    auto x509Start = reinterpret_cast<const unsigned char *>(raw.rawContent());
-    auto x509Pos = x509Start;
-    X509 *x509 = d2i_X509(nullptr, &x509Pos, raw.length());
-    pCert.resetWithoutLocking(x509);
-    Must(x509); // successfully parsed
-    Must(x509Pos == x509Start + raw.length()); // no leftovers
-#else
-    assert(false);  // this code should never be reached
-    pCert = Security::CertPointer(nullptr); // avoid warnings about uninitialized pCert; XXX: Fix CertPoint declaration.
-    (void)raw; // avoid warnings about unused method parameter; TODO: Add a SimulateUse() macro.
-#endif
-    assert(pCert);
-    return pCert;
-}
-
-void
-Security::HandshakeParser::parseServerCertificates(const SBuf &raw)
-{
-#if USE_OPENSSL
-    Parser::BinaryTokenizer tkList(raw);
-    const SBuf clist = tkList.pstring24("CertificateList");
-    Must(tkList.atEnd()); // no leftovers after all certificates
-
-    Parser::BinaryTokenizer tkItems(clist);
-    while (!tkItems.atEnd()) {
-        if (Security::CertPointer cert = ParseCertificate(tkItems.pstring24("Certificate")))
-            serverCertificates.push_back(cert);
-        debugs(83, 7, "parsed " << serverCertificates.size() << " certificates so far");
-    }
-#else
-    debugs(83, 7, "no support for CertificateList parsing; ignoring " << raw.length() << " bytes");
-#endif
-}
-
 /// A helper function to create a set of all supported TLS extensions
 static
 Security::Extensions
diff -u -r -N squid-5.0.5/src/security/Handshake.h squid-5.0.6/src/security/Handshake.h
--- squid-5.0.5/src/security/Handshake.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/Handshake.h	2021-05-10 21:02:34.000000000 +1200
@@ -61,7 +61,7 @@
 {
 public:
     /// The parsing states
-    typedef enum {atHelloNone = 0, atHelloStarted, atHelloReceived, atCertificatesReceived, atHelloDoneReceived, atNstReceived, atCcsReceived, atFinishReceived} ParserState;
+    typedef enum { atHelloNone = 0, atHelloStarted, atHelloReceived, atHelloDoneReceived, atNstReceived, atCcsReceived, atFinishReceived } ParserState;
 
     /// the originator of the TLS handshake being parsed
     typedef enum { fromClient = 0, fromServer } MessageSource;
@@ -76,8 +76,6 @@
 
     TlsDetails::Pointer details; ///< TLS handshake meta info. Never nil.
 
-    Security::CertList serverCertificates; ///< parsed certificates chain
-
     ParserState state; ///< current parsing state.
 
     bool resumingSession; ///< True if this is a resuming session
@@ -112,7 +110,6 @@
     void parseV23Ciphers(const SBuf &raw);
 
     void parseServerCertificates(const SBuf &raw);
-    static CertPointer ParseCertificate(const SBuf &raw);
 
     unsigned int currentContentType; ///< The current TLS/SSL record content type
 
diff -u -r -N squid-5.0.5/src/security/Io.cc squid-5.0.6/src/security/Io.cc
--- squid-5.0.5/src/security/Io.cc	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/security/Io.cc	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,223 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+/* DEBUG: section 83    TLS I/O */
+
+#include "squid.h"
+#include "fde.h"
+#include "security/Io.h"
+
+namespace Security {
+
+template <typename Fun>
+static IoResult Handshake(Comm::Connection &, ErrorCode, Fun);
+static void PrepForIo();
+
+typedef SessionPointer::element_type *ConnectionPointer;
+
+} // namespace Security
+
+void
+Security::IoResult::print(std::ostream &os) const
+{
+    const char *strCat = "unknown";
+    switch (category) {
+    case ioSuccess:
+        strCat = "success";
+        break;
+    case ioWantRead:
+        strCat = "want-read";
+        break;
+    case ioWantWrite:
+        strCat = "want-write";
+        break;
+    case ioError:
+        strCat = "error";
+        break;
+    }
+    os << strCat;
+
+    if (errorDescription)
+        os << ", " << errorDescription;
+
+    if (important)
+        os << ", important";
+}
+
+// TODO: Replace high-level ERR_get_error() calls with a new std::ostream
+// ReportErrors manipulator inside debugs(), followed by a ForgetErrors() call.
+void
+Security::ForgetErrors()
+{
+#if USE_OPENSSL
+    unsigned int reported = 0; // efficiently marks ForgetErrors() call boundary
+    while (const auto errorToForget = ERR_get_error())
+        debugs(83, 7, '#' << (++reported) << ": " << asHex(errorToForget));
+#endif
+}
+
+/// the steps necessary to perform before the upcoming TLS I/O
+/// to correctly interpret/detail the outcome of that I/O
+static void
+Security::PrepForIo()
+{
+    // flush earlier errors that some call forgot to extract, so that we will
+    // only get the error(s) specific to the upcoming I/O operation
+    ForgetErrors();
+
+    // as the last step, reset errno to know when the I/O operation set it
+    errno = 0;
+}
+
+/// Calls the given TLS handshake function and analysis its outcome.
+/// Handles alert logging and being called without adequate TLS library support.
+template <typename Fun>
+static Security::IoResult
+Security::Handshake(Comm::Connection &transport, const ErrorCode topError, Fun ioCall)
+{
+    assert(transport.isOpen());
+    const auto fd = transport.fd;
+    auto connection = fd_table[fd].ssl.get();
+
+    PrepForIo();
+    const auto callResult = ioCall(connection);
+    const auto xerrno = errno;
+
+    debugs(83, 5, callResult << '/' << xerrno << " for TLS connection " <<
+           static_cast<void*>(connection) << " over " << transport);
+
+#if USE_OPENSSL
+    if (callResult > 0)
+        return IoResult(IoResult::ioSuccess);
+
+    const auto ioError = SSL_get_error(connection, callResult);
+
+    // quickly handle common, non-erroneous outcomes
+    switch (ioError) {
+
+    case SSL_ERROR_WANT_READ:
+        return IoResult(IoResult::ioWantRead);
+
+    case SSL_ERROR_WANT_WRITE:
+        return IoResult(IoResult::ioWantWrite);
+
+    default:
+        ; // fall through to handle the problem
+    }
+
+    // now we know that we are dealing with a real problem; detail it
+    ErrorDetail::Pointer errorDetail;
+    if (const auto oldDetail = SSL_get_ex_data(connection, ssl_ex_index_ssl_error_detail)) {
+        errorDetail = *static_cast<ErrorDetail::Pointer*>(oldDetail);
+    } else {
+        errorDetail = new ErrorDetail(topError, ioError, xerrno);
+        if (const auto serverCert = SSL_get_peer_certificate(connection))
+            errorDetail->setPeerCertificate(CertPointer(serverCert));
+    }
+    IoResult ioResult(errorDetail);
+
+    // collect debugging-related details
+    switch (ioError) {
+    case SSL_ERROR_SYSCALL:
+        if (callResult == 0) {
+            ioResult.errorDescription = "peer aborted";
+        } else {
+            ioResult.errorDescription = "system call failure";
+            ioResult.important = (xerrno == ECONNRESET);
+        }
+        break;
+
+    case SSL_ERROR_ZERO_RETURN:
+        // peer sent a "close notify" alert, closing TLS connection for writing
+        ioResult.errorDescription = "peer closed";
+        ioResult.important = true;
+        break;
+
+    default:
+        // an ever-increasing number of possible cases but usually SSL_ERROR_SSL
+        ioResult.errorDescription = "failure";
+        ioResult.important = true;
+    }
+
+    return ioResult;
+
+#elif USE_GNUTLS
+    if (callResult == GNUTLS_E_SUCCESS) {
+        // TODO: Avoid gnutls_*() calls if debugging is off.
+        const auto desc = gnutls_session_get_desc(connection);
+        debugs(83, 2, "TLS session info: " << desc);
+        gnutls_free(desc);
+        return IoResult(IoResult::ioSuccess);
+    }
+
+    // Debug the TLS connection state so far.
+    // TODO: Avoid gnutls_*() calls if debugging is off.
+    const auto descIn = gnutls_handshake_get_last_in(connection);
+    debugs(83, 2, "handshake IN: " << gnutls_handshake_description_get_name(descIn));
+    const auto descOut = gnutls_handshake_get_last_out(connection);
+    debugs(83, 2, "handshake OUT: " << gnutls_handshake_description_get_name(descOut));
+
+    if (callResult == GNUTLS_E_WARNING_ALERT_RECEIVED) {
+        const auto alert = gnutls_alert_get(connection);
+        debugs(83, DBG_IMPORTANT, "WARNING: TLS alert: " << gnutls_alert_get_name(alert));
+        // fall through to retry
+    }
+
+    if (!gnutls_error_is_fatal(callResult)) {
+        const auto reading = gnutls_record_get_direction(connection) == 0;
+        return IoResult(reading ? IoResult::ioWantRead : IoResult::ioWantWrite);
+    }
+
+    // now we know that we are dealing with a real problem; detail it
+    const ErrorDetail::Pointer errorDetail =
+        new ErrorDetail(topError, callResult, xerrno);
+
+    IoResult ioResult(errorDetail);
+    ioResult.errorDescription = "failure";
+    return ioResult;
+
+#else
+    // TLS I/O code path should never be reachable without a TLS/SSL library.
+    debugs(1, DBG_CRITICAL, ForceAlert << "BUG: " <<
+           "Unexpected TLS I/O in Squid built without a TLS/SSL library");
+    assert(false); // we want a stack trace which fatal() does not produce
+    return IoResult(nullptr); // not reachable
+#endif
+}
+
+// TODO: After dropping OpenSSL v1.1.0 support, this and Security::Connect() can
+// be simplified further by using SSL_do_handshake() and eliminating lambdas.
+Security::IoResult
+Security::Accept(Comm::Connection &transport)
+{
+    return Handshake(transport, SQUID_TLS_ERR_ACCEPT, [] (ConnectionPointer tlsConn) {
+#if USE_OPENSSL
+        return SSL_accept(tlsConn);
+#elif USE_GNUTLS
+        return gnutls_handshake(tlsConn);
+#else
+        return sizeof(tlsConn); // the value is unused; should be unreachable
+#endif
+    });
+}
+
+/// establish a TLS connection over the specified from-Squid transport connection
+Security::IoResult
+Security::Connect(Comm::Connection &transport)
+{
+    return Handshake(transport, SQUID_TLS_ERR_CONNECT, [] (ConnectionPointer tlsConn) {
+#if USE_OPENSSL
+        return SSL_connect(tlsConn);
+#elif USE_GNUTLS
+        return gnutls_handshake(tlsConn);
+#else
+        return sizeof(tlsConn); // the value is unused; should be unreachable
+#endif
+    });
+}
+
diff -u -r -N squid-5.0.5/src/security/Io.h squid-5.0.6/src/security/Io.h
--- squid-5.0.5/src/security/Io.h	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/security/Io.h	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef SQUID_SRC_SECURITY_IO_H
+#define SQUID_SRC_SECURITY_IO_H
+
+#include "comm/forward.h"
+#include "security/ErrorDetail.h"
+#include "security/forward.h"
+
+namespace Security {
+
+/// a summary a TLS I/O operation outcome
+class IoResult: public RefCountable {
+public:
+    typedef RefCount<IoResult> Pointer;
+
+    /// all possible outcome cases
+    typedef enum { ioSuccess, ioWantRead, ioWantWrite, ioError } Category;
+
+    explicit IoResult(const Category aCategory): category(aCategory) {}
+    explicit IoResult(const ErrorDetailPointer &anErrorDetail): errorDetail(anErrorDetail) {}
+    IoResult(const IoResult &aRes) = default;
+
+    /// convenience wrapper to detect successful I/O outcome; implies !wantsIo()
+    bool successful() const { return category == ioSuccess; }
+
+    /// convenience wrapper to detect whether more I/O is needed
+    bool wantsIo() const { return category == ioWantRead || category == ioWantWrite; }
+
+    void print(std::ostream &os) const;
+
+    ErrorDetailPointer errorDetail; ///< ioError case details (or nil)
+
+    Category category = ioError; ///< primary outcome classification
+
+    /* the data members below facilitate human-friendly debugging */
+    const char *errorDescription = nullptr; ///< a brief description of an error
+    bool important = false; ///< whether the error was serious/unusual
+};
+
+inline std::ostream &
+operator <<(std::ostream &os, const IoResult &result)
+{
+    result.print(os);
+    return os;
+}
+
+/// accept a TLS connection over the specified to-Squid transport connection
+IoResult Accept(Comm::Connection &transport);
+
+/// establish a TLS connection over the specified from-Squid transport connection
+IoResult Connect(Comm::Connection &transport);
+
+/// clear any errors that a TLS library has accumulated in its global storage
+void ForgetErrors();
+
+} // namespace Security
+
+#endif /* SQUID_SRC_SECURITY_IO_H */
+
diff -u -r -N squid-5.0.5/src/security/KeyData.cc squid-5.0.6/src/security/KeyData.cc
--- squid-5.0.5/src/security/KeyData.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/KeyData.cc	2021-05-10 21:02:34.000000000 +1200
@@ -39,7 +39,7 @@
 #elif USE_GNUTLS
     const char *certFilename = certFile.c_str();
     gnutls_datum_t data;
-    Security::ErrorCode x = gnutls_load_file(certFilename, &data);
+    Security::LibErrorCode x = gnutls_load_file(certFilename, &data);
     if (x != GNUTLS_E_SUCCESS) {
         debugs(83, DBG_IMPORTANT, "ERROR: unable to load certificate file '" << certFile << "': " << ErrorString(x));
         return false;
diff -u -r -N squid-5.0.5/src/security/LockingPointer.h squid-5.0.6/src/security/LockingPointer.h
--- squid-5.0.5/src/security/LockingPointer.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/LockingPointer.h	2021-05-10 21:02:34.000000000 +1200
@@ -57,13 +57,19 @@
     /// a helper label to simplify this objects API definitions below
     typedef Security::LockingPointer<T, UnLocker, Locker> SelfType;
 
+    /// constructs a nil smart pointer
+    constexpr LockingPointer(): raw(nullptr) {}
+
+    /// constructs a nil smart pointer from nullptr
+    constexpr LockingPointer(std::nullptr_t): raw(nullptr) {}
+
     /**
-     * Construct directly from a raw pointer.
-     * This action requires that the producer of that pointer has already
-     * created one reference lock for the object pointed to.
-     * Our destructor will do the matching unlock.
+     * Construct directly from a (possibly nil) raw pointer. If the supplied
+     * pointer is not nil, it is expected that its producer has already created
+     * one reference lock for the object pointed to, and our destructor will do
+     * the matching unlock.
      */
-    explicit LockingPointer(T *t = nullptr): raw(nullptr) {
+    explicit LockingPointer(T *t): raw(nullptr) {
         // de-optimized for clarity about non-locking
         resetWithoutLocking(t);
     }
diff -u -r -N squid-5.0.5/src/security/Makefile.am squid-5.0.6/src/security/Makefile.am
--- squid-5.0.5/src/security/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -12,16 +12,19 @@
 
 noinst_LTLIBRARIES = libsecurity.la
 
-libsecurity_la_SOURCES= \
+libsecurity_la_SOURCES = \
 	BlindPeerConnector.cc \
 	BlindPeerConnector.h \
 	CertError.h \
 	Context.h \
 	EncryptorAnswer.cc \
 	EncryptorAnswer.h \
+	ErrorDetail.cc \
+	ErrorDetail.h \
 	Handshake.cc \
 	Handshake.h \
-	forward.h \
+	Io.cc \
+	Io.h \
 	KeyData.cc \
 	KeyData.h \
 	LockingPointer.h \
@@ -34,4 +37,5 @@
 	ServerOptions.cc \
 	ServerOptions.h \
 	Session.cc \
-	Session.h
+	Session.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/security/Makefile.in squid-5.0.6/src/security/Makefile.in
--- squid-5.0.5/src/security/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/src/security/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -165,8 +165,9 @@
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libsecurity_la_LIBADD =
 am_libsecurity_la_OBJECTS = BlindPeerConnector.lo EncryptorAnswer.lo \
-	Handshake.lo KeyData.lo NegotiationHistory.lo PeerConnector.lo \
-	PeerOptions.lo ServerOptions.lo Session.lo
+	ErrorDetail.lo Handshake.lo Io.lo KeyData.lo \
+	NegotiationHistory.lo PeerConnector.lo PeerOptions.lo \
+	ServerOptions.lo Session.lo
 libsecurity_la_OBJECTS = $(am_libsecurity_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -188,7 +189,8 @@
 depcomp = $(SHELL) $(top_srcdir)/cfgaux/depcomp
 am__maybe_remake_depfiles = depfiles
 am__depfiles_remade = ./$(DEPDIR)/BlindPeerConnector.Plo \
-	./$(DEPDIR)/EncryptorAnswer.Plo ./$(DEPDIR)/Handshake.Plo \
+	./$(DEPDIR)/EncryptorAnswer.Plo ./$(DEPDIR)/ErrorDetail.Plo \
+	./$(DEPDIR)/Handshake.Plo ./$(DEPDIR)/Io.Plo \
 	./$(DEPDIR)/KeyData.Plo ./$(DEPDIR)/NegotiationHistory.Plo \
 	./$(DEPDIR)/PeerConnector.Plo ./$(DEPDIR)/PeerOptions.Plo \
 	./$(DEPDIR)/ServerOptions.Plo ./$(DEPDIR)/Session.Plo
@@ -782,9 +784,12 @@
 	Context.h \
 	EncryptorAnswer.cc \
 	EncryptorAnswer.h \
+	ErrorDetail.cc \
+	ErrorDetail.h \
 	Handshake.cc \
 	Handshake.h \
-	forward.h \
+	Io.cc \
+	Io.h \
 	KeyData.cc \
 	KeyData.h \
 	LockingPointer.h \
@@ -797,7 +802,8 @@
 	ServerOptions.cc \
 	ServerOptions.h \
 	Session.cc \
-	Session.h
+	Session.h \
+	forward.h
 
 all: all-recursive
 
@@ -865,7 +871,9 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlindPeerConnector.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EncryptorAnswer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ErrorDetail.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Handshake.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Io.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/KeyData.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NegotiationHistory.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerConnector.Plo@am__quote@ # am--include-marker
@@ -1278,7 +1286,9 @@
 distclean: distclean-recursive
 		-rm -f ./$(DEPDIR)/BlindPeerConnector.Plo
 	-rm -f ./$(DEPDIR)/EncryptorAnswer.Plo
+	-rm -f ./$(DEPDIR)/ErrorDetail.Plo
 	-rm -f ./$(DEPDIR)/Handshake.Plo
+	-rm -f ./$(DEPDIR)/Io.Plo
 	-rm -f ./$(DEPDIR)/KeyData.Plo
 	-rm -f ./$(DEPDIR)/NegotiationHistory.Plo
 	-rm -f ./$(DEPDIR)/PeerConnector.Plo
@@ -1332,7 +1342,9 @@
 maintainer-clean: maintainer-clean-recursive
 		-rm -f ./$(DEPDIR)/BlindPeerConnector.Plo
 	-rm -f ./$(DEPDIR)/EncryptorAnswer.Plo
+	-rm -f ./$(DEPDIR)/ErrorDetail.Plo
 	-rm -f ./$(DEPDIR)/Handshake.Plo
+	-rm -f ./$(DEPDIR)/Io.Plo
 	-rm -f ./$(DEPDIR)/KeyData.Plo
 	-rm -f ./$(DEPDIR)/NegotiationHistory.Plo
 	-rm -f ./$(DEPDIR)/PeerConnector.Plo
diff -u -r -N squid-5.0.5/src/security/NegotiationHistory.cc squid-5.0.6/src/security/NegotiationHistory.cc
--- squid-5.0.5/src/security/NegotiationHistory.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/NegotiationHistory.cc	2021-05-10 21:02:34.000000000 +1200
@@ -38,6 +38,10 @@
 toProtocolVersion(const int v)
 {
     switch(v) {
+#if defined(TLS1_3_VERSION)
+    case TLS1_3_VERSION:
+        return AnyP::ProtocolVersion(AnyP::PROTO_TLS, 1, 3);
+#endif
 #if defined(TLS1_2_VERSION)
     case TLS1_2_VERSION:
         return AnyP::ProtocolVersion(AnyP::PROTO_TLS, 1, 2);
diff -u -r -N squid-5.0.5/src/security/PeerConnector.cc squid-5.0.6/src/security/PeerConnector.cc
--- squid-5.0.5/src/security/PeerConnector.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/PeerConnector.cc	2021-05-10 21:02:34.000000000 +1200
@@ -20,6 +20,7 @@
 #include "HttpRequest.h"
 #include "neighbors.h"
 #include "pconn.h"
+#include "security/Io.h"
 #include "security/NegotiationHistory.h"
 #include "security/PeerConnector.h"
 #include "SquidConfig.h"
@@ -56,6 +57,8 @@
     comm_add_close_handler(serverConn->fd, closeHandler);
 }
 
+Security::PeerConnector::~PeerConnector() = default;
+
 bool Security::PeerConnector::doneAll() const
 {
     return (!callback || callback->canceled()) && AsyncJob::doneAll();
@@ -90,9 +93,8 @@
 
     debugs(83, 5, "FD " << params.fd << ", Security::PeerConnector=" << params.data);
     const auto err = new ErrorState(ERR_SECURE_CONNECT_FAIL, Http::scServiceUnavailable, request.getRaw(), al);
-#if USE_OPENSSL
-    err->detail = new Ssl::ErrorDetail(SQUID_ERR_SSL_HANDSHAKE, nullptr, nullptr);
-#endif
+    static const auto d = MakeNamedErrorDetail("TLS_CONNECT_CLOSE");
+    err->detailError(d);
     bail(err);
 }
 
@@ -101,9 +103,8 @@
 {
     debugs(83, 5, serverConnection() << " timedout. this=" << (void*)this);
     const auto err = new ErrorState(ERR_SECURE_CONNECT_FAIL, Http::scGatewayTimeout, request.getRaw(), al);
-#if USE_OPENSSL
-    err->detail = new Ssl::ErrorDetail(SQUID_ERR_SSL_HANDSHAKE, nullptr, nullptr);
-#endif
+    static const auto d = MakeNamedErrorDetail("TLS_CONNECT_TIMEOUT");
+    err->detailError(d);
     bail(err);
 }
 
@@ -143,6 +144,16 @@
             SSL_set_ex_data(serverSession.get(), ssl_ex_index_cert_error_check, check);
         }
     }
+
+    // Protect from cycles in the certificate dependency graph: TLS site S1 is
+    // missing certificate C1 located at TLS site S2. TLS site S2 is missing
+    // certificate C2 located at [...] TLS site S1.
+    const auto cycle = certDownloadNestingLevel() >= MaxNestedDownloads;
+    if (cycle)
+        debugs(83, 3, "will not fetch any missing certificates; suspecting cycle: " << certDownloadNestingLevel() << '/' << MaxNestedDownloads);
+    const auto sessData = Ssl::VerifyCallbackParameters::New(*serverSession);
+    // when suspecting a cycle, break it by not fetching any missing certs
+    sessData->callerHandlesMissingCertificates = !cycle;
 #endif
 
     return true;
@@ -173,41 +184,67 @@
     if (fd_table[fd].closing())
         return;
 
+    const auto result = Security::Connect(*serverConnection());
+
 #if USE_OPENSSL
-    auto session = fd_table[fd].ssl.get();
-    debugs(83, 5, "SSL_connect session=" << (void*)session);
-    const int result = SSL_connect(session);
-    if (result <= 0) {
-#elif USE_GNUTLS
-    auto session = fd_table[fd].ssl.get();
-    const int result = gnutls_handshake(session);
-    debugs(83, 5, "gnutls_handshake session=" << (void*)session << ", result=" << result);
-
-    if (result == GNUTLS_E_SUCCESS) {
-        char *desc = gnutls_session_get_desc(session);
-        debugs(83, 2, serverConnection() << " TLS Session info: " << desc);
-        gnutls_free(desc);
-    }
-
-    if (result != GNUTLS_E_SUCCESS) {
-        // debug the TLS session state so far
-        auto descIn = gnutls_handshake_get_last_in(session);
-        debugs(83, 2, "handshake IN: " << gnutls_handshake_description_get_name(descIn));
-        auto descOut = gnutls_handshake_get_last_out(session);
-        debugs(83, 2, "handshake OUT: " << gnutls_handshake_description_get_name(descOut));
-#else
-    if (const int result = -1) {
-#endif
-        handleNegotiateError(result);
-        return; // we might be gone by now
+    auto &sconn = *fd_table[fd].ssl;
+
+    // OpenSSL v1 APIs do not allow unthreaded applications like Squid to fetch
+    // missing certificates _during_ OpenSSL certificate validation. Our
+    // handling of X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY (abbreviated
+    // here as EUNABLE) approximates what would happen if we did (attempt to)
+    // fetch any missing certificates during OpenSSL certificate validation.
+    // * We did not hide EUNABLE; SSL_connect() was successful: Handle success.
+    // * We did not hide EUNABLE; SSL_connect() reported some error E: Honor E.
+    // * We hid EUNABLE; SSL_connect() was successful: Remember success and try
+    //   to fetch the missing certificates. If all goes well, honor success.
+    // * We hid EUNABLE; SSL_connect() reported EUNABLE: Warn but honor EUNABLE.
+    // * We hid EUNABLE; SSL_connect() reported some EOTHER: Remember EOTHER and
+    //   try to fetch the missing certificates. If all goes well, honor EOTHER.
+    //   If fetching or post-fetching validation fails, then honor that failure
+    //   because EOTHER would not have happened if we fetched during validation.
+    if (auto &hidMissingIssuer = Ssl::VerifyCallbackParameters::At(sconn).hidMissingIssuer) {
+        hidMissingIssuer = false; // prep for the next SSL_connect()
+
+        if (result.category == IoResult::ioSuccess ||
+                !(result.errorDetail && result.errorDetail->errorNo() == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY))
+            return handleMissingCertificates(result);
+
+        debugs(83, DBG_IMPORTANT, "BUG: Honoring unexpected SSL_connect() error: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY");
+        // fall through to regular error handling
     }
+#endif
 
-    recordNegotiationDetails();
+    handleNegotiationResult(result);
+}
+
+void
+Security::PeerConnector::handleNegotiationResult(const Security::IoResult &result)
+{
+    switch (result.category) {
+    case Security::IoResult::ioSuccess:
+        recordNegotiationDetails();
+        if (sslFinalized())
+            sendSuccess();
+        return; // we may be gone by now
 
-    if (!sslFinalized())
+    case Security::IoResult::ioWantRead:
+        noteWantRead();
         return;
 
-    sendSuccess();
+    case Security::IoResult::ioWantWrite:
+        noteWantWrite();
+        return;
+
+    case Security::IoResult::ioError:
+        break; // fall through to error handling
+    }
+
+    // TODO: Honor result.important when working in a reverse proxy role?
+    debugs(83, 2, "ERROR: " << result.errorDescription <<
+           " while establishing TLS connection on FD: " << serverConnection()->fd << result.errorDetail);
+    recordNegotiationDetails();
+    noteNegotiationError(result.errorDetail);
 }
 
 bool
@@ -259,7 +296,7 @@
 {
     Must(validationResponse != NULL);
 
-    Ssl::ErrorDetail *errDetails = NULL;
+    ErrorDetail::Pointer errDetails;
     bool validatorFailed = false;
 
     if (Debug::Enabled(83, 5)) {
@@ -289,7 +326,7 @@
         anErr = new ErrorState(ERR_GATEWAY_FAILURE, Http::scInternalServerError, request.getRaw(), al);
     }  else {
         anErr =  new ErrorState(ERR_SECURE_CONNECT_FAIL, Http::scServiceUnavailable, request.getRaw(), al);
-        anErr->detail = errDetails;
+        anErr->detailError(errDetails);
         /*anErr->xerrno= Should preserved*/
     }
 
@@ -304,7 +341,7 @@
 /// The first honored error, if any, is returned via errDetails parameter.
 /// The method returns all seen errors except SSL_ERROR_NONE as Security::CertErrors.
 Security::CertErrors *
-Security::PeerConnector::sslCrtvdCheckForErrors(Ssl::CertValidationResponse const &resp, Ssl::ErrorDetail *& errDetails)
+Security::PeerConnector::sslCrtvdCheckForErrors(Ssl::CertValidationResponse const &resp, ErrorDetail::Pointer &errDetails)
 {
     ACLFilledChecklist *check = NULL;
     Security::SessionPointer session(fd_table[serverConnection()->fd].ssl);
@@ -337,10 +374,10 @@
                 debugs(83, 3, "bypassing SSL error " << i->error_no << " in " << "buffer");
             } else {
                 debugs(83, 5, "confirming SSL error " << i->error_no);
-                X509 *brokenCert = i->cert.get();
+                const auto &brokenCert = i->cert;
                 Security::CertPointer peerCert(SSL_get_peer_certificate(session.get()));
                 const char *aReason = i->error_reason.empty() ? NULL : i->error_reason.c_str();
-                errDetails = new Ssl::ErrorDetail(i->error_no, peerCert.get(), brokenCert, aReason);
+                errDetails = new ErrorDetail(i->error_no, peerCert, brokenCert, aReason);
             }
             if (check) {
                 delete check->sslErrors;
@@ -379,96 +416,10 @@
 }
 
 void
-Security::PeerConnector::handleNegotiateError(const int ret)
-{
-    const int fd = serverConnection()->fd;
-    const Security::SessionPointer session(fd_table[fd].ssl);
-    unsigned long ssl_lib_error = ret;
-
-#if USE_OPENSSL
-    const int ssl_error = SSL_get_error(session.get(), ret);
-
-    switch (ssl_error) {
-    case SSL_ERROR_WANT_READ:
-        noteWantRead();
-        return;
-
-    case SSL_ERROR_WANT_WRITE:
-        noteWantWrite();
-        return;
-
-    case SSL_ERROR_SSL:
-    case SSL_ERROR_SYSCALL:
-        ssl_lib_error = ERR_get_error();
-        // proceed to the general error handling code
-        break;
-    default:
-        // no special error handling for all other errors
-        ssl_lib_error = SSL_ERROR_NONE;
-        break;
-    }
-
-#elif USE_GNUTLS
-    const int ssl_error = ret;
-
-    switch (ret) {
-    case GNUTLS_E_WARNING_ALERT_RECEIVED: {
-        auto alert = gnutls_alert_get(session.get());
-        debugs(83, DBG_IMPORTANT, "TLS ALERT: " << gnutls_alert_get_name(alert));
-    }
-    // drop through to next case
-
-    case GNUTLS_E_AGAIN:
-    case GNUTLS_E_INTERRUPTED:
-        if (gnutls_record_get_direction(session.get()) == 0)
-            noteWantRead();
-        else
-            noteWantWrite();
-        return;
-
-    default:
-        // no special error handling for all other errors
-        break;
-    }
-
-#else
-    // this avoids unused variable compiler warnings.
-    Must(!session);
-    const int ssl_error = ret;
-#endif
-
-    // Log connection details, if any
-    recordNegotiationDetails();
-    noteNegotiationError(ret, ssl_error, ssl_lib_error);
-}
-
-void
 Security::PeerConnector::noteWantRead()
 {
     const int fd = serverConnection()->fd;
     debugs(83, 5, serverConnection());
-#if USE_OPENSSL
-    Security::SessionPointer session(fd_table[fd].ssl);
-    BIO *b = SSL_get_rbio(session.get());
-    Ssl::ServerBio *srvBio = static_cast<Ssl::ServerBio *>(BIO_get_data(b));
-    if (srvBio->holdRead()) {
-        if (srvBio->gotHello()) {
-            if (checkForMissingCertificates())
-                return; // Wait to download certificates before proceed.
-
-            srvBio->holdRead(false);
-            // schedule a negotiateSSl to allow openSSL parse received data
-            negotiateSsl();
-            return;
-        } else if (srvBio->gotHelloFailed()) {
-            srvBio->holdRead(false);
-            debugs(83, DBG_IMPORTANT, "Error parsing SSL Server Hello Message on FD " << fd);
-            // schedule a negotiateSSl to allow openSSL parse received data
-            negotiateSsl();
-            return;
-        }
-    }
-#endif
 
     // read timeout to avoid getting stuck while reading from a silent server
     typedef CommCbMemFunT<Security::PeerConnector, CommTimeoutCbParams> TimeoutDialer;
@@ -490,48 +441,13 @@
 }
 
 void
-Security::PeerConnector::noteNegotiationError(const int ret, const int ssl_error, const int ssl_lib_error)
+Security::PeerConnector::noteNegotiationError(const Security::ErrorDetailPointer &detail)
 {
-#if defined(EPROTO)
-    int sysErrNo = EPROTO;
-#else
-    int sysErrNo = EACCES;
-#endif
-
-#if USE_OPENSSL
-    // store/report errno when ssl_error is SSL_ERROR_SYSCALL, ssl_lib_error is 0, and ret is -1
-    if (ssl_error == SSL_ERROR_SYSCALL && ret == -1 && ssl_lib_error == 0)
-        sysErrNo = errno;
-#endif
-    int xerr = errno;
-
-    const int fd = serverConnection()->fd;
-    debugs(83, DBG_IMPORTANT, "ERROR: negotiating TLS on FD " << fd <<
-           ": " << Security::ErrorString(ssl_lib_error) << " (" <<
-           ssl_error << "/" << ret << "/" << xerr << ")");
-
     const auto anErr = ErrorState::NewForwarding(ERR_SECURE_CONNECT_FAIL, request, al);
-    anErr->xerrno = sysErrNo;
-
-#if USE_OPENSSL
-    Security::SessionPointer session(fd_table[fd].ssl);
-    Ssl::ErrorDetail *errFromFailure = static_cast<Ssl::ErrorDetail *>(SSL_get_ex_data(session.get(), ssl_ex_index_ssl_error_detail));
-    if (errFromFailure != NULL) {
-        // The errFromFailure is attached to the ssl object
-        // and will be released when ssl object destroyed.
-        // Copy errFromFailure to a new Ssl::ErrorDetail object
-        anErr->detail = new Ssl::ErrorDetail(*errFromFailure);
-    } else {
-        // server_cert can be NULL here
-        X509 *server_cert = SSL_get_peer_certificate(session.get());
-        anErr->detail = new Ssl::ErrorDetail(SQUID_ERR_SSL_HANDSHAKE, server_cert, NULL);
-        X509_free(server_cert);
+    if (detail) {
+        anErr->xerrno = detail->sysError();
+        anErr->detailError(detail);
     }
-
-    if (ssl_lib_error != SSL_ERROR_NONE)
-        anErr->detail->setLibError(ssl_lib_error);
-#endif
-
     noteNegotiationDone(anErr);
     bail(anErr);
 }
@@ -643,6 +559,20 @@
     CbcPointer<Security::PeerConnector> peerConnector_; ///< The Security::PeerConnector object
 };
 
+/// the number of concurrent PeerConnector jobs waiting for us
+unsigned int
+Security::PeerConnector::certDownloadNestingLevel() const
+{
+    if (request) {
+        // Nesting level increases when a PeerConnector (at level L) creates a
+        // Downloader (which is assigned level L+1). If we were initiated by
+        // such a Downloader, then their nesting level is our nesting level.
+        if (const auto previousDownloader = request->downloader.get())
+            return previousDownloader->nestedLevel();
+    }
+    return 0; // no other PeerConnector job waits for us
+}
+
 void
 Security::PeerConnector::startCertDownloading(SBuf &url)
 {
@@ -650,8 +580,7 @@
                                       "Security::PeerConnector::certDownloadingDone",
                                       PeerConnectorCertDownloaderDialer(&Security::PeerConnector::certDownloadingDone, this));
 
-    const Downloader *csd = (request ? dynamic_cast<const Downloader*>(request->downloader.valid()) : nullptr);
-    Downloader *dl = new Downloader(url, certCallback, XactionInitiator::initCertFetcher, csd ? csd->nestedLevel() + 1 : 1);
+    const auto dl = new Downloader(url, certCallback, XactionInitiator::initCertFetcher, certDownloadNestingLevel() + 1);
     AsyncJob::Start(dl);
 }
 
@@ -661,11 +590,7 @@
     ++certsDownloads;
     debugs(81, 5, "Certificate downloading status: " << downloadStatus << " certificate size: " << obj.length());
 
-    // get ServerBio from SSL object
-    const int fd = serverConnection()->fd;
-    Security::SessionPointer session(fd_table[fd].ssl);
-    BIO *b = SSL_get_rbio(session.get());
-    Ssl::ServerBio *srvBio = static_cast<Ssl::ServerBio *>(BIO_get_data(b));
+    const auto &sconn = *fd_table[serverConnection()->fd].ssl;
 
     // Parse Certificate. Assume that it is in DER format.
     // According to RFC 4325:
@@ -678,12 +603,29 @@
     if (X509 *cert = d2i_X509(NULL, &raw, obj.length())) {
         char buffer[1024];
         debugs(81, 5, "Retrieved certificate: " << X509_NAME_oneline(X509_get_subject_name(cert), buffer, 1024));
+
+        if (!downloadedCerts)
+            downloadedCerts.reset(sk_X509_new_null());
+        sk_X509_push(downloadedCerts.get(), cert);
+
         ContextPointer ctx(getTlsContext());
-        const Security::CertList &certsList = srvBio->serverCertificatesIfAny();
-        if (const char *issuerUri = Ssl::uriOfIssuerIfMissing(cert, certsList, ctx)) {
-            urlsOfMissingCerts.push(SBuf(issuerUri));
+        const auto certsList = SSL_get_peer_cert_chain(&sconn);
+        if (!Ssl::findIssuerCertificate(cert, certsList, ctx)) {
+            if (const auto issuerUri = Ssl::findIssuerUri(cert)) {
+                debugs(81, 5, "certificate " <<
+                       X509_NAME_oneline(X509_get_subject_name(cert), buffer, sizeof(buffer)) <<
+                       " points to its missing issuer certificate at " << issuerUri);
+                urlsOfMissingCerts.push(SBuf(issuerUri));
+            } else {
+                debugs(81, 3, "found a certificate with no IAI, " <<
+                       "signed by a missing issuer certificate:  " <<
+                       X509_NAME_oneline(X509_get_subject_name(cert), buffer, sizeof(buffer)));
+                // We could short-circuit here, proceeding to chain validation
+                // that is likely to fail. Instead, we keep going because we
+                // hope that if we find at least one certificate to fetch, it
+                // will complete the chain (that contained extra certificates).
+            }
         }
-        Ssl::SSL_add_untrusted_cert(session.get(), cert);
     }
 
     // Check if there are URIs to download from and if yes start downloading
@@ -694,39 +636,82 @@
         return;
     }
 
-    srvBio->holdRead(false);
-    negotiateSsl();
+    resumeNegotiation();
 }
 
-bool
-Security::PeerConnector::checkForMissingCertificates()
+void
+Security::PeerConnector::handleMissingCertificates(const Security::IoResult &ioResult)
 {
-    // Check for nested SSL certificates downloads. For example when the
-    // certificate located in an SSL site which requires to download a
-    // a missing certificate (... from an SSL site which requires to ...).
+    auto &sconn = *fd_table[serverConnection()->fd].ssl;
+
+    // We download the missing certificate(s) once. We would prefer to clear
+    // this right after the first validation, but that ideal place is _inside_
+    // OpenSSL if validation is triggered by SSL_connect(). That function and
+    // our OpenSSL verify_callback function (\ref OpenSSL_vcb_disambiguation)
+    // may be called multiple times, so we cannot reset there.
+    auto &callerHandlesMissingCertificates = Ssl::VerifyCallbackParameters::At(sconn).callerHandlesMissingCertificates;
+    Must(callerHandlesMissingCertificates);
+    callerHandlesMissingCertificates = false;
 
-    const Downloader *csd = (request ? request->downloader.get() : nullptr);
-    if (csd && csd->nestedLevel() >= MaxNestedDownloads)
+    if (!computeMissingCertificateUrls(sconn))
+        return handleNegotiationResult(ioResult);
+
+    suspendNegotiation(ioResult);
+
+    assert(!urlsOfMissingCerts.empty());
+    startCertDownloading(urlsOfMissingCerts.front());
+    urlsOfMissingCerts.pop();
+}
+
+/// finds URLs of (some) missing intermediate certificates or returns false
+bool
+Security::PeerConnector::computeMissingCertificateUrls(const Connection &sconn)
+{
+    const auto certs = SSL_get_peer_cert_chain(&sconn);
+    if (!certs) {
+        debugs(83, 3, "nothing to bootstrap the fetch with");
         return false;
+    }
+    debugs(83, 5, "server certificates: " << sk_X509_num(certs));
 
-    const int fd = serverConnection()->fd;
-    Security::SessionPointer session(fd_table[fd].ssl);
-    BIO *b = SSL_get_rbio(session.get());
-    Ssl::ServerBio *srvBio = static_cast<Ssl::ServerBio *>(BIO_get_data(b));
-    const Security::CertList &certs = srvBio->serverCertificatesIfAny();
+    const auto ctx = getTlsContext();
+    if (!Ssl::missingChainCertificatesUrls(urlsOfMissingCerts, *certs, ctx))
+        return false; // missingChainCertificatesUrls() reports the exact reason
 
-    if (certs.size()) {
-        debugs(83, 5, "SSL server sent " << certs.size() << " certificates");
-        ContextPointer ctx(getTlsContext());
-        Ssl::missingChainCertificatesUrls(urlsOfMissingCerts, certs, ctx);
-        if (urlsOfMissingCerts.size()) {
-            startCertDownloading(urlsOfMissingCerts.front());
-            urlsOfMissingCerts.pop();
-            return true;
-        }
+    debugs(83, 5, "URLs: " << urlsOfMissingCerts.size());
+    assert(!urlsOfMissingCerts.empty());
+    return true;
+}
+
+void
+Security::PeerConnector::suspendNegotiation(const Security::IoResult &ioResult)
+{
+    debugs(83, 5, "after " << ioResult);
+    Must(!isSuspended());
+    suspendedError_ = new Security::IoResult(ioResult);
+    Must(isSuspended());
+    // negotiations resume with a resumeNegotiation() call
+}
+
+void
+Security::PeerConnector::resumeNegotiation()
+{
+    Must(isSuspended());
+
+    auto lastError = suspendedError_; // may be reset below
+    suspendedError_ = nullptr;
+
+    auto &sconn = *fd_table[serverConnection()->fd].ssl;
+    if (!Ssl::VerifyConnCertificates(sconn, downloadedCerts)) {
+        // simulate an earlier SSL_connect() failure with a new error
+        // TODO: When we can use Security::ErrorDetail, we should resume with a
+        // detailed _validation_ error, not just a generic SSL_ERROR_SSL!
+        const ErrorDetail::Pointer errorDetail = new ErrorDetail(SQUID_TLS_ERR_CONNECT, SSL_ERROR_SSL, 0);
+        lastError = new Security::IoResult(errorDetail);
     }
 
-    return false;
+    handleNegotiationResult(*lastError);
 }
+
 #endif //USE_OPENSSL
 
diff -u -r -N squid-5.0.5/src/security/PeerConnector.h squid-5.0.6/src/security/PeerConnector.h
--- squid-5.0.5/src/security/PeerConnector.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/PeerConnector.h	2021-05-10 21:02:34.000000000 +1200
@@ -30,6 +30,9 @@
 namespace Security
 {
 
+class IoResult;
+typedef RefCount<IoResult> IoResultPointer;
+
 /**
  * Initiates encryption of a given open TCP connection to a peer or server.
  * Despite its name does not perform any connect(2) operations. Owns the
@@ -59,7 +62,7 @@
                   AsyncCall::Pointer &aCallback,
                   const AccessLogEntryPointer &alp,
                   const time_t timeout = 0);
-    virtual ~PeerConnector() = default;
+    virtual ~PeerConnector();
 
     /// hack: whether the connection requires fwdPconnPool->noteUses()
     bool noteFwdPconnUse;
@@ -89,23 +92,27 @@
     /// Otherwise, returns true, regardless of negotiation success/failure.
     bool sslFinalized();
 
-    /// Called when the negotiation step aborted because data needs to
-    /// be transferred to/from server or on error. In the first case
-    /// setups the appropriate Comm::SetSelect handler. In second case
-    /// fill an error and report to the PeerConnector caller.
-    void handleNegotiateError(const int result);
+    /// Called after each negotiation step to handle the result
+    void handleNegotiationResult(const Security::IoResult &);
 
     /// Called when the openSSL SSL_connect fnction request more data from
     /// the remote SSL server. Sets the read timeout and sets the
     /// Squid COMM_SELECT_READ handler.
     void noteWantRead();
 
+    /// Whether TLS negotiation has been paused and not yet resumed
+    bool isSuspended() const { return static_cast<bool>(suspendedError_); }
+
 #if USE_OPENSSL
-    /// Run the certificates list sent by the SSL server and check if there
-    /// are missing certificates. Adds to the urlOfMissingCerts list the
-    /// URLS of missing certificates if this information provided by the
-    /// issued certificates with Authority Info Access extension.
-    bool checkForMissingCertificates();
+    /// Suspends TLS negotiation to download the missing certificates
+    /// \param lastError an error to handle when resuming negotiations
+    void suspendNegotiation(const Security::IoResult &lastError);
+
+    /// Resumes TLS negotiation paused by suspendNegotiation()
+    void resumeNegotiation();
+
+    /// Either initiates fetching of missing certificates or bails with an error
+    void handleMissingCertificates(const Security::IoResult &lastError);
 
     /// Start downloading procedure for the given URL.
     void startCertDownloading(SBuf &url);
@@ -119,10 +126,7 @@
     virtual void noteWantWrite();
 
     /// Called when the SSL_connect function aborts with an SSL negotiation error
-    /// \param result the SSL_connect return code
-    /// \param ssl_error the error code returned from the SSL_get_error function
-    /// \param ssl_lib_error the error returned from the ERR_Get_Error function
-    virtual void noteNegotiationError(const int result, const int ssl_error, const int ssl_lib_error);
+    virtual void noteNegotiationError(const Security::ErrorDetailPointer &);
 
     /// Called when the SSL negotiation to the server completed and the certificates
     /// validated using the cert validator.
@@ -164,19 +168,24 @@
     PeerConnector &operator =(const PeerConnector &); // not implemented
 
 #if USE_OPENSSL
+    unsigned int certDownloadNestingLevel() const;
+
     /// Process response from cert validator helper
     void sslCrtvdHandleReply(Ssl::CertValidationResponsePointer);
 
     /// Check SSL errors returned from cert validator against sslproxy_cert_error access list
-    Security::CertErrors *sslCrtvdCheckForErrors(Ssl::CertValidationResponse const &, Ssl::ErrorDetail *&);
+    Security::CertErrors *sslCrtvdCheckForErrors(Ssl::CertValidationResponse const &, ErrorDetailPointer &);
+
+    bool computeMissingCertificateUrls(const Connection &);
 #endif
 
     static void NegotiateSsl(int fd, void *data);
     void negotiateSsl();
 
-    /// The maximum allowed missing certificates downloads.
+    /// The maximum number of missing certificates a single PeerConnector may download
     static const unsigned int MaxCertsDownloads = 10;
-    /// The maximum allowed nested certificates downloads.
+
+    /// The maximum number of inter-dependent Downloader jobs a worker may initiate
     static const unsigned int MaxNestedDownloads = 3;
 
     AsyncCall::Pointer closeHandler; ///< we call this when the connection closed
@@ -186,6 +195,14 @@
     /// The list of URLs where missing certificates should be downloaded.
     std::queue<SBuf> urlsOfMissingCerts;
     unsigned int certsDownloads; ///< the number of downloaded missing certificates
+
+#if USE_OPENSSL
+    /// successfully downloaded intermediate certificates (omitted by the peer)
+    Ssl::X509_STACK_Pointer downloadedCerts;
+#endif
+
+    /// outcome of the last (failed and) suspended negotiation attempt (or nil)
+    Security::IoResultPointer suspendedError_;
 };
 
 } // namespace Security
diff -u -r -N squid-5.0.5/src/security/PeerOptions.cc squid-5.0.6/src/security/PeerOptions.cc
--- squid-5.0.5/src/security/PeerOptions.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/PeerOptions.cc	2021-05-10 21:02:34.000000000 +1200
@@ -254,7 +254,7 @@
 #elif USE_GNUTLS
     // Initialize for X.509 certificate exchange
     gnutls_certificate_credentials_t t;
-    if (const int x = gnutls_certificate_allocate_credentials(&t)) {
+    if (const auto x = gnutls_certificate_allocate_credentials(&t)) {
         fatalf("Failed to allocate TLS client context: %s\n", Security::ErrorString(x));
     }
     ctx = convertContextFromRawPtr(t);
@@ -527,7 +527,7 @@
     const char *err = nullptr;
     const char *priorities = str.c_str();
     gnutls_priority_t op;
-    int x = gnutls_priority_init(&op, priorities, &err);
+    const auto x = gnutls_priority_init(&op, priorities, &err);
     if (x != GNUTLS_E_SUCCESS) {
         fatalf("(%s) in TLS options '%s'", ErrorString(x), err);
     }
@@ -767,7 +767,7 @@
     SSL_set_options(s.get(), parsedOptions);
 
 #elif USE_GNUTLS
-    int x;
+    LibErrorCode x;
     SBuf errMsg;
     if (!parsedOptions) {
         debugs(83, 5, "set GnuTLS default priority/options for session=" << s);
diff -u -r -N squid-5.0.5/src/security/ServerOptions.cc squid-5.0.6/src/security/ServerOptions.cc
--- squid-5.0.5/src/security/ServerOptions.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/ServerOptions.cc	2021-05-10 21:02:34.000000000 +1200
@@ -24,6 +24,8 @@
 #endif
 #endif
 
+#include <limits>
+
 Security::ServerOptions &
 Security::ServerOptions::operator =(const Security::ServerOptions &old) {
     if (this != &old) {
@@ -169,7 +171,7 @@
 #elif USE_GNUTLS
     // Initialize for X.509 certificate exchange
     gnutls_certificate_credentials_t t;
-    if (const int x = gnutls_certificate_allocate_credentials(&t)) {
+    if (const auto x = gnutls_certificate_allocate_credentials(&t)) {
         debugs(83, DBG_CRITICAL, "ERROR: Failed to allocate TLS server context: " << Security::ErrorString(x));
     }
     ctx = convertContextFromRawPtr(t);
diff -u -r -N squid-5.0.5/src/security/Session.cc squid-5.0.6/src/security/Session.cc
--- squid-5.0.5/src/security/Session.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/Session.cc	2021-05-10 21:02:34.000000000 +1200
@@ -116,7 +116,7 @@
 #if USE_OPENSSL || USE_GNUTLS
 
     const char *errAction = "with no TLS/SSL library";
-    int errCode = 0;
+    Security::LibErrorCode errCode = 0;
 #if USE_OPENSSL
     Security::SessionPointer session(Security::NewSessionObject(ctx));
     if (!session) {
diff -u -r -N squid-5.0.5/src/security/Session.h squid-5.0.6/src/security/Session.h
--- squid-5.0.5/src/security/Session.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/security/Session.h	2021-05-10 21:02:34.000000000 +1200
@@ -41,6 +41,8 @@
 bool CreateServerSession(const Security::ContextPointer &, const Comm::ConnectionPointer &, Security::PeerOptions &, const char *squidCtx);
 
 #if USE_OPENSSL
+typedef SSL Connection;
+
 typedef std::shared_ptr<SSL> SessionPointer;
 
 typedef std::unique_ptr<SSL_SESSION, HardFun<void, SSL_SESSION*, &SSL_SESSION_free>> SessionStatePointer;
@@ -53,6 +55,8 @@
 typedef std::unique_ptr<gnutls_datum_t, HardFun<void, void*, &Security::squid_gnutls_free>> SessionStatePointer;
 
 #else
+typedef std::nullptr_t Connection;
+
 typedef std::shared_ptr<void> SessionPointer;
 
 typedef std::unique_ptr<int> SessionStatePointer;
diff -u -r -N squid-5.0.5/src/servers/FtpServer.cc squid-5.0.6/src/servers/FtpServer.cc
--- squid-5.0.5/src/servers/FtpServer.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/servers/FtpServer.cc	2021-05-10 21:02:34.000000000 +1200
@@ -807,7 +807,7 @@
 void
 Ftp::Server::handleFeatReply(const HttpReply *reply, StoreIOBuffer)
 {
-    if (pipeline.front()->http->request->errType != ERR_NONE) {
+    if (pipeline.front()->http->request->error) {
         writeCustomReply(502, "Server does not support FEAT", reply);
         return;
     }
@@ -879,7 +879,7 @@
     const Http::StreamPointer context(pipeline.front());
     assert(context != nullptr);
 
-    if (context->http->request->errType != ERR_NONE) {
+    if (context->http->request->error) {
         writeCustomReply(502, "Server does not support PASV", reply);
         return;
     }
@@ -916,7 +916,7 @@
 void
 Ftp::Server::handlePortReply(const HttpReply *reply, StoreIOBuffer)
 {
-    if (pipeline.front()->http->request->errType != ERR_NONE) {
+    if (pipeline.front()->http->request->error) {
         writeCustomReply(502, "Server does not support PASV (converted from PORT)", reply);
         return;
     }
@@ -1054,7 +1054,7 @@
 void
 Ftp::Server::handleEprtReply(const HttpReply *reply, StoreIOBuffer)
 {
-    if (pipeline.front()->http->request->errType != ERR_NONE) {
+    if (pipeline.front()->http->request->error) {
         writeCustomReply(502, "Server does not support PASV (converted from EPRT)", reply);
         return;
     }
@@ -1067,7 +1067,7 @@
 void
 Ftp::Server::handleEpsvReply(const HttpReply *reply, StoreIOBuffer)
 {
-    if (pipeline.front()->http->request->errType != ERR_NONE) {
+    if (pipeline.front()->http->request->error) {
         writeCustomReply(502, "Cannot connect to server", reply);
         return;
     }
@@ -1096,14 +1096,12 @@
     MemBuf mb;
     mb.init();
 
-    if (request->errType != ERR_NONE)
-        mb.appendf("%i-%s\r\n", scode, errorPageName(request->errType));
+    if (request->error)
+        mb.appendf("%i-%s\r\n", scode, errorPageName(request->error.category));
 
-    if (request->errDetail > 0) {
-        // XXX: > 0 may not always mean that this is an errno
-        mb.appendf("%i-Error: (%d) %s\r\n", scode,
-                   request->errDetail,
-                   strerror(request->errDetail));
+    if (const auto &detail = request->error.detail) {
+        mb.appendf("%i-Error-Detail-Brief: " SQUIDSBUFPH "\r\n", scode, SQUIDSBUFPRINT(detail->brief()));
+        mb.appendf("%i-Error-Detail-Verbose: " SQUIDSBUFPH "\r\n", scode, SQUIDSBUFPRINT(detail->verbose(request)));
     }
 
 #if USE_ADAPTATION
@@ -1836,16 +1834,16 @@
 static bool
 Ftp::SupportedCommand(const SBuf &name)
 {
-    static std::set<SBuf> BlackList;
-    if (BlackList.empty()) {
+    static std::set<SBuf> BlockList;
+    if (BlockList.empty()) {
         /* Add FTP commands that Squid cannot relay correctly. */
 
         // We probably do not support AUTH TLS.* and AUTH SSL,
         // but let's disclaim all AUTH support to KISS, for now.
-        BlackList.insert(cmdAuth());
+        BlockList.insert(cmdAuth());
     }
 
     // we claim support for all commands that we do not know about
-    return BlackList.find(name) == BlackList.end();
+    return BlockList.find(name) == BlockList.end();
 }
 
diff -u -r -N squid-5.0.5/src/servers/Makefile.am squid-5.0.6/src/servers/Makefile.am
--- squid-5.0.5/src/servers/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/servers/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -11,10 +11,10 @@
 noinst_LTLIBRARIES = libservers.la
 
 libservers_la_SOURCES = \
-	forward.h \
 	FtpServer.cc \
 	FtpServer.h \
 	Http1Server.cc \
 	Http1Server.h \
 	Server.cc \
-	Server.h
+	Server.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/servers/Makefile.in squid-5.0.6/src/servers/Makefile.in
--- squid-5.0.5/src/servers/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/src/servers/Makefile.in	2021-05-10 22:57:55.000000000 +1200
@@ -729,13 +729,13 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libservers.la
 libservers_la_SOURCES = \
-	forward.h \
 	FtpServer.cc \
 	FtpServer.h \
 	Http1Server.cc \
 	Http1Server.h \
 	Server.cc \
-	Server.h
+	Server.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/servers/Server.cc squid-5.0.6/src/servers/Server.cc
--- squid-5.0.5/src/servers/Server.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/servers/Server.cc	2021-05-10 21:02:34.000000000 +1200
@@ -12,9 +12,11 @@
 #include "comm.h"
 #include "comm/Read.h"
 #include "Debug.h"
+#include "error/SysErrorDetail.h"
 #include "fd.h"
 #include "fde.h"
 #include "http/Stream.h"
+#include "LogTags.h"
 #include "MasterXaction.h"
 #include "servers/Server.h"
 #include "SquidConfig.h"
@@ -146,8 +148,10 @@
     case Comm::ENDFILE: // close detected by 0-byte read
         debugs(33, 5, io.conn << " closed?");
 
-        if (connFinishedWithConn(rd.size)) {
-            clientConnection->close();
+        if (shouldCloseOnEof()) {
+            LogTagsErrors lte;
+            lte.aborted = true;
+            terminateAll(ERR_CLIENT_GONE, lte);
             return;
         }
 
@@ -167,9 +171,10 @@
     // case Comm::COMM_ERROR:
     default: // no other flags should ever occur
         debugs(33, 2, io.conn << ": got flag " << rd.flag << "; " << xstrerr(rd.xerrno));
-        checkLogging();
-        pipeline.terminateAll(rd.xerrno);
-        io.conn->close();
+        LogTagsErrors lte;
+        lte.timedout = rd.xerrno == ETIMEDOUT;
+        lte.aborted = !lte.timedout; // intentionally true for zero rd.xerrno
+        terminateAll(Error(ERR_CLIENT_GONE, SysErrorDetail::NewIfAny(rd.xerrno)), lte);
         return;
     }
 
diff -u -r -N squid-5.0.5/src/servers/Server.h squid-5.0.6/src/servers/Server.h
--- squid-5.0.5/src/servers/Server.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/servers/Server.h	2021-05-10 21:02:34.000000000 +1200
@@ -17,6 +17,7 @@
 #include "BodyPipe.h"
 #include "comm/Write.h"
 #include "CommCalls.h"
+#include "log/forward.h"
 #include "Pipeline.h"
 #include "sbuf/SBuf.h"
 #include "servers/forward.h"
@@ -36,8 +37,8 @@
     virtual bool doneAll() const;
     virtual void swanSong();
 
-    /// ??
-    virtual bool connFinishedWithConn(int size) = 0;
+    /// whether to stop serving our client after reading EOF on its connection
+    virtual bool shouldCloseOnEof() const = 0;
 
     /// maybe grow the inBuf and schedule Comm::Read()
     void readSomeData();
@@ -115,12 +116,12 @@
     Pipeline pipeline;
 
 protected:
+    /// abort any pending transactions and prevent new ones (by closing)
+    virtual void terminateAll(const Error &, const LogTagsErrors &) = 0;
+
     void doClientRead(const CommIoCbParams &io);
     void clientWriteDone(const CommIoCbParams &io);
 
-    /// Log the current [attempt at] transaction if nobody else will.
-    virtual void checkLogging() = 0;
-
     AsyncCall::Pointer reader; ///< set when we are reading
     AsyncCall::Pointer writer; ///< set when we are writing
 };
diff -u -r -N squid-5.0.5/src/snmp/Forwarder.cc squid-5.0.6/src/snmp/Forwarder.cc
--- squid-5.0.5/src/snmp/Forwarder.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/snmp/Forwarder.cc	2021-05-10 21:02:34.000000000 +1200
@@ -23,7 +23,7 @@
 
 Snmp::Forwarder::Forwarder(const Pdu& aPdu, const Session& aSession, int aFd,
                            const Ip::Address& anAddress):
-    Ipc::Forwarder(new Request(KidIdentifier, 0, aPdu, aSession, aFd, anAddress), 2),
+    Ipc::Forwarder(new Request(KidIdentifier, Ipc::RequestId(), aPdu, aSession, aFd, anAddress), 2),
     fd(aFd)
 {
     debugs(49, 5, HERE << "FD " << aFd);
@@ -88,7 +88,7 @@
 }
 
 void
-Snmp::SendResponse(unsigned int requestId, const Pdu& pdu)
+Snmp::SendResponse(const Ipc::RequestId requestId, const Pdu &pdu)
 {
     debugs(49, 5, HERE);
     // snmpAgentResponse() can modify arg
diff -u -r -N squid-5.0.5/src/snmp/Forwarder.h squid-5.0.6/src/snmp/Forwarder.h
--- squid-5.0.5/src/snmp/Forwarder.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/snmp/Forwarder.h	2021-05-10 21:02:34.000000000 +1200
@@ -47,7 +47,7 @@
     AsyncCall::Pointer closer; ///< comm_close handler for the connection
 };
 
-void SendResponse(unsigned int requestId, const Pdu& pdu);
+void SendResponse(Ipc::RequestId, const Pdu &);
 
 } // namespace Snmp
 
diff -u -r -N squid-5.0.5/src/snmp/Makefile.am squid-5.0.6/src/snmp/Makefile.am
--- squid-5.0.5/src/snmp/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/snmp/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -13,7 +13,6 @@
 libsnmp_la_SOURCES = \
 	Forwarder.cc \
 	Forwarder.h \
-	forward.h \
 	Inquirer.cc \
 	Inquirer.h \
 	Pdu.cc \
@@ -25,4 +24,5 @@
 	Session.cc \
 	Session.h \
 	Var.cc \
-	Var.h
+	Var.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/snmp/Makefile.in squid-5.0.6/src/snmp/Makefile.in
--- squid-5.0.5/src/snmp/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/src/snmp/Makefile.in	2021-05-10 22:57:56.000000000 +1200
@@ -734,7 +734,6 @@
 libsnmp_la_SOURCES = \
 	Forwarder.cc \
 	Forwarder.h \
-	forward.h \
 	Inquirer.cc \
 	Inquirer.h \
 	Pdu.cc \
@@ -746,7 +745,8 @@
 	Session.cc \
 	Session.h \
 	Var.cc \
-	Var.h
+	Var.h \
+	forward.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/snmp/Request.cc squid-5.0.6/src/snmp/Request.cc
--- squid-5.0.5/src/snmp/Request.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/snmp/Request.cc	2021-05-10 21:02:34.000000000 +1200
@@ -13,7 +13,7 @@
 #include "ipc/TypedMsgHdr.h"
 #include "snmp/Request.h"
 
-Snmp::Request::Request(int aRequestorId, unsigned int aRequestId,
+Snmp::Request::Request(const int aRequestorId, const Ipc::RequestId aRequestId,
                        const Pdu& aPdu, const Session& aSession,
                        int aFd, const Ip::Address& anAddress):
     Ipc::Request(aRequestorId, aRequestId),
@@ -21,15 +21,7 @@
 {
 }
 
-Snmp::Request::Request(const Request& request):
-    Ipc::Request(request.requestorId, request.requestId),
-    pdu(request.pdu), session(request.session),
-    fd(request.fd), address(request.address)
-{
-}
-
-Snmp::Request::Request(const Ipc::TypedMsgHdr& msg):
-    Ipc::Request(0, 0)
+Snmp::Request::Request(const Ipc::TypedMsgHdr &msg)
 {
     msg.checkType(Ipc::mtSnmpRequest);
     msg.getPod(requestorId);
diff -u -r -N squid-5.0.5/src/snmp/Request.h squid-5.0.6/src/snmp/Request.h
--- squid-5.0.5/src/snmp/Request.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/snmp/Request.h	2021-05-10 21:02:34.000000000 +1200
@@ -24,7 +24,7 @@
 class Request: public Ipc::Request
 {
 public:
-    Request(int aRequestorId, unsigned int aRequestId, const Pdu& aPdu,
+    Request(int aRequestorId, Ipc::RequestId aRequestId, const Pdu& aPdu,
             const Session& aSession, int aFd, const Ip::Address& anAddress);
 
     explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
@@ -32,9 +32,6 @@
     virtual void pack(Ipc::TypedMsgHdr& msg) const;
     virtual Pointer clone() const;
 
-private:
-    Request(const Request& request);
-
 public:
     Pdu pdu; ///< SNMP protocol data unit
     Session session; ///< SNMP session
diff -u -r -N squid-5.0.5/src/snmp/Response.cc squid-5.0.6/src/snmp/Response.cc
--- squid-5.0.5/src/snmp/Response.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/snmp/Response.cc	2021-05-10 21:02:34.000000000 +1200
@@ -11,27 +11,16 @@
 #include "squid.h"
 #include "base/TextException.h"
 #include "ipc/Messages.h"
+#include "ipc/RequestId.h"
 #include "ipc/TypedMsgHdr.h"
 #include "snmp/Response.h"
 
-std::ostream& Snmp::operator << (std::ostream& os, const Response& response)
-{
-    os << "response: {requestId: " << response.requestId << '}';
-    return os;
-}
-
-Snmp::Response::Response(unsigned int aRequestId):
+Snmp::Response::Response(const Ipc::RequestId aRequestId):
     Ipc::Response(aRequestId), pdu()
 {
 }
 
-Snmp::Response::Response(const Response& response):
-    Ipc::Response(response.requestId), pdu(response.pdu)
-{
-}
-
-Snmp::Response::Response(const Ipc::TypedMsgHdr& msg):
-    Ipc::Response(0)
+Snmp::Response::Response(const Ipc::TypedMsgHdr &msg)
 {
     msg.checkType(Ipc::mtSnmpResponse);
     msg.getPod(requestId);
diff -u -r -N squid-5.0.5/src/snmp/Response.h squid-5.0.6/src/snmp/Response.h
--- squid-5.0.5/src/snmp/Response.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/snmp/Response.h	2021-05-10 21:02:34.000000000 +1200
@@ -23,21 +23,16 @@
 class Response: public Ipc::Response
 {
 public:
-    Response(unsigned int aRequestId);
+    explicit Response(Ipc::RequestId); ///< sender's constructor
     explicit Response(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
     /* Ipc::Response API */
     virtual void pack(Ipc::TypedMsgHdr& msg) const;
     virtual Ipc::Response::Pointer clone() const;
 
-private:
-    Response(const Response& response);
-
 public:
     Pdu pdu; ///< SNMP protocol data unit
 };
 
-std::ostream& operator << (std::ostream& os, const Response& response);
-
 } // namespace Snmp
 
 #endif /* SQUID_SNMPX_RESPONSE_H */
diff -u -r -N squid-5.0.5/src/snmp_core.cc squid-5.0.6/src/snmp_core.cc
--- squid-5.0.5/src/snmp_core.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/snmp_core.cc	2021-05-10 21:02:34.000000000 +1200
@@ -947,7 +947,7 @@
     }
 
     // if we aborted before the lst octet was found, return false.
-    safe_free(name);
+    safe_free(*name);
     return false;
 }
 
diff -u -r -N squid-5.0.5/src/ssl/bio.cc squid-5.0.6/src/ssl/bio.cc
--- squid-5.0.5/src/ssl/bio.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/bio.cc	2021-05-10 21:02:34.000000000 +1200
@@ -245,7 +245,6 @@
     allowSplice(false),
     allowBump(false),
     holdWrite_(false),
-    holdRead_(true),
     record_(false),
     parsedHandshake(false),
     parseError(false),
@@ -319,12 +318,6 @@
         parseError = true;
     }
 
-    if (holdRead_) {
-        debugs(83, 7, "Hold flag is set, retry latter. (Hold " << size << "bytes)");
-        BIO_set_retry_read(table);
-        return -1;
-    }
-
     return giveBuffered(buf, size);
 }
 
diff -u -r -N squid-5.0.5/src/ssl/bio.h squid-5.0.6/src/ssl/bio.h
--- squid-5.0.5/src/ssl/bio.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/bio.h	2021-05-10 21:02:34.000000000 +1200
@@ -151,10 +151,6 @@
     bool holdWrite() const {return holdWrite_;}
     /// Enables or disables the write hold state
     void holdWrite(bool h) {holdWrite_ = h;}
-    /// The read hold state
-    bool holdRead() const {return holdRead_;}
-    /// Enables or disables the read hold state
-    void holdRead(bool h) {holdRead_ = h;}
     /// Enables or disables the input data recording, for internal analysis.
     void recordInput(bool r) {record_ = r;}
     /// Whether we can splice or not the SSL stream
@@ -171,9 +167,6 @@
     /// Return true if the Server Hello parsing failed
     bool gotHelloFailed() const { return (parsedHandshake && parseError); }
 
-    /// \return the server certificates list if received and parsed correctly
-    const Security::CertList &serverCertificatesIfAny() { return parser_.serverCertificates; }
-
     /// \return the TLS Details advertised by TLS server.
     const Security::TlsDetails::Pointer &receivedHelloDetails() const {return parser_.details;}
 
@@ -193,7 +186,6 @@
     bool allowSplice; ///< True if the SSL stream can be spliced
     bool allowBump;  ///< True if the SSL stream can be bumped
     bool holdWrite_;  ///< The write hold state of the bio.
-    bool holdRead_;  ///< The read hold state of the bio.
     bool record_; ///< If true the input data recorded to rbuf for internal use
     bool parsedHandshake; ///< whether we are done parsing TLS Hello
     bool parseError; ///< error while parsing server hello message
diff -u -r -N squid-5.0.5/src/ssl/cert_validate_message.cc squid-5.0.6/src/ssl/cert_validate_message.cc
--- squid-5.0.5/src/ssl/cert_validate_message.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/cert_validate_message.cc	2021-05-10 21:02:34.000000000 +1200
@@ -211,44 +211,12 @@
     return errors.back();
 }
 
-Ssl::CertValidationResponse::RecvdError::RecvdError(const RecvdError &old)
-{
-    id = old.id;
-    error_no = old.error_no;
-    error_reason = old.error_reason;
-    error_depth = old.error_depth;
-    setCert(old.cert.get());
-}
-
-Ssl::CertValidationResponse::RecvdError & Ssl::CertValidationResponse::RecvdError::operator = (const RecvdError &old)
-{
-    id = old.id;
-    error_no = old.error_no;
-    error_reason = old.error_reason;
-    error_depth = old.error_depth;
-    setCert(old.cert.get());
-    return *this;
-}
-
 void
 Ssl::CertValidationResponse::RecvdError::setCert(X509 *aCert)
 {
     cert.resetAndLock(aCert);
 }
 
-Ssl::CertValidationMsg::CertItem::CertItem(const CertItem &old)
-{
-    name = old.name;
-    setCert(old.cert.get());
-}
-
-Ssl::CertValidationMsg::CertItem & Ssl::CertValidationMsg::CertItem::operator = (const CertItem &old)
-{
-    name = old.name;
-    setCert(old.cert.get());
-    return *this;
-}
-
 void
 Ssl::CertValidationMsg::CertItem::setCert(X509 *aCert)
 {
diff -u -r -N squid-5.0.5/src/ssl/cert_validate_message.h squid-5.0.6/src/ssl/cert_validate_message.h
--- squid-5.0.5/src/ssl/cert_validate_message.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/cert_validate_message.h	2021-05-10 21:02:34.000000000 +1200
@@ -47,15 +47,12 @@
     class  RecvdError
     {
     public:
-        RecvdError(): id(0), error_no(SSL_ERROR_NONE), cert(NULL), error_depth(-1) {}
-        RecvdError(const RecvdError &);
-        RecvdError & operator =(const RecvdError &);
         void setCert(X509 *);  ///< Sets cert to the given certificate
-        int id; ///<  The id of the error
-        Security::ErrorCode error_no; ///< The OpenSSL error code
+        int id = 0; ///<  The id of the error
+        Security::ErrorCode error_no = 0; ///< The OpenSSL error code
         std::string error_reason; ///< A string describing the error
         Security::CertPointer cert; ///< The broken certificate
-        int error_depth; ///< The error depth
+        int error_depth = -1; ///< The error depth
     };
 
     typedef std::vector<RecvdError> RecvdErrors;
@@ -89,9 +86,6 @@
     public:
         std::string name; ///< The certificate Id to use
         Security::CertPointer cert;       ///< A pointer to certificate
-        CertItem(): cert(NULL) {}
-        CertItem(const CertItem &);
-        CertItem & operator =(const CertItem &);
         void setCert(X509 *); ///< Sets cert to the given certificate
     };
 
diff -u -r -N squid-5.0.5/src/ssl/ErrorDetail.cc squid-5.0.6/src/ssl/ErrorDetail.cc
--- squid-5.0.5/src/ssl/ErrorDetail.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/ErrorDetail.cc	2021-05-10 21:02:34.000000000 +1200
@@ -9,387 +9,11 @@
 #include "squid.h"
 #include "errorpage.h"
 #include "fatal.h"
-#include "html_quote.h"
 #include "ssl/ErrorDetail.h"
+#include "ssl/ErrorDetailManager.h"
 
-#include <climits>
 #include <map>
 
-struct SslErrorEntry {
-    Security::ErrorCode value;
-    const char *name;
-};
-
-static const char *SslErrorDetailDefaultStr = "SSL handshake error (%err_name)";
-//Use std::map to optimize search
-typedef std::map<Security::ErrorCode, const SslErrorEntry *> SslErrors;
-SslErrors TheSslErrors;
-
-static SslErrorEntry TheSslErrorArray[] = {
-    {   SQUID_X509_V_ERR_INFINITE_VALIDATION,
-        "SQUID_X509_V_ERR_INFINITE_VALIDATION"
-    },
-    {   SQUID_X509_V_ERR_CERT_CHANGE,
-        "SQUID_X509_V_ERR_CERT_CHANGE"
-    },
-    {   SQUID_ERR_SSL_HANDSHAKE,
-        "SQUID_ERR_SSL_HANDSHAKE"
-    },
-    {   SQUID_X509_V_ERR_DOMAIN_MISMATCH,
-        "SQUID_X509_V_ERR_DOMAIN_MISMATCH"
-    },
-    {   X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
-        "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT"
-    },
-    {   X509_V_ERR_UNABLE_TO_GET_CRL,
-        "X509_V_ERR_UNABLE_TO_GET_CRL"
-    },
-    {   X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE,
-        "X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE"
-    },
-    {   X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE,
-        "X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE"
-    },
-    {   X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,
-        "X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY"
-    },
-    {   X509_V_ERR_CERT_SIGNATURE_FAILURE,
-        "X509_V_ERR_CERT_SIGNATURE_FAILURE"
-    },
-    {   X509_V_ERR_CRL_SIGNATURE_FAILURE,
-        "X509_V_ERR_CRL_SIGNATURE_FAILURE"
-    },
-    {   X509_V_ERR_CERT_NOT_YET_VALID,
-        "X509_V_ERR_CERT_NOT_YET_VALID"
-    },
-    {   X509_V_ERR_CERT_HAS_EXPIRED,
-        "X509_V_ERR_CERT_HAS_EXPIRED"
-    },
-    {   X509_V_ERR_CRL_NOT_YET_VALID,
-        "X509_V_ERR_CRL_NOT_YET_VALID"
-    },
-    {   X509_V_ERR_CRL_HAS_EXPIRED,
-        "X509_V_ERR_CRL_HAS_EXPIRED"
-    },
-    {   X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD,
-        "X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD"
-    },
-    {   X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD,
-        "X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD"
-    },
-    {   X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD,
-        "X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD"
-    },
-    {   X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD,
-        "X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD"
-    },
-    {   X509_V_ERR_OUT_OF_MEM,
-        "X509_V_ERR_OUT_OF_MEM"
-    },
-    {   X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
-        "X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT"
-    },
-    {   X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
-        "X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN"
-    },
-    {   X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
-        "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY"
-    },
-    {   X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
-        "X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE"
-    },
-    {   X509_V_ERR_CERT_CHAIN_TOO_LONG,
-        "X509_V_ERR_CERT_CHAIN_TOO_LONG"
-    },
-    {   X509_V_ERR_CERT_REVOKED,
-        "X509_V_ERR_CERT_REVOKED"
-    },
-    {   X509_V_ERR_INVALID_CA,
-        "X509_V_ERR_INVALID_CA"
-    },
-    {   X509_V_ERR_PATH_LENGTH_EXCEEDED,
-        "X509_V_ERR_PATH_LENGTH_EXCEEDED"
-    },
-    {   X509_V_ERR_INVALID_PURPOSE,
-        "X509_V_ERR_INVALID_PURPOSE"
-    },
-    {   X509_V_ERR_CERT_UNTRUSTED,
-        "X509_V_ERR_CERT_UNTRUSTED"
-    },
-    {   X509_V_ERR_CERT_REJECTED,
-        "X509_V_ERR_CERT_REJECTED"
-    },
-    {   X509_V_ERR_SUBJECT_ISSUER_MISMATCH,
-        "X509_V_ERR_SUBJECT_ISSUER_MISMATCH"
-    },
-    {   X509_V_ERR_AKID_SKID_MISMATCH,
-        "X509_V_ERR_AKID_SKID_MISMATCH"
-    },
-    {   X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH,
-        "X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH"
-    },
-    {   X509_V_ERR_KEYUSAGE_NO_CERTSIGN,
-        "X509_V_ERR_KEYUSAGE_NO_CERTSIGN"
-    },
-#if defined(X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER)
-    {
-        X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER, //33
-        "X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER"
-    },
-#endif
-#if defined(X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION)
-    {
-        X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION, //34
-        "X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION"
-    },
-#endif
-#if defined(X509_V_ERR_KEYUSAGE_NO_CRL_SIGN)
-    {
-        X509_V_ERR_KEYUSAGE_NO_CRL_SIGN, //35
-        "X509_V_ERR_KEYUSAGE_NO_CRL_SIGN"
-    },
-#endif
-#if defined(X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION)
-    {
-        X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION, //36
-        "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION"
-    },
-#endif
-#if defined(X509_V_ERR_INVALID_NON_CA)
-    {
-        X509_V_ERR_INVALID_NON_CA, //37
-        "X509_V_ERR_INVALID_NON_CA"
-    },
-#endif
-#if defined(X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED)
-    {
-        X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED, //38
-        "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED"
-    },
-#endif
-#if defined(X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE)
-    {
-        X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE, //39
-        "X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE"
-    },
-#endif
-#if defined(X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED)
-    {
-        X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED, //40
-        "X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED"
-    },
-#endif
-#if defined(X509_V_ERR_INVALID_EXTENSION)
-    {
-        X509_V_ERR_INVALID_EXTENSION, //41
-        "X509_V_ERR_INVALID_EXTENSION"
-    },
-#endif
-#if defined(X509_V_ERR_INVALID_POLICY_EXTENSION)
-    {
-        X509_V_ERR_INVALID_POLICY_EXTENSION, //42
-        "X509_V_ERR_INVALID_POLICY_EXTENSION"
-    },
-#endif
-#if defined(X509_V_ERR_NO_EXPLICIT_POLICY)
-    {
-        X509_V_ERR_NO_EXPLICIT_POLICY, //43
-        "X509_V_ERR_NO_EXPLICIT_POLICY"
-    },
-#endif
-#if defined(X509_V_ERR_DIFFERENT_CRL_SCOPE)
-    {
-        X509_V_ERR_DIFFERENT_CRL_SCOPE, //44
-        "X509_V_ERR_DIFFERENT_CRL_SCOPE"
-    },
-#endif
-#if defined(X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE)
-    {
-        X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE, //45
-        "X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE"
-    },
-#endif
-#if defined(X509_V_ERR_UNNESTED_RESOURCE)
-    {
-        X509_V_ERR_UNNESTED_RESOURCE, //46
-        "X509_V_ERR_UNNESTED_RESOURCE"
-    },
-#endif
-#if defined(X509_V_ERR_PERMITTED_VIOLATION)
-    {
-        X509_V_ERR_PERMITTED_VIOLATION, //47
-        "X509_V_ERR_PERMITTED_VIOLATION"
-    },
-#endif
-#if defined(X509_V_ERR_EXCLUDED_VIOLATION)
-    {
-        X509_V_ERR_EXCLUDED_VIOLATION, //48
-        "X509_V_ERR_EXCLUDED_VIOLATION"
-    },
-#endif
-#if defined(X509_V_ERR_SUBTREE_MINMAX)
-    {
-        X509_V_ERR_SUBTREE_MINMAX, //49
-        "X509_V_ERR_SUBTREE_MINMAX"
-    },
-#endif
-    {   X509_V_ERR_APPLICATION_VERIFICATION, //50
-        "X509_V_ERR_APPLICATION_VERIFICATION"
-    },
-#if defined(X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE)
-    {
-        X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE, //51
-        "X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE"
-    },
-#endif
-#if defined(X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX)
-    {
-        X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX, //52
-        "X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX"
-    },
-#endif
-#if defined(X509_V_ERR_UNSUPPORTED_NAME_SYNTAX)
-    {
-        X509_V_ERR_UNSUPPORTED_NAME_SYNTAX, //53
-        "X509_V_ERR_UNSUPPORTED_NAME_SYNTAX"
-    },
-#endif
-#if defined(X509_V_ERR_CRL_PATH_VALIDATION_ERROR)
-    {
-        X509_V_ERR_CRL_PATH_VALIDATION_ERROR, //54
-        "X509_V_ERR_CRL_PATH_VALIDATION_ERROR"
-    },
-#endif
-#if defined(X509_V_ERR_PATH_LOOP)
-    {
-        X509_V_ERR_PATH_LOOP, //55
-        "X509_V_ERR_PATH_LOOP"
-    },
-#endif
-#if defined(X509_V_ERR_SUITE_B_INVALID_VERSION)
-    {
-        X509_V_ERR_SUITE_B_INVALID_VERSION, //56
-        "X509_V_ERR_SUITE_B_INVALID_VERSION"
-    },
-#endif
-#if defined(X509_V_ERR_SUITE_B_INVALID_ALGORITHM)
-    {
-        X509_V_ERR_SUITE_B_INVALID_ALGORITHM, //57
-        "X509_V_ERR_SUITE_B_INVALID_ALGORITHM"
-    },
-#endif
-#if defined(X509_V_ERR_SUITE_B_INVALID_CURVE)
-    {
-        X509_V_ERR_SUITE_B_INVALID_CURVE, //58
-        "X509_V_ERR_SUITE_B_INVALID_CURVE"
-    },
-#endif
-#if defined(X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM)
-    {
-        X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM, //59
-        "X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM"
-    },
-#endif
-#if defined(X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED)
-    {
-        X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED, //60
-        "X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED"
-    },
-#endif
-#if defined(X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256)
-    {
-        X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256, //61
-        "X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256"
-    },
-#endif
-#if defined(X509_V_ERR_HOSTNAME_MISMATCH)
-    {
-        X509_V_ERR_HOSTNAME_MISMATCH, //62
-        "X509_V_ERR_HOSTNAME_MISMATCH"
-    },
-#endif
-#if defined(X509_V_ERR_EMAIL_MISMATCH)
-    {
-        X509_V_ERR_EMAIL_MISMATCH, //63
-        "X509_V_ERR_EMAIL_MISMATCH"
-    },
-#endif
-#if defined(X509_V_ERR_IP_ADDRESS_MISMATCH)
-    {
-        X509_V_ERR_IP_ADDRESS_MISMATCH, //64
-        "X509_V_ERR_IP_ADDRESS_MISMATCH"
-    },
-#endif
-#if defined(X509_V_ERR_DANE_NO_MATCH)
-    {
-        X509_V_ERR_DANE_NO_MATCH, //65
-        "X509_V_ERR_DANE_NO_MATCH"
-    },
-#endif
-#if defined(X509_V_ERR_EE_KEY_TOO_SMALL)
-    {
-        X509_V_ERR_EE_KEY_TOO_SMALL, //66
-        "X509_V_ERR_EE_KEY_TOO_SMALL"
-    },
-#endif
-#if defined(X509_V_ERR_CA_KEY_TOO_SMALL)
-    {
-        X509_V_ERR_CA_KEY_TOO_SMALL, //67
-        "X509_V_ERR_CA_KEY_TOO_SMALL"
-    },
-#endif
-#if defined(X509_V_ERR_CA_MD_TOO_WEAK)
-    {
-        X509_V_ERR_CA_MD_TOO_WEAK, //68
-        "X509_V_ERR_CA_MD_TOO_WEAK"
-    },
-#endif
-#if defined(X509_V_ERR_INVALID_CALL)
-    {
-        X509_V_ERR_INVALID_CALL, //69
-        "X509_V_ERR_INVALID_CALL"
-    },
-#endif
-#if defined(X509_V_ERR_STORE_LOOKUP)
-    {
-        X509_V_ERR_STORE_LOOKUP, //70
-        "X509_V_ERR_STORE_LOOKUP"
-    },
-#endif
-#if defined(X509_V_ERR_NO_VALID_SCTS)
-    {
-        X509_V_ERR_NO_VALID_SCTS, //71
-        "X509_V_ERR_NO_VALID_SCTS"
-    },
-#endif
-#if defined(X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION)
-    {
-        X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION, //72
-        "X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION"
-    },
-#endif
-#if defined(X509_V_ERR_OCSP_VERIFY_NEEDED)
-    {
-        X509_V_ERR_OCSP_VERIFY_NEEDED, //73
-        "X509_V_ERR_OCSP_VERIFY_NEEDED"
-    },
-#endif
-#if defined(X509_V_ERR_OCSP_VERIFY_FAILED)
-    {
-        X509_V_ERR_OCSP_VERIFY_FAILED, //74
-        "X509_V_ERR_OCSP_VERIFY_FAILED"
-    },
-#endif
-#if defined(X509_V_ERR_OCSP_CERT_UNKNOWN)
-    {
-        X509_V_ERR_OCSP_CERT_UNKNOWN, //75
-        "X509_V_ERR_OCSP_CERT_UNKNOWN"
-    },
-#endif
-    { SSL_ERROR_NONE, "SSL_ERROR_NONE"},
-    {SSL_ERROR_NONE, NULL}
-};
-
 static const char *OptionalSslErrors[] = {
     "X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER",
     "X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION",
@@ -475,14 +99,6 @@
 typedef std::map<std::string, const Security::ErrorCode *> SslErrorShortcuts;
 SslErrorShortcuts TheSslErrorShortcuts;
 
-static void loadSslErrorMap()
-{
-    assert(TheSslErrors.empty());
-    for (int i = 0; TheSslErrorArray[i].name; ++i) {
-        TheSslErrors[TheSslErrorArray[i].value] = &TheSslErrorArray[i];
-    }
-}
-
 static void loadSslErrorShortcutsMap()
 {
     assert(TheSslErrorShortcuts.empty());
@@ -490,16 +106,6 @@
         TheSslErrorShortcuts[TheSslErrorShortcutsArray[i].name] = TheSslErrorShortcutsArray[i].errors;
 }
 
-Security::ErrorCode Ssl::GetErrorCode(const char *name)
-{
-    //TODO: use a std::map?
-    for (int i = 0; TheSslErrorArray[i].name != NULL; ++i) {
-        if (strcmp(name, TheSslErrorArray[i].name) == 0)
-            return TheSslErrorArray[i].value;
-    }
-    return SSL_ERROR_NONE;
-}
-
 bool
 Ssl::ParseErrorString(const char *name, Security::Errors &errors)
 {
@@ -513,7 +119,8 @@
 
     if (xisdigit(*name)) {
         const long int value = strtol(name, NULL, 0);
-        if (SQUID_SSL_ERROR_MIN <= value && value <= SQUID_SSL_ERROR_MAX) {
+        if ((SQUID_TLS_ERR_OFFSET < value && value < SQUID_TLS_ERR_END) || // custom
+                (value >= 0)) { // an official error, including SSL_ERROR_NONE
             errors.emplace(value);
             return true;
         }
@@ -537,20 +144,6 @@
     return false; // not reached
 }
 
-const char *Ssl::GetErrorName(Security::ErrorCode value, const bool prefixRawCode)
-{
-    if (TheSslErrors.empty())
-        loadSslErrorMap();
-
-    const SslErrors::const_iterator it = TheSslErrors.find(value);
-    if (it != TheSslErrors.end())
-        return it->second->name;
-
-    static char tmpBuffer[128];
-    snprintf(tmpBuffer, sizeof(tmpBuffer), "%s%d", prefixRawCode ? "SSL_ERR=" : "", (int)value);
-    return tmpBuffer;
-}
-
 bool
 Ssl::ErrorIsOptional(const char *name)
 {
@@ -567,248 +160,3 @@
     return ErrorDetailsManager::GetInstance().getDefaultErrorDescr(value);
 }
 
-Ssl::ErrorDetail::err_frm_code Ssl::ErrorDetail::ErrorFormatingCodes[] = {
-    {"ssl_subject", &Ssl::ErrorDetail::subject},
-    {"ssl_ca_name", &Ssl::ErrorDetail::ca_name},
-    {"ssl_cn", &Ssl::ErrorDetail::cn},
-    {"ssl_notbefore", &Ssl::ErrorDetail::notbefore},
-    {"ssl_notafter", &Ssl::ErrorDetail::notafter},
-    {"err_name", &Ssl::ErrorDetail::err_code},
-    {"ssl_error_descr", &Ssl::ErrorDetail::err_descr},
-    {"ssl_lib_error", &Ssl::ErrorDetail::err_lib_error},
-    {NULL,NULL}
-};
-
-/**
- * The subject of the current certification in text form
- */
-const char  *Ssl::ErrorDetail::subject() const
-{
-    if (broken_cert.get()) {
-        static char tmpBuffer[256]; // A temporary buffer
-        if (X509_NAME_oneline(X509_get_subject_name(broken_cert.get()), tmpBuffer, sizeof(tmpBuffer))) {
-            // quote to avoid possible html code injection through
-            // certificate subject
-            return html_quote(tmpBuffer);
-        }
-    }
-    return "[Not available]";
-}
-
-// helper function to be used with Ssl::matchX509CommonNames
-static int copy_cn(void *check_data,  ASN1_STRING *cn_data)
-{
-    String *str = (String *)check_data;
-    if (!str) // no data? abort
-        return 0;
-    if (cn_data && cn_data->length) {
-        if (str->size() > 0)
-            str->append(", ");
-        str->append((const char *)cn_data->data, cn_data->length);
-    }
-    return 1;
-}
-
-/**
- * The list with certificates cn and alternate names
- */
-const char *Ssl::ErrorDetail::cn() const
-{
-    if (broken_cert.get()) {
-        static String tmpStr;  ///< A temporary string buffer
-        tmpStr.clean();
-        Ssl::matchX509CommonNames(broken_cert.get(), &tmpStr, copy_cn);
-        if (tmpStr.size()) {
-            // quote to avoid possible html code injection through
-            // certificate subject
-            return html_quote(tmpStr.termedBuf());
-        }
-    }
-    return "[Not available]";
-}
-
-/**
- * The issuer name
- */
-const char *Ssl::ErrorDetail::ca_name() const
-{
-    if (broken_cert.get()) {
-        static char tmpBuffer[256]; // A temporary buffer
-        if (X509_NAME_oneline(X509_get_issuer_name(broken_cert.get()), tmpBuffer, sizeof(tmpBuffer))) {
-            // quote to avoid possible html code injection through
-            // certificate issuer subject
-            return html_quote(tmpBuffer);
-        }
-    }
-    return "[Not available]";
-}
-
-/**
- * The certificate "not before" field
- */
-const char *Ssl::ErrorDetail::notbefore() const
-{
-    if (broken_cert.get()) {
-        if (const auto tm = X509_getm_notBefore(broken_cert.get())) {
-            static char tmpBuffer[256]; // A temporary buffer
-            Ssl::asn1timeToString(tm, tmpBuffer, sizeof(tmpBuffer));
-            return tmpBuffer;
-        }
-    }
-    return "[Not available]";
-}
-
-/**
- * The certificate "not after" field
- */
-const char *Ssl::ErrorDetail::notafter() const
-{
-    if (broken_cert.get()) {
-        if (const auto tm = X509_getm_notAfter(broken_cert.get())) {
-            static char tmpBuffer[256]; // A temporary buffer
-            Ssl::asn1timeToString(tm, tmpBuffer, sizeof(tmpBuffer));
-            return tmpBuffer;
-        }
-    }
-    return "[Not available]";
-}
-
-/**
- * The string representation of the error_no
- */
-const char *Ssl::ErrorDetail::err_code() const
-{
-    // We can use the GetErrorName but using the detailEntry is faster,
-    // so try it first.
-    if (const char *err = detailEntry.name.termedBuf())
-        return err;
-
-    // error details not loaded yet or not defined in error_details.txt,
-    // try the GetErrorName...
-    return GetErrorName(error_no);
-}
-
-/**
- * A short description of the error_no
- */
-const char *Ssl::ErrorDetail::err_descr() const
-{
-    if (error_no == SSL_ERROR_NONE)
-        return "[No Error]";
-    if (const char *err = detailEntry.descr.termedBuf())
-        return err;
-    return "[Not available]";
-}
-
-const char *Ssl::ErrorDetail::err_lib_error() const
-{
-    if (errReason.size() > 0)
-        return errReason.termedBuf();
-    else if (lib_error_no != SSL_ERROR_NONE)
-        return Security::ErrorString(lib_error_no);
-    else
-        return "[No Error]";
-}
-
-/**
- * Converts the code to a string value. Supported formating codes are:
- *
- * Error meta information:
- * %err_name: The name of a high-level SSL error (e.g., X509_V_ERR_*)
- * %ssl_error_descr: A short description of the SSL error
- * %ssl_lib_error: human-readable low-level error string by Security::ErrorString()
- *
- * Certificate information extracted from broken (not necessarily peer!) cert
- * %ssl_cn: The comma-separated list of common and alternate names
- * %ssl_subject: The certificate subject
- * %ssl_ca_name: The certificate issuer name
- * %ssl_notbefore: The certificate "not before" field
- * %ssl_notafter: The certificate "not after" field
- *
- \retval  the length of the code (the number of characters will be replaced by value)
-*/
-int Ssl::ErrorDetail::convert(const char *code, const char **value) const
-{
-    *value = "-";
-    for (int i=0; ErrorFormatingCodes[i].code!=NULL; ++i) {
-        const int len = strlen(ErrorFormatingCodes[i].code);
-        if (strncmp(code,ErrorFormatingCodes[i].code, len)==0) {
-            ErrorDetail::fmt_action_t action  = ErrorFormatingCodes[i].fmt_action;
-            *value = (this->*action)();
-            return len;
-        }
-    }
-    // TODO: Support logformat %codes.
-    return 0;
-}
-
-/**
- * It uses the convert method to build the string errDetailStr using
- * a template message for the current SSL error. The template messages
- * can also contain normal error pages formating codes.
- * Currently the error template messages are hard-coded
- */
-void Ssl::ErrorDetail::buildDetail() const
-{
-    char const *s = NULL;
-    char const *p;
-    char const *t;
-    int code_len = 0;
-
-    if (ErrorDetailsManager::GetInstance().getErrorDetail(error_no, request, detailEntry))
-        s = detailEntry.detail.termedBuf();
-
-    if (!s)
-        s = SslErrorDetailDefaultStr;
-
-    assert(s);
-    while ((p = strchr(s, '%'))) {
-        errDetailStr.append(s, p - s);
-        code_len = convert(++p, &t);
-        if (code_len)
-            errDetailStr.append(t);
-        else
-            errDetailStr.append("%");
-        s = p + code_len;
-    }
-    errDetailStr.append(s, strlen(s));
-}
-
-const String &Ssl::ErrorDetail::toString() const
-{
-    if (errDetailStr.size() == 0)
-        buildDetail();
-    return errDetailStr;
-}
-
-Ssl::ErrorDetail::ErrorDetail( Security::ErrorCode err_no, X509 *cert, X509 *broken, const char *aReason): error_no (err_no), lib_error_no(SSL_ERROR_NONE), errReason(aReason)
-{
-    if (cert)
-        peer_cert.resetAndLock(cert);
-
-    if (broken)
-        broken_cert.resetAndLock(broken);
-    else
-        broken_cert.resetAndLock(cert);
-
-    detailEntry.error_no = SSL_ERROR_NONE;
-}
-
-Ssl::ErrorDetail::ErrorDetail(Ssl::ErrorDetail const &anErrDetail)
-{
-    error_no = anErrDetail.error_no;
-    request = anErrDetail.request;
-
-    if (anErrDetail.peer_cert.get()) {
-        peer_cert.resetAndLock(anErrDetail.peer_cert.get());
-    }
-
-    if (anErrDetail.broken_cert.get()) {
-        broken_cert.resetAndLock(anErrDetail.broken_cert.get());
-    }
-
-    detailEntry = anErrDetail.detailEntry;
-
-    lib_error_no = anErrDetail.lib_error_no;
-}
-
diff -u -r -N squid-5.0.5/src/ssl/ErrorDetail.h squid-5.0.6/src/ssl/ErrorDetail.h
--- squid-5.0.5/src/ssl/ErrorDetail.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/ErrorDetail.h	2021-05-10 21:02:34.000000000 +1200
@@ -9,10 +9,10 @@
 #ifndef _SQUID_SSL_ERROR_DETAIL_H
 #define _SQUID_SSL_ERROR_DETAIL_H
 
-#include "err_detail_type.h"
-#include "ErrorDetailManager.h"
-#include "HttpRequest.h"
-#include "security/forward.h"
+#include "security/ErrorDetail.h"
+
+// TODO: Remove Security::X wrappers and move the remaining configurable error
+// details (i.e. templates/error-details.txt) code to src/security/ErrorDetail.
 
 namespace Ssl
 {
@@ -24,11 +24,19 @@
 bool ParseErrorString(const char *name, Security::Errors &);
 
 /// The Security::ErrorCode code of the error described by  "name".
-Security::ErrorCode GetErrorCode(const char *name);
+inline Security::ErrorCode
+GetErrorCode(const char *name)
+{
+    return Security::ErrorCodeFromName(name);
+}
 
 /// \return string representation of a known TLS error (or a raw error code)
 /// \param prefixRawCode whether to prefix raw codes with "SSL_ERR="
-const char *GetErrorName(Security::ErrorCode value, const bool prefixRawCode = false);
+inline const char *
+GetErrorName(const Security::ErrorCode code, const bool prefixRawCode = false)
+{
+    return Security::ErrorNameFromCode(code, prefixRawCode);
+}
 
 /// A short description of the TLS error "value"
 const char *GetErrorDescr(Security::ErrorCode value);
@@ -36,63 +44,6 @@
 /// \return true if the TLS error is optional and may not be supported by current squid version
 bool ErrorIsOptional(const char *name);
 
-/**
- * Used to pass SSL error details to the error pages returned to the
- * end user.
- */
-class ErrorDetail
-{
-public:
-    // if broken certificate is nil, the peer certificate is broken
-    ErrorDetail(Security::ErrorCode err_no, X509 *peer, X509 *broken, const char *aReason = NULL);
-    ErrorDetail(ErrorDetail const &);
-    const String &toString() const;  ///< An error detail string to embed in squid error pages
-    void useRequest(HttpRequest *aRequest) { if (aRequest != NULL) request = aRequest;}
-    /// The error name to embed in squid error pages
-    const char *errorName() const {return err_code();}
-    /// The error no
-    Security::ErrorCode errorNo() const {return error_no;}
-    ///Sets the low-level error returned by OpenSSL ERR_get_error()
-    void setLibError(unsigned long lib_err_no) {lib_error_no = lib_err_no;}
-    /// the peer certificate
-    X509 *peerCert() { return peer_cert.get(); }
-    /// peer or intermediate certificate that failed validation
-    X509 *brokenCert() {return broken_cert.get(); }
-private:
-    typedef const char * (ErrorDetail::*fmt_action_t)() const;
-    /**
-     * Holds a formating code and its conversion method
-     */
-    class err_frm_code
-    {
-    public:
-        const char *code;             ///< The formating code
-        fmt_action_t fmt_action; ///< A pointer to the conversion method
-    };
-    static err_frm_code  ErrorFormatingCodes[]; ///< The supported formating codes
-
-    const char *subject() const;
-    const char *ca_name() const;
-    const char *cn() const;
-    const char *notbefore() const;
-    const char *notafter() const;
-    const char *err_code() const;
-    const char *err_descr() const;
-    const char *err_lib_error() const;
-
-    int convert(const char *code, const char **value) const;
-    void buildDetail() const;
-
-    mutable String errDetailStr; ///< Caches the error detail message
-    Security::ErrorCode error_no;   ///< The error code
-    unsigned long lib_error_no; ///< low-level error returned by OpenSSL ERR_get_error(3SSL)
-    Security::CertPointer peer_cert; ///< A pointer to the peer certificate
-    Security::CertPointer broken_cert; ///< A pointer to the broken certificate (peer or intermediate)
-    String errReason; ///< A custom reason for error, else retrieved from OpenSSL.
-    mutable ErrorDetailEntry detailEntry;
-    HttpRequest::Pointer request;
-};
-
 }//namespace Ssl
 #endif
 
diff -u -r -N squid-5.0.5/src/ssl/ErrorDetailManager.h squid-5.0.6/src/ssl/ErrorDetailManager.h
--- squid-5.0.5/src/ssl/ErrorDetailManager.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/ErrorDetailManager.h	2021-05-10 21:02:34.000000000 +1200
@@ -25,7 +25,7 @@
 class ErrorDetailEntry
 {
 public:
-    Security::ErrorCode error_no; ///< The SSL error code
+    Security::ErrorCode error_no = 0; ///< TLS error; \see Security::ErrorCode
     String name; ///< a name for the error
     String detail; ///< for error page %D macro expansion; may contain macros
     String descr;  ///< short error description (for use in debug messages or error pages)
diff -u -r -N squid-5.0.5/src/ssl/gadgets.h squid-5.0.6/src/ssl/gadgets.h
--- squid-5.0.5/src/ssl/gadgets.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/gadgets.h	2021-05-10 21:02:34.000000000 +1200
@@ -70,6 +70,7 @@
 
 typedef std::unique_ptr<X509_EXTENSION, HardFun<void, X509_EXTENSION*, &X509_EXTENSION_free>> X509_EXTENSION_Pointer;
 
+typedef std::unique_ptr<X509_STORE_CTX, HardFun<void, X509_STORE_CTX *, &X509_STORE_CTX_free>> X509_STORE_CTX_Pointer;
 /**
  \ingroup SslCrtdSslAPI
  * Create 1024 bits rsa key.
diff -u -r -N squid-5.0.5/src/ssl/Makefile.am squid-5.0.6/src/ssl/Makefile.am
--- squid-5.0.5/src/ssl/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -12,12 +12,6 @@
 
 ## SSL stuff used by main Squid but not by certgen helper
 libsslsquid_la_SOURCES = \
-	bio.cc \
-	bio.h \
-	cert_validate_message.cc \
-	cert_validate_message.h \
-	context_storage.cc \
-	context_storage.h \
 	Config.cc \
 	Config.h \
 	ErrorDetail.cc \
@@ -29,14 +23,20 @@
 	ProxyCerts.h \
 	ServerBump.cc \
 	ServerBump.h \
-	support.cc \
-	support.h \
+	bio.cc \
+	bio.h \
+	cert_validate_message.cc \
+	cert_validate_message.h \
+	context_storage.cc \
+	context_storage.h \
 	helper.cc \
-	helper.h
+	helper.h \
+	support.cc \
+	support.h
 
 ## SSL stuff used by main Squid and certgen helper
 libsslutil_la_SOURCES = \
-	gadgets.cc \
-	gadgets.h \
 	crtd_message.cc \
-	crtd_message.h
+	crtd_message.h \
+	gadgets.cc \
+	gadgets.h
diff -u -r -N squid-5.0.5/src/ssl/Makefile.in squid-5.0.6/src/ssl/Makefile.in
--- squid-5.0.5/src/ssl/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/src/ssl/Makefile.in	2021-05-10 22:57:56.000000000 +1200
@@ -164,17 +164,17 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libsslsquid_la_LIBADD =
-am_libsslsquid_la_OBJECTS = bio.lo cert_validate_message.lo \
-	context_storage.lo Config.lo ErrorDetail.lo \
+am_libsslsquid_la_OBJECTS = Config.lo ErrorDetail.lo \
 	ErrorDetailManager.lo PeekingPeerConnector.lo ServerBump.lo \
-	support.lo helper.lo
+	bio.lo cert_validate_message.lo context_storage.lo helper.lo \
+	support.lo
 libsslsquid_la_OBJECTS = $(am_libsslsquid_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
 libsslutil_la_LIBADD =
-am_libsslutil_la_OBJECTS = gadgets.lo crtd_message.lo
+am_libsslutil_la_OBJECTS = crtd_message.lo gadgets.lo
 libsslutil_la_OBJECTS = $(am_libsslutil_la_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -741,12 +741,6 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 noinst_LTLIBRARIES = libsslsquid.la libsslutil.la
 libsslsquid_la_SOURCES = \
-	bio.cc \
-	bio.h \
-	cert_validate_message.cc \
-	cert_validate_message.h \
-	context_storage.cc \
-	context_storage.h \
 	Config.cc \
 	Config.h \
 	ErrorDetail.cc \
@@ -758,16 +752,22 @@
 	ProxyCerts.h \
 	ServerBump.cc \
 	ServerBump.h \
-	support.cc \
-	support.h \
+	bio.cc \
+	bio.h \
+	cert_validate_message.cc \
+	cert_validate_message.h \
+	context_storage.cc \
+	context_storage.h \
 	helper.cc \
-	helper.h
+	helper.h \
+	support.cc \
+	support.h
 
 libsslutil_la_SOURCES = \
-	gadgets.cc \
-	gadgets.h \
 	crtd_message.cc \
-	crtd_message.h
+	crtd_message.h \
+	gadgets.cc \
+	gadgets.h
 
 all: all-am
 
diff -u -r -N squid-5.0.5/src/ssl/PeekingPeerConnector.cc squid-5.0.6/src/ssl/PeekingPeerConnector.cc
--- squid-5.0.5/src/ssl/PeekingPeerConnector.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/PeekingPeerConnector.cc	2021-05-10 21:02:34.000000000 +1200
@@ -15,6 +15,7 @@
 #include "fde.h"
 #include "http/Stream.h"
 #include "HttpRequest.h"
+#include "security/ErrorDetail.h"
 #include "security/NegotiationHistory.h"
 #include "SquidConfig.h"
 #include "ssl/bio.h"
@@ -222,8 +223,9 @@
     if (Ssl::ServerBump *serverBump = request->clientConnectionManager->serverBump()) {
         if (!serverBump->serverCert.get()) {
             // remember the server certificate from the ErrorDetail object
-            if (error && error->detail && error->detail->peerCert())
-                serverBump->serverCert.resetAndLock(error->detail->peerCert());
+            const auto errDetail = dynamic_cast<Security::ErrorDetail *>(error ? error->detail.getRaw() : nullptr);
+            if (errDetail && errDetail->peerCert())
+                serverBump->serverCert.resetAndLock(errDetail->peerCert());
             else {
                 handleServerCertificate();
             }
@@ -292,7 +294,7 @@
 }
 
 void
-Ssl::PeekingPeerConnector::noteNegotiationError(const int result, const int ssl_error, const int ssl_lib_error)
+Ssl::PeekingPeerConnector::noteNegotiationError(const Security::ErrorDetailPointer &errorDetail)
 {
     const int fd = serverConnection()->fd;
     Security::SessionPointer session(fd_table[fd].ssl);
@@ -336,18 +338,21 @@
     // thus hiding them.
     // Abort if no certificate found probably because of malformed or
     // unsupported server Hello message (TODO: make configurable).
+    // TODO: Add/use a positive "successfully validated server cert" signal
+    // instead of relying on the "![presumably_]validation_error && serverCert"
+    // signal combo.
     if (!SSL_get_ex_data(session.get(), ssl_ex_index_ssl_error_detail) &&
             (srvBio->bumpMode() == Ssl::bumpPeek  || srvBio->bumpMode() == Ssl::bumpStare) && srvBio->holdWrite()) {
         Security::CertPointer serverCert(SSL_get_peer_certificate(session.get()));
         if (serverCert) {
-            debugs(81, 3, "Error ("  << Security::ErrorString(ssl_lib_error) <<  ") but, hold write on SSL connection on FD " << fd);
+            debugs(81, 3, "hold TLS write on FD " << fd << " despite " << errorDetail);
             checkForPeekAndSplice();
             return;
         }
     }
 
     // else call parent noteNegotiationError to produce an error page
-    Security::PeerConnector::noteNegotiationError(result, ssl_error, ssl_lib_error);
+    Security::PeerConnector::noteNegotiationError(errorDetail);
 }
 
 void
diff -u -r -N squid-5.0.5/src/ssl/PeekingPeerConnector.h squid-5.0.6/src/ssl/PeekingPeerConnector.h
--- squid-5.0.5/src/ssl/PeekingPeerConnector.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/PeekingPeerConnector.h	2021-05-10 21:02:34.000000000 +1200
@@ -39,7 +39,7 @@
     virtual bool initialize(Security::SessionPointer &);
     virtual Security::ContextPointer getTlsContext();
     virtual void noteWantWrite();
-    virtual void noteNegotiationError(const int result, const int ssl_error, const int ssl_lib_error);
+    virtual void noteNegotiationError(const Security::ErrorDetailPointer &);
     virtual void noteNegotiationDone(ErrorState *error);
 
     /// Updates associated client connection manager members
diff -u -r -N squid-5.0.5/src/ssl/support.cc squid-5.0.6/src/ssl/support.cc
--- squid-5.0.5/src/ssl/support.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/support.cc	2021-05-10 21:02:34.000000000 +1200
@@ -24,6 +24,7 @@
 #include "globals.h"
 #include "ipc/MemMap.h"
 #include "security/CertError.h"
+#include "security/ErrorDetail.h"
 #include "security/Session.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
@@ -36,7 +37,7 @@
 #include <cerrno>
 
 // TODO: Move ssl_ex_index_* global variables from global.cc here.
-int ssl_ex_index_ssl_untrusted_chain = -1;
+static int ssl_ex_index_verify_callback_parameters = -1;
 
 static Ssl::CertsIndexedList SquidUntrustedCerts;
 
@@ -253,7 +254,8 @@
     return matchX509CommonNames(cert, (void *)server, check_domain);
 }
 
-/// \ingroup ServerProtocolSSLInternal
+/// adjusts OpenSSL validation results for each verified certificate in ctx
+/// OpenSSL "verify_callback function" (\ref OpenSSL_vcb_disambiguation)
 static int
 ssl_verify_cb(int ok, X509_STORE_CTX * ctx)
 {
@@ -311,6 +313,16 @@
         }
     }
 
+    if (!ok && error_no == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY) {
+        if (const auto params = Ssl::VerifyCallbackParameters::Find(*ssl)) {
+            if (params->callerHandlesMissingCertificates) {
+                debugs(83, 3, "hiding X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY");
+                params->hidMissingIssuer = true;
+                ok = 1;
+            }
+        }
+    }
+
     if (!ok) {
         Security::CertPointer broken_cert;
         broken_cert.resetAndLock(X509_STORE_CTX_get_current_cert(ctx));
@@ -379,11 +391,12 @@
                 broken_cert.resetAndLock(last_used_cert);
         }
 
-        auto *errDetail = new Ssl::ErrorDetail(error_no, peer_cert.get(), broken_cert.get());
-        if (!SSL_set_ex_data(ssl, ssl_ex_index_ssl_error_detail, errDetail)) {
-            debugs(83, 2, "Failed to set Ssl::ErrorDetail in ssl_verify_cb: Certificate " << buffer);
-            delete errDetail;
-        }
+        std::unique_ptr<Security::ErrorDetail::Pointer> edp(new Security::ErrorDetail::Pointer(
+                    new Security::ErrorDetail(error_no, peer_cert, broken_cert)));
+        if (SSL_set_ex_data(ssl, ssl_ex_index_ssl_error_detail, edp.get()))
+            edp.release();
+        else
+            debugs(83, 2, "failed to store a " << buffer << " error detail: " << *edp);
     }
 
     return ok;
@@ -405,7 +418,7 @@
         mode = SSL_VERIFY_NONE;
     }
     else if (flags & SSL_FLAG_CONDITIONAL_AUTH) {
-        debugs(83, DBG_PARSE_NOTE(3), "will request the client certificate but ignore its absense");
+        debugs(83, DBG_PARSE_NOTE(3), "will request the client certificate but ignore its absence");
         mode = SSL_VERIFY_PEER;
     }
     else {
@@ -423,6 +436,126 @@
     SSL_CTX_set_verify(ctx.get(),SSL_VERIFY_NONE,nullptr);
 }
 
+static int VerifyCtxCertificates(X509_STORE_CTX *ctx, STACK_OF(X509) *extraCerts);
+
+bool
+Ssl::VerifyConnCertificates(Security::Connection &sconn, const Ssl::X509_STACK_Pointer &extraCerts)
+{
+    const auto peerCertificatesChain = SSL_get_peer_cert_chain(&sconn);
+
+    // TODO: Replace debugs/return false with returning ErrorDetail::Pointer.
+    // Using Security::ErrorDetail terminology, errors in _this_ function are
+    // "non-validation errors", but VerifyCtxCertificates() errors may be
+    // "certificate validation errors". Callers detail SQUID_TLS_ERR_CONNECT.
+    // Some details should be created right here. Others extracted from OpenSSL.
+    // Why not throw? Most of the reasons detailed in the following commit apply
+    // here as well: https://github.com/measurement-factory/squid/commit/e862d33
+
+    if (!peerCertificatesChain || sk_X509_num(peerCertificatesChain) == 0) {
+        debugs(83, 2, "no server certificates");
+        return false;
+    }
+
+    const auto verificationStore = SSL_CTX_get_cert_store(SSL_get_SSL_CTX(&sconn));
+    if (!verificationStore) {
+        debugs(83, 2, "no certificate store");
+        return false;
+    }
+
+    const X509_STORE_CTX_Pointer storeCtx(X509_STORE_CTX_new());
+    if (!storeCtx) {
+        debugs(83, 2, "cannot create X509_STORE_CTX; likely OOM");
+        return false;
+    }
+
+    const auto peerCert = sk_X509_value(peerCertificatesChain, 0);
+    if (!X509_STORE_CTX_init(storeCtx.get(), verificationStore, peerCert, peerCertificatesChain)) {
+        debugs(83, 2, "cannot initialize X509_STORE_CTX");
+        return false;
+    }
+
+#if defined(SSL_CERT_FLAG_SUITEB_128_LOS)
+    // overwrite context Suite B (RFC 5759) flags with connection non-defaults
+    // SSL_set_cert_flags() return type is long, but its implementation actually
+    // returns an unsigned long flags value expected by X509_STORE_CTX_set_flags
+    const unsigned long certFlags = SSL_set_cert_flags(&sconn, 0);
+    if (const auto suiteBflags = certFlags & SSL_CERT_FLAG_SUITEB_128_LOS)
+        X509_STORE_CTX_set_flags(storeCtx.get(), suiteBflags);
+#endif
+
+    if (!X509_STORE_CTX_set_ex_data(storeCtx.get(), SSL_get_ex_data_X509_STORE_CTX_idx(), &sconn)) {
+        debugs(83, 2, "cannot attach SSL object to X509_STORE_CTX");
+        return false;
+    }
+
+    // If we ever add DANE support to Squid, we will supply DANE details here:
+    // X509_STORE_CTX_set0_dane(storeCtx.get(), SSL_get0_dane(&sconn));
+
+    // tell OpenSSL we are verifying a server certificate
+    if (!X509_STORE_CTX_set_default(storeCtx.get(), "ssl_server")) {
+        debugs(83, 2, "cannot set default verification method to ssl_server");
+        return false;
+    }
+
+    // overwrite context "verification parameters" with connection non-defaults
+    const auto param = X509_STORE_CTX_get0_param(storeCtx.get());
+    if (!param) {
+        debugs(83, 2, "no context verification parameters");
+        return false;
+    }
+#if defined(HAVE_X509_VERIFY_PARAM_SET_AUTH_LEVEL)
+    X509_VERIFY_PARAM_set_auth_level(param, SSL_get_security_level(&sconn));
+#endif
+    if (!X509_VERIFY_PARAM_set1(param, SSL_get0_param(&sconn))) {
+        debugs(83, 2, "cannot overwrite context verification parameters");
+        return false;
+    }
+
+    // copy any connection "verify_callback function" to the validation context
+    // (\ref OpenSSL_vcb_disambiguation)
+    if (const auto cb = SSL_get_verify_callback(&sconn))
+        X509_STORE_CTX_set_verify_cb(storeCtx.get(), cb);
+
+    // verify the server certificate chain in the prepared validation context
+    if (VerifyCtxCertificates(storeCtx.get(), extraCerts.get()) <= 0) {
+        // see also: ssl_verify_cb() details errors via ssl_ex_index_ssl_errors
+        const auto verifyResult = X509_STORE_CTX_get_error(storeCtx.get());
+        debugs(83, 3, "verification failure: " << verifyResult << ' ' << X509_verify_cert_error_string(verifyResult));
+        return false;
+    }
+
+    debugs(83, 7, "success");
+    return true;
+}
+
+/* Ssl::VerifyCallbackParameters */
+
+Ssl::VerifyCallbackParameters *
+Ssl::VerifyCallbackParameters::Find(Security::Connection &sconn)
+{
+    return static_cast<VerifyCallbackParameters*>(SSL_get_ex_data(&sconn, ssl_ex_index_verify_callback_parameters));
+}
+
+Ssl::VerifyCallbackParameters *
+Ssl::VerifyCallbackParameters::New(Security::Connection &sconn)
+{
+    Must(!Find(sconn));
+    const auto parameters = new VerifyCallbackParameters();
+    if (!SSL_set_ex_data(&sconn, ssl_ex_index_verify_callback_parameters, parameters)) {
+        delete parameters;
+        throw TextException("SSL_set_ex_data() failed; likely OOM", Here());
+    }
+    return parameters;
+}
+
+Ssl::VerifyCallbackParameters &
+Ssl::VerifyCallbackParameters::At(Security::Connection &sconn)
+{
+    const auto parameters = Find(sconn);
+    Must(parameters);
+    return *parameters;
+}
+
 // "dup" function for SSL_get_ex_new_index("cert_err_check")
 #if SQUID_USE_CONST_CRYPTO_EX_DATA_DUP
 static int
@@ -453,7 +586,7 @@
 ssl_free_ErrorDetail(void *, void *ptr, CRYPTO_EX_DATA *,
                      int, long, void *)
 {
-    Ssl::ErrorDetail  *errDetail = static_cast <Ssl::ErrorDetail *>(ptr);
+    const auto errDetail = static_cast<Security::ErrorDetail::Pointer*>(ptr);
     delete errDetail;
 }
 
@@ -503,6 +636,14 @@
     delete buf;
 }
 
+/// "free" function for the ssl_ex_index_verify_callback_parameters entry
+static void
+ssl_free_VerifyCallbackParameters(void *, void *ptr, CRYPTO_EX_DATA *,
+                                  int, long, void *)
+{
+    delete static_cast<Ssl::VerifyCallbackParameters*>(ptr);
+}
+
 void
 Ssl::Initialize(void)
 {
@@ -521,7 +662,7 @@
             fatalf("Unable to find SSL engine '%s'\n", ::Config.SSL.ssl_engine);
 
         if (!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
-            const int ssl_error = ERR_get_error();
+            const auto ssl_error = ERR_get_error();
             fatalf("Failed to initialise SSL engine: %s\n", Security::ErrorString(ssl_error));
         }
     }
@@ -543,7 +684,7 @@
     ssl_ex_index_ssl_errors =  SSL_get_ex_new_index(0, (void *) "ssl_errors", NULL, NULL, &ssl_free_SslErrors);
     ssl_ex_index_ssl_cert_chain = SSL_get_ex_new_index(0, (void *) "ssl_cert_chain", NULL, NULL, &ssl_free_CertChain);
     ssl_ex_index_ssl_validation_counter = SSL_get_ex_new_index(0, (void *) "ssl_validation_counter", NULL, NULL, &ssl_free_int);
-    ssl_ex_index_ssl_untrusted_chain = SSL_get_ex_new_index(0, (void *) "ssl_untrusted_chain", NULL, NULL, &ssl_free_CertChain);
+    ssl_ex_index_verify_callback_parameters = SSL_get_ex_new_index(0, (void *) "verify_callback_parameters", nullptr, nullptr, &ssl_free_VerifyCallbackParameters);
 }
 
 bool
@@ -566,7 +707,7 @@
 
         const char *cipher = peer.sslCipher.c_str();
         if (!SSL_CTX_set_cipher_list(ctx.get(), cipher)) {
-            const int ssl_error = ERR_get_error();
+            const auto ssl_error = ERR_get_error();
             fatalf("Failed to set SSL cipher suite '%s': %s\n",
                    cipher, Security::ErrorString(ssl_error));
         }
@@ -580,7 +721,7 @@
 
             const char *certfile = keys.certFile.c_str();
             if (!SSL_CTX_use_certificate_chain_file(ctx.get(), certfile)) {
-                const int ssl_error = ERR_get_error();
+                const auto ssl_error = ERR_get_error();
                 fatalf("Failed to acquire SSL certificate '%s': %s\n",
                        certfile, Security::ErrorString(ssl_error));
             }
@@ -590,7 +731,7 @@
             ssl_ask_password(ctx.get(), keyfile);
 
             if (!SSL_CTX_use_PrivateKey_file(ctx.get(), keyfile, SSL_FILETYPE_PEM)) {
-                const int ssl_error = ERR_get_error();
+                const auto ssl_error = ERR_get_error();
                 fatalf("Failed to acquire SSL private key '%s': %s\n",
                        keyfile, Security::ErrorString(ssl_error));
             }
@@ -598,7 +739,7 @@
             debugs(83, 5, "Comparing private and public SSL keys.");
 
             if (!SSL_CTX_check_private_key(ctx.get())) {
-                const int ssl_error = ERR_get_error();
+                const auto ssl_error = ERR_get_error();
                 fatalf("SSL private key '%s' does not match public key '%s': %s\n",
                        certfile, keyfile, Security::ErrorString(ssl_error));
             }
@@ -825,7 +966,7 @@
         // increase the certificate lock
         X509_up_ref(signingCert);
     } else {
-        const int ssl_error = ERR_get_error();
+        const auto ssl_error = ERR_get_error();
         debugs(33, DBG_IMPORTANT, "WARNING: can not add signing certificate to SSL context chain: " << Security::ErrorString(ssl_error));
     }
 
@@ -926,7 +1067,7 @@
     // if the TLS servername extension (SNI) is enabled in openssl library.
 #if defined(SSL_CTRL_SET_TLSEXT_HOSTNAME)
     if (!SSL_set_tlsext_host_name(ssl, fqdn)) {
-        const int ssl_error = ERR_get_error();
+        const auto ssl_error = ERR_get_error();
         debugs(83, 3,  "WARNING: unable to set TLS servername extension (SNI): " <<
                Security::ErrorString(ssl_error) << "\n");
     }
@@ -935,8 +1076,8 @@
 #endif
 }
 
-static const char *
-hasAuthorityInfoAccessCaIssuers(X509 *cert)
+const char *
+Ssl::findIssuerUri(X509 *cert)
 {
     AUTHORITY_INFO_ACCESS *info;
     if (!cert)
@@ -1008,170 +1149,196 @@
 }
 
 /// slowly find the issuer certificate of a given cert using linear search
-static bool
-findCertIssuer(Security::CertList const &list, X509 *cert)
+static X509 *
+sk_x509_findIssuer(const STACK_OF(X509) *sk, X509 *cert)
 {
-    for (Security::CertList::const_iterator it = list.begin(); it != list.end(); ++it) {
-        if (X509_check_issued(it->get(), cert) == X509_V_OK)
-            return true;
+    if (!sk)
+        return nullptr;
+
+    const auto certCount = sk_X509_num(sk);
+    for (int i = 0; i < certCount; ++i) {
+        const auto issuer = sk_X509_value(sk, i);
+        if (X509_check_issued(issuer, cert) == X509_V_OK)
+            return issuer;
     }
-    return false;
+    return nullptr;
 }
 
-/// \return true if the cert issuer exist in the certificates stored in connContext
-static bool
-issuerExistInCaDb(X509 *cert, const Security::ContextPointer &connContext)
+/// finds issuer of a given certificate in CA store of the given connContext
+/// \returns the cert issuer (after increasing its reference count) or nil
+static X509 *
+findIssuerInCaDb(X509 *cert, const Security::ContextPointer &connContext)
 {
     if (!connContext)
-        return false;
+        return nullptr;
 
     X509_STORE_CTX *storeCtx = X509_STORE_CTX_new();
     if (!storeCtx) {
         debugs(83, DBG_IMPORTANT, "Failed to allocate STORE_CTX object");
-        return false;
+        return nullptr;
     }
 
-    bool gotIssuer = false;
+    X509 *issuer = nullptr;
     X509_STORE *store = SSL_CTX_get_cert_store(connContext.get());
     if (X509_STORE_CTX_init(storeCtx, store, nullptr, nullptr)) {
-        X509 *issuer = nullptr;
-        gotIssuer = (X509_STORE_CTX_get1_issuer(&issuer, storeCtx, cert) > 0);
-        if (issuer)
-            X509_free(issuer);
+        const auto ret = X509_STORE_CTX_get1_issuer(&issuer, storeCtx, cert);
+        if (ret > 0) {
+            assert(issuer);
+            char buffer[256];
+            debugs(83, 5, "found " << X509_NAME_oneline(X509_get_subject_name(issuer), buffer, sizeof(buffer)));
+        } else {
+            debugs(83, ret < 0 ? 2 : 3, "not found or failure: " << ret);
+            assert(!issuer);
+        }
     } else {
-        const int ssl_error = ERR_get_error();
+        const auto ssl_error = ERR_get_error();
         debugs(83, DBG_IMPORTANT, "Failed to initialize STORE_CTX object: " << Security::ErrorString(ssl_error));
     }
+
     X509_STORE_CTX_free(storeCtx);
 
-    return gotIssuer;
+    return issuer;
 }
 
-const char *
-Ssl::uriOfIssuerIfMissing(X509 *cert, Security::CertList const &serverCertificates, const Security::ContextPointer &context)
+Security::CertPointer
+Ssl::findIssuerCertificate(X509 *cert, const STACK_OF(X509) *serverCertificates, const Security::ContextPointer &context)
 {
-    if (!cert || !serverCertificates.size())
-        return nullptr;
+    Must(cert);
 
-    if (!findCertIssuer(serverCertificates, cert)) {
-        //if issuer is missing
-        if (const char *issuerUri = hasAuthorityInfoAccessCaIssuers(cert)) {
-            // There is a URI where we can download a certificate.
-            if (!findCertIssuerFast(SquidUntrustedCerts, cert) &&
-                    !issuerExistInCaDb(cert, context)) {
-                // and issuer not found in local databases containing
-                // untrusted certificates and trusted CA certificates
-                return issuerUri;
-            }
-        }
+    // check certificate chain, if any
+    if (const auto issuer = serverCertificates ? sk_x509_findIssuer(serverCertificates, cert) : nullptr) {
+        X509_up_ref(issuer);
+        return Security::CertPointer(issuer);
     }
-    return nullptr;
-}
-
-void
-Ssl::missingChainCertificatesUrls(std::queue<SBuf> &URIs, Security::CertList const &serverCertificates, const Security::ContextPointer &context)
-{
-    if (!serverCertificates.size())
-        return;
 
-    for (const auto &i : serverCertificates) {
-        if (const char *issuerUri = uriOfIssuerIfMissing(i.get(), serverCertificates, context))
-            URIs.push(SBuf(issuerUri));
+    // check untrusted certificates
+    if (const auto issuer = findCertIssuerFast(SquidUntrustedCerts, cert)) {
+        X509_up_ref(issuer);
+        return Security::CertPointer(issuer);
     }
-}
 
-void
-Ssl::SSL_add_untrusted_cert(SSL *ssl, X509 *cert)
-{
-    STACK_OF(X509) *untrustedStack = static_cast <STACK_OF(X509) *>(SSL_get_ex_data(ssl, ssl_ex_index_ssl_untrusted_chain));
-    if (!untrustedStack) {
-        untrustedStack = sk_X509_new_null();
-        if (!SSL_set_ex_data(ssl, ssl_ex_index_ssl_untrusted_chain, untrustedStack)) {
-            sk_X509_pop_free(untrustedStack, X509_free);
-            throw TextException("Failed to attach untrusted certificates chain", Here());
-        }
+    // check trusted CA certificates
+    if (const auto issuer = findIssuerInCaDb(cert, context)) {
+        // no X509_up_ref(issuer) because findIssuerInCaDb() ups reference count
+        return Security::CertPointer(issuer);
     }
-    sk_X509_push(untrustedStack, cert);
+
+    return Security::CertPointer(nullptr);
 }
 
-/// Search for the issuer certificate of cert in sk list.
-static X509 *
-sk_x509_findIssuer(STACK_OF(X509) *sk, X509 *cert)
+bool
+Ssl::missingChainCertificatesUrls(std::queue<SBuf> &URIs, const STACK_OF(X509) &serverCertificates, const Security::ContextPointer &context)
 {
-    if (!sk)
-        return NULL;
+    for (int i = 0; i < sk_X509_num(&serverCertificates); ++i) {
+        const auto cert = sk_X509_value(&serverCertificates, i);
 
-    const int skItemsNum = sk_X509_num(sk);
-    for (int i = 0; i < skItemsNum; ++i) {
-        X509 *issuer = sk_X509_value(sk, i);
-        if (X509_check_issued(issuer, cert) == X509_V_OK)
-            return issuer;
+        if (findIssuerCertificate(cert, &serverCertificates, context))
+            continue;
+
+        if (const auto issuerUri = findIssuerUri(cert)) {
+            URIs.push(SBuf(issuerUri));
+        } else {
+            static char name[2048];
+            debugs(83, 3, "Issuer certificate for " <<
+                   X509_NAME_oneline(X509_get_subject_name(cert), name, sizeof(name)) <<
+                   " is missing and its URI is not provided");
+        }
     }
-    return NULL;
+
+    debugs(83, (URIs.empty() ? 3 : 5), "found: " << URIs.size());
+    return !URIs.empty();
 }
 
 /// add missing issuer certificates to untrustedCerts
 static void
-completeIssuers(X509_STORE_CTX *ctx, STACK_OF(X509) *untrustedCerts)
+completeIssuers(X509_STORE_CTX *ctx, STACK_OF(X509) &untrustedCerts)
 {
-    debugs(83, 2,  "completing " << sk_X509_num(untrustedCerts) << " OpenSSL untrusted certs using " << SquidUntrustedCerts.size() << " configured untrusted certificates");
+    debugs(83, 2,  "completing " << sk_X509_num(&untrustedCerts) <<
+           " OpenSSL untrusted certs using " << SquidUntrustedCerts.size() <<
+           " configured untrusted certificates");
 
     const X509_VERIFY_PARAM *param = X509_STORE_CTX_get0_param(ctx);
     int depth = X509_VERIFY_PARAM_get_depth(param);
-    X509 *current = X509_STORE_CTX_get0_cert(ctx);
+    Security::CertPointer current;
+    current.resetAndLock(X509_STORE_CTX_get0_cert(ctx));
     int i = 0;
     for (i = 0; current && (i < depth); ++i) {
-        if (X509_check_issued(current, current) == X509_V_OK) {
+        if (X509_check_issued(current.get(), current.get()) == X509_V_OK) {
             // either ctx->cert is itself self-signed or untrustedCerts
             // aready contain the self-signed current certificate
             break;
         }
 
         // untrustedCerts is short, not worth indexing
-        X509 *issuer = sk_x509_findIssuer(untrustedCerts, current);
-        if (!issuer) {
-            if ((issuer = findCertIssuerFast(SquidUntrustedCerts, current)))
-                sk_X509_push(untrustedCerts, issuer);
-        }
+        const Security::ContextPointer nullCtx;
+        auto issuer = Ssl::findIssuerCertificate(current.get(), &untrustedCerts, nullCtx);
         current = issuer;
+        if (issuer)
+            sk_X509_push(&untrustedCerts, issuer.release());
     }
 
     if (i >= depth)
         debugs(83, 2,  "exceeded the maximum certificate chain length: " << depth);
 }
 
-/// OpenSSL certificate validation callback.
+/// Validates certificates while consulting sslproxy_foreign_intermediate_certs
+/// and, optionally, the given extra certificates.
+/// \returns whatever OpenSSL X509_verify_cert() returns
 static int
-untrustedToStoreCtx_cb(X509_STORE_CTX *ctx,void *data)
+VerifyCtxCertificates(X509_STORE_CTX *ctx, STACK_OF(X509) *extraCerts)
 {
-    debugs(83, 4,  "Try to use pre-downloaded intermediate certificates");
-
-    SSL *ssl = static_cast<SSL *>(X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()));
-    STACK_OF(X509) *sslUntrustedStack = static_cast <STACK_OF(X509) *>(SSL_get_ex_data(ssl, ssl_ex_index_ssl_untrusted_chain));
-
     // OpenSSL already maintains ctx->untrusted but we cannot modify
     // internal OpenSSL list directly. We have to give OpenSSL our own
     // list, but it must include certificates on the OpenSSL ctx->untrusted
     STACK_OF(X509) *oldUntrusted = X509_STORE_CTX_get0_untrusted(ctx);
-    STACK_OF(X509) *sk = sk_X509_dup(oldUntrusted); // oldUntrusted is always not NULL
+    // X509_chain_up_ref() increments cert references _and_ dupes the stack
+    Ssl::X509_STACK_Pointer untrustedCerts(oldUntrusted ? X509_chain_up_ref(oldUntrusted) : sk_X509_new_null());
 
-    for (int i = 0; i < sk_X509_num(sslUntrustedStack); ++i) {
-        X509 *cert = sk_X509_value(sslUntrustedStack, i);
-        sk_X509_push(sk, cert);
+    if (extraCerts) {
+        for (int i = 0; i < sk_X509_num(extraCerts); ++i) {
+            const auto cert = sk_X509_value(extraCerts, i);
+            X509_up_ref(cert);
+            sk_X509_push(untrustedCerts.get(), cert);
+        }
     }
 
     // If the local untrusted certificates internal database is used
     // run completeIssuers to add missing certificates if possible.
     if (SquidUntrustedCerts.size() > 0)
-        completeIssuers(ctx, sk);
+        completeIssuers(ctx, *untrustedCerts);
 
-    X509_STORE_CTX_set0_untrusted(ctx, sk); // No locking/unlocking, just sets ctx->untrusted
+    X509_STORE_CTX_set0_untrusted(ctx, untrustedCerts.get()); // No locking/unlocking, just sets ctx->untrusted
     int ret = X509_verify_cert(ctx);
     X509_STORE_CTX_set0_untrusted(ctx, oldUntrusted); // Set back the old untrusted list
-    sk_X509_free(sk); // Release sk list
     return ret;
 }
 
+/// \interface OpenSSL_vcb_disambiguation
+///
+/// OpenSSL has two very different concepts with nearly identical names:
+///
+/// a) A (replaceable) certificate verification function -- X509_verify_cert():
+///    This function drives the entire certificate verification algorithm.
+///    It can be called directly, but is usually called during SSL_connect().
+///    OpenSSL calls this function a "verification callback function".
+///    SSL_CTX_set_cert_verify_callback(3) replaces X509_verify_cert() default.
+///
+/// b) An (optional) certificate verification adjustment callback:
+///    This function, if set, is called at the end of (a) to adjust (a) results.
+///    It is never called directly, only from (a).
+///    OpenSSL calls this function a "verify_callback function".
+///    The SSL_CTX_set_verify(3) family of functions sets this function.
+
+/// Validates certificates while consulting sslproxy_foreign_intermediate_certs
+/// but without using any dynamically downloaded intermediate certificates.
+/// OpenSSL "verification callback function" (\ref OpenSSL_vcb_disambiguation)
+static int
+untrustedToStoreCtx_cb(X509_STORE_CTX *ctx, void *)
+{
+    debugs(83, 4, "Try to use pre-downloaded intermediate certificates");
+    return VerifyCtxCertificates(ctx, nullptr);
+}
+
 void
 Ssl::useSquidUntrusted(SSL_CTX *sslContext)
 {
diff -u -r -N squid-5.0.5/src/ssl/support.h squid-5.0.6/src/ssl/support.h
--- squid-5.0.5/src/ssl/support.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/ssl/support.h	2021-05-10 21:02:34.000000000 +1200
@@ -37,15 +37,6 @@
  \ingroup ServerProtocol
  */
 
-// Custom SSL errors; assumes all official errors are positive
-#define SQUID_X509_V_ERR_INFINITE_VALIDATION -4
-#define SQUID_X509_V_ERR_CERT_CHANGE -3
-#define SQUID_ERR_SSL_HANDSHAKE -2
-#define SQUID_X509_V_ERR_DOMAIN_MISMATCH -1
-// All SSL errors range: from smallest (negative) custom to largest SSL error
-#define SQUID_SSL_ERROR_MIN SQUID_X509_V_ERR_CERT_CHANGE
-#define SQUID_SSL_ERROR_MAX INT_MAX
-
 // Maximum certificate validation callbacks. OpenSSL versions exceeding this
 // limit are deemed stuck in an infinite validation loop (OpenSSL bug #3090)
 // and will trigger the SQUID_X509_V_ERR_INFINITE_VALIDATION error.
@@ -75,7 +66,6 @@
 /// call before generating any SSL context
 void Initialize();
 
-class ErrorDetail;
 class CertValidationResponse;
 typedef RefCount<CertValidationResponse> CertValidationResponsePointer;
 
@@ -178,17 +168,20 @@
  */
 void SSL_add_untrusted_cert(SSL *ssl, X509 *cert);
 
-/**
- * Searches in serverCertificates list for the cert issuer and if not found
- * and Authority Info Access of cert provides a URI return it.
- */
-const char *uriOfIssuerIfMissing(X509 *cert,  Security::CertList const &serverCertificates, const Security::ContextPointer &context);
+/// finds certificate issuer URI in the Authority Info Access extension
+const char *findIssuerUri(X509 *cert);
+
+/// Searches serverCertificates and local databases for the cert issuer.
+/// \param context where to retrieve the configured CA's db; may be nil
+/// \returns the found issuer certificate or nil
+Security::CertPointer findIssuerCertificate(X509 *cert, const STACK_OF(X509) *serverCertificates, const Security::ContextPointer &context);
 
 /**
  * Fill URIs queue with the uris of missing certificates from serverCertificate chain
  * if this information provided by Authority Info Access.
+ \return whether at least one URI is known, including previously known ones
  */
-void missingChainCertificatesUrls(std::queue<SBuf> &URIs, Security::CertList const &serverCertificates, const Security::ContextPointer &context);
+bool missingChainCertificatesUrls(std::queue<SBuf> &URIs, const STACK_OF(X509) &serverCertificates, const Security::ContextPointer &context);
 
 /**
   \ingroup ServerProtocolSSLAPI
@@ -329,6 +322,48 @@
   TODO: Add support for reading from `buf`.
  */
 BIO *BIO_new_SBuf(SBuf *buf);
+
+/// Validates the given TLS connection server certificate chain in conjunction
+/// with a (possibly empty) set of "extra" intermediate certs. Also consults
+/// sslproxy_foreign_intermediate_certs. This is a C++/Squid-friendly wrapper of
+/// OpenSSL "verification callback function" (\ref OpenSSL_vcb_disambiguation).
+/// OpenSSL has a similar wrapper, ssl_verify_cert_chain(), but that wrapper is
+/// not a part of the public OpenSSL API.
+bool VerifyConnCertificates(Security::Connection &, const Ssl::X509_STACK_Pointer &extraCerts);
+
+// TODO: Move other ssl_ex_index_* validation-related information here.
+/// OpenSSL "verify_callback function" input/output parameters. This information
+/// cannot be passed through the verification API directly, so it is aggregated
+/// in this class and exchanged via ssl_ex_index_verify_callback_parameters. For
+/// OpenSSL validation callback details, see \ref OpenSSL_vcb_disambiguation.
+class VerifyCallbackParameters {
+public:
+    /// creates a VerifyCallbackParameters object and adds it to the given TLS connection
+    /// \returns the successfully created and added object
+    static VerifyCallbackParameters *New(Security::Connection &);
+
+    /// \returns the VerifyCallbackParameters object previously attached via New()
+    static VerifyCallbackParameters &At(Security::Connection &);
+
+    /// \returns the VerifyCallbackParameters object previously attached via New() or nil
+    static VerifyCallbackParameters *Find(Security::Connection &);
+
+    /* input parameters */
+
+    /// whether X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY should be cleared
+    /// (after setting hidMissingIssuer) because the validation initiator wants
+    /// to get the missing certificates and redo the validation with them
+    bool callerHandlesMissingCertificates = false;
+
+    /* output parameters */
+
+    /// whether certificate validation has failed due to missing certificate(s)
+    /// (i.e. X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY), but the failure was
+    /// cleared/hidden due to true callerHandlesMissingCertificates setting; the
+    /// certificate chain has to be deemed untrusted until revalidation (if any)
+    bool hidMissingIssuer = false;
+};
+
 } //namespace Ssl
 
 #if _SQUID_WINDOWS_
diff -u -r -N squid-5.0.5/src/store/id_rewriters/file/storeid_file_rewrite.8 squid-5.0.6/src/store/id_rewriters/file/storeid_file_rewrite.8
--- squid-5.0.5/src/store/id_rewriters/file/storeid_file_rewrite.8	2021-02-08 13:46:38.000000000 +1300
+++ squid-5.0.6/src/store/id_rewriters/file/storeid_file_rewrite.8	2021-05-10 23:02:23.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "STOREID_FILE_REWRITE 8"
-.TH STOREID_FILE_REWRITE 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH STOREID_FILE_REWRITE 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/src/store/Makefile.am squid-5.0.6/src/store/Makefile.am
--- squid-5.0.5/src/store/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/store/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -12,7 +12,7 @@
 
 noinst_LTLIBRARIES = libstore.la
 
-libstore_la_SOURCES= \
+libstore_la_SOURCES = \
 	Controlled.h \
 	Controller.cc \
 	Controller.h \
@@ -20,7 +20,7 @@
 	Disk.h \
 	Disks.cc \
 	Disks.h \
-	forward.h \
 	LocalSearch.cc \
 	LocalSearch.h \
-	Storage.h
+	Storage.h \
+	forward.h
diff -u -r -N squid-5.0.5/src/store/Makefile.in squid-5.0.6/src/store/Makefile.in
--- squid-5.0.5/src/store/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/src/store/Makefile.in	2021-05-10 22:57:56.000000000 +1200
@@ -778,10 +778,10 @@
 	Disk.h \
 	Disks.cc \
 	Disks.h \
-	forward.h \
 	LocalSearch.cc \
 	LocalSearch.h \
-	Storage.h
+	Storage.h \
+	forward.h
 
 all: all-recursive
 
diff -u -r -N squid-5.0.5/src/tests/Stub.am squid-5.0.6/src/tests/Stub.am
--- squid-5.0.5/src/tests/Stub.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/Stub.am	2021-05-10 21:02:34.000000000 +1200
@@ -49,6 +49,7 @@
     tests/stub_libauth.cc \
     tests/stub_libcomm.cc \
     tests/stub_libdiskio.cc \
+    tests/stub_liberror.cc \
     tests/stub_libeui.cc \
     tests/stub_libformat.cc \
     tests/stub_libhttp.cc \
diff -u -r -N squid-5.0.5/src/tests/stub_errorpage.cc squid-5.0.6/src/tests/stub_errorpage.cc
--- squid-5.0.5/src/tests/stub_errorpage.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/stub_errorpage.cc	2021-05-10 21:02:34.000000000 +1200
@@ -19,3 +19,5 @@
 TemplateFile::TemplateFile(char const*, err_type) STUB
 bool TemplateFile::loadFor(const HttpRequest *) STUB_RETVAL(false)
 
+std::ostream &operator <<(std::ostream &os, const ErrorState *) STUB_RETVAL(os)
+
diff -u -r -N squid-5.0.5/src/tests/stub_HttpRequest.cc squid-5.0.6/src/tests/stub_HttpRequest.cc
--- squid-5.0.5/src/tests/stub_HttpRequest.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/stub_HttpRequest.cc	2021-05-10 21:02:34.000000000 +1200
@@ -34,7 +34,6 @@
 Adaptation::Icap::History::Pointer HttpRequest::icapHistory() const STUB_RETVAL(Adaptation::Icap::History::Pointer())
 #endif
 void HttpRequest::recordLookup(const Dns::LookupDetails &) STUB
-void HttpRequest::detailError(err_type, int) STUB
 void HttpRequest::clearError() STUB
 void HttpRequest::clean() STUB
 void HttpRequest::init() STUB
diff -u -r -N squid-5.0.5/src/tests/stub_liberror.cc squid-5.0.6/src/tests/stub_liberror.cc
--- squid-5.0.5/src/tests/stub_liberror.cc	1970-01-01 12:00:00.000000000 +1200
+++ squid-5.0.6/src/tests/stub_liberror.cc	2021-05-10 21:02:34.000000000 +1200
@@ -0,0 +1,15 @@
+#include "squid.h"
+#include "error/Error.h"
+#include "sbuf/SBuf.h"
+
+#define STUB_API "error/liberror.la"
+#include "tests/STUB.h"
+
+const char * err_type_str[ERR_MAX] = {};
+
+void Error::update(const Error &) STUB_NOP
+
+std::ostream &operator <<(std::ostream &os, const Error &) STUB_RETVAL(os)
+
+ErrorDetail::Pointer MakeNamedErrorDetail(const char *name) STUB_RETVAL(ErrorDetail::Pointer())
+
diff -u -r -N squid-5.0.5/src/tests/stub_libhttp.cc squid-5.0.6/src/tests/stub_libhttp.cc
--- squid-5.0.5/src/tests/stub_libhttp.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/stub_libhttp.cc	2021-05-10 21:02:34.000000000 +1200
@@ -118,7 +118,7 @@
 clientStreamNode *Stream::getTail() const STUB_RETVAL(nullptr)
 clientStreamNode *Stream::getClientReplyContext() const STUB_RETVAL(nullptr)
 ConnStateData *Stream::getConn() const STUB_RETVAL(nullptr)
-void Stream::noteIoError(const int) STUB
+void Stream::noteIoError(const Error &, const LogTagsErrors &) STUB
 void Stream::finished() STUB
 void Stream::initiateClose(const char *) STUB
 void Stream::deferRecipientForLater(clientStreamNode *, HttpReply *, StoreIOBuffer) STUB
diff -u -r -N squid-5.0.5/src/tests/stub_libmgr.cc squid-5.0.6/src/tests/stub_libmgr.cc
--- squid-5.0.5/src/tests/stub_libmgr.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/stub_libmgr.cc	2021-05-10 21:02:34.000000000 +1200
@@ -12,6 +12,8 @@
 #define STUB_API "lmgr/libmgr.la"
 #include "tests/STUB.h"
 
+#include "ipc/RequestId.h"
+
 // NP: used by Command.h instantiations
 #include "mgr/ActionProfile.h"
 
@@ -26,7 +28,7 @@
 void Mgr::Action::fillEntry(StoreEntry *entry, bool writeHttpHeader) STUB
 void Mgr::Action::add(const Action &action) STUB
 void Mgr::Action::respond(const Request &request) STUB
-void Mgr::Action::sendResponse(unsigned int requestId) STUB
+void Mgr::Action::sendResponse(const Ipc::RequestId) STUB
 bool Mgr::Action::atomic() const STUB_RETVAL(false)
 const char * Mgr::Action::name() const STUB_RETVAL(NULL)
 static Mgr::Command static_Command;
@@ -174,11 +176,10 @@
 Mgr::QueryParam::Pointer Mgr::QueryParams::get(const String& name) const STUB_RETVAL(Mgr::QueryParam::Pointer(NULL))
 void Mgr::QueryParams::pack(Ipc::TypedMsgHdr& msg) const STUB
 void Mgr::QueryParams::unpack(const Ipc::TypedMsgHdr& msg) STUB
-bool Mgr::QueryParams::Parse(const String& aParamsStr, QueryParams& aParams) STUB_RETVAL(false)
+void Mgr::QueryParams::Parse(Parser::Tokenizer &, QueryParams &) STUB
 //private:
 //Params::const_iterator Mgr::QueryParams::find(const String& name) const STUB_RETVAL(new Mgr::Params::const_iterator(*this))
 Mgr::QueryParam::Pointer Mgr::QueryParams::CreateParam(QueryParam::Type aType) STUB_RETVAL(Mgr::QueryParam::Pointer(NULL))
-bool Mgr::QueryParams::ParseParam(const String& paramStr, Param& param) STUB_RETVAL(false)
 
 #include "mgr/Registration.h"
 //void Mgr::RegisterAction(char const * action, char const * desc, OBJH * handler, int pw_req_flag, int atomic);
diff -u -r -N squid-5.0.5/src/tests/stub_libsecurity.cc squid-5.0.6/src/tests/stub_libsecurity.cc
--- squid-5.0.5/src/tests/stub_libsecurity.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/stub_libsecurity.cc	2021-05-10 21:02:34.000000000 +1200
@@ -31,12 +31,30 @@
 Security::HandshakeParser::HandshakeParser(MessageSource) STUB
 bool Security::HandshakeParser::parseHello(const SBuf &) STUB_RETVAL(false)
 
+#include "security/Io.h"
+Security::IoResult Security::Accept(Comm::Connection &) STUB_RETVAL(IoResult(IoResult::ioError))
+Security::IoResult Security::Connect(Comm::Connection &) STUB_RETVAL(IoResult(IoResult::ioError))
+void Security::ForgetErrors() STUB
+
 #include "security/KeyData.h"
 namespace Security
 {
 void KeyData::loadFromFiles(const AnyP::PortCfg &, const char *) STUB
 }
 
+#include "security/ErrorDetail.h"
+Security::ErrorDetail::ErrorDetail(ErrorCode, const CertPointer &, const CertPointer &, const char *) STUB
+#if USE_OPENSSL
+Security::ErrorDetail::ErrorDetail(ErrorCode, int, int) STUB
+#elif USE_GNUTLS
+Security::ErrorDetail::ErrorDetail(ErrorCode, LibErrorCode, int) STUB
+#endif
+void Security::ErrorDetail::setPeerCertificate(const CertPointer &) STUB
+SBuf Security::ErrorDetail::verbose(const HttpRequestPointer &) const STUB_RETVAL(SBuf())
+SBuf Security::ErrorDetail::brief() const STUB_RETVAL(SBuf())
+Security::ErrorCode Security::ErrorCodeFromName(const char *) STUB_RETVAL(0)
+const char *Security::ErrorNameFromCode(ErrorCode, bool) STUB_RETVAL("")
+
 #include "security/NegotiationHistory.h"
 Security::NegotiationHistory::NegotiationHistory() STUB
 void Security::NegotiationHistory::retrieveNegotiatedInfo(const Security::SessionPointer &) STUB
@@ -45,11 +63,13 @@
 const char *Security::NegotiationHistory::printTlsVersion(AnyP::ProtocolVersion const &v) const STUB
 
 #include "security/PeerConnector.h"
+class TlsNegotiationDetails: public RefCountable {};
 CBDATA_NAMESPACED_CLASS_INIT(Security, PeerConnector);
 namespace Security
 {
 PeerConnector::PeerConnector(const Comm::ConnectionPointer &, AsyncCall::Pointer &, const AccessLogEntryPointer &, const time_t) :
     AsyncJob("Security::PeerConnector") {STUB}
+PeerConnector::~PeerConnector() STUB
 void PeerConnector::start() STUB
 bool PeerConnector::doneAll() const STUB_RETVAL(true)
 void PeerConnector::swanSong() STUB
@@ -59,10 +79,10 @@
 bool PeerConnector::initialize(Security::SessionPointer &) STUB_RETVAL(false)
 void PeerConnector::negotiate() STUB
 bool PeerConnector::sslFinalized() STUB_RETVAL(false)
-void PeerConnector::handleNegotiateError(const int) STUB
+void PeerConnector::handleNegotiationResult(const Security::IoResult &) STUB;
 void PeerConnector::noteWantRead() STUB
 void PeerConnector::noteWantWrite() STUB
-void PeerConnector::noteNegotiationError(const int, const int, const int) STUB
+void PeerConnector::noteNegotiationError(const Security::ErrorDetailPointer &) STUB
 //    virtual Security::ContextPointer getTlsContext() = 0;
 void PeerConnector::bail(ErrorState *) STUB
 void PeerConnector::sendSuccess() STUB
diff -u -r -N squid-5.0.5/src/tests/stub_libsslsquid.cc squid-5.0.6/src/tests/stub_libsslsquid.cc
--- squid-5.0.5/src/tests/stub_libsslsquid.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/stub_libsslsquid.cc	2021-05-10 21:02:34.000000000 +1200
@@ -43,10 +43,6 @@
 
 #include "ssl/ErrorDetail.h"
 Security::ErrorCode parseErrorString(const char *name) STUB_RETVAL(0)
-//const char *Ssl::getErrorName(Security::ErrorCode value) STUB_RETVAL(NULL)
-Ssl::ErrorDetail::ErrorDetail(Security::ErrorCode, X509 *, X509 *, const char *) STUB
-Ssl::ErrorDetail::ErrorDetail(ErrorDetail const &) STUB
-const String & Ssl::ErrorDetail::toString() const STUB_RETSTATREF(String)
 
 #include "ssl/support.h"
 namespace Ssl
diff -u -r -N squid-5.0.5/src/tests/testCacheManager.cc squid-5.0.6/src/tests/testCacheManager.cc
--- squid-5.0.5/src/tests/testCacheManager.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/testCacheManager.cc	2021-05-10 21:02:34.000000000 +1200
@@ -7,6 +7,7 @@
  */
 
 #include "squid.h"
+#include "anyp/Uri.h"
 #include "CacheManager.h"
 #include "mgr/Action.h"
 #include "Store.h"
@@ -17,11 +18,19 @@
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testCacheManager );
 
+/// Provides test code access to CacheManager internal symbols
+class CacheManagerInternals : public CacheManager
+{
+public:
+    void ParseUrl(const AnyP::Uri &u) { CacheManager::ParseUrl(u); }
+};
+
 /* init memory pools */
 
 void testCacheManager::setUp()
 {
     Mem::Init();
+    AnyP::UriScheme::Init();
 }
 
 /*
@@ -66,3 +75,146 @@
     CPPUNIT_ASSERT_EQUAL(1,(int)sentry->flags);
 }
 
+void
+testCacheManager::testParseUrl()
+{
+    auto *mgr = static_cast<CacheManagerInternals *>(CacheManager::GetInstance());
+    CPPUNIT_ASSERT(mgr != nullptr);
+
+    std::vector<AnyP::ProtocolType> validSchemes = {
+        AnyP::PROTO_CACHE_OBJECT,
+        AnyP::PROTO_HTTP,
+        AnyP::PROTO_HTTPS,
+        AnyP::PROTO_FTP
+    };
+
+    AnyP::Uri mgrUrl;
+    mgrUrl.host("localhost");
+    mgrUrl.port(3128);
+
+    const std::vector<const char *> magicPrefixes = {
+        "/",
+        "/squid-internal-mgr/"
+    };
+
+    const std::vector<const char *> validActions = {
+        "",
+        "menu"
+    };
+
+    const std::vector<const char *> invalidActions = {
+        "INVALID" // any unregistered name
+    };
+
+    const std::vector<const char *> validParams = {
+        "",
+        "?",
+        "?&",
+        "?&&&&&&&&&&&&",
+        "?foo=bar",
+        "?0123456789=bar",
+        "?foo=bar&",
+        "?foo=bar&&&&",
+        "?&foo=bar",
+        "?&&&&foo=bar",
+        "?&foo=bar&",
+        "?&&&&foo=bar&&&&",
+        "?foo=?_weird?~`:[]stuff&bar=okay&&&&&&",
+        "?intlist=1",
+        "?intlist=1,2,3,4,5",
+        "?string=1a",
+        "?string=1,2,3,4,z",
+        "?string=1,2,3,4,[0]",
+        "?intlist=1,2,3,4,5&string=1,2,3,4,y"
+    };
+
+    const std::vector<const char *> invalidParams = {
+        "?/",
+        "?foo",
+        "?/foo",
+        "?foo/",
+        "?foo=",
+        "?foo=&",
+        "?=foo",
+        "? foo=bar",
+        "? &",
+        "?& ",
+        "?=&",
+        "?&=",
+        "? &&&",
+        "?& &&",
+        "?&& &",
+        "?=&&&",
+        "?&=&&",
+        "?&&=&"
+    };
+
+    const std::vector<const char *> validFragments = {
+        "",
+        "#",
+        "##",
+        "#?a=b",
+        "#fragment"
+    };
+
+    for (const auto &scheme : validSchemes) {
+        mgrUrl.setScheme(scheme);
+
+        for (const auto *magic : magicPrefixes) {
+
+            // all schemes except cache_object require magic path prefix bytes
+            if (scheme != AnyP::PROTO_CACHE_OBJECT && strlen(magic) <= 2)
+                continue;
+
+            /* Check the parser accepts all the valid cases */
+
+            for (const auto *action : validActions) {
+                for (const auto *param : validParams) {
+                    for (const auto *frag : validFragments) {
+                        try {
+                            SBuf bits;
+                            bits.append(magic);
+                            bits.append(action);
+                            bits.append(param);
+                            bits.append(frag);
+                            mgrUrl.path(bits);
+
+                            (void)mgr->ParseUrl(mgrUrl);
+                        } catch (...) {
+                            std::cerr << std::endl
+                                      << "FAIL: " << mgrUrl
+                                      << Debug::Extra << "error: " << CurrentException << std::endl;
+                            CPPUNIT_FAIL("rejected a valid URL");
+                        }
+                    }
+                }
+            }
+
+            /* Check that invalid parameters are rejected */
+
+            for (const auto *action : validActions) {
+                for (const auto *param : invalidParams) {
+                    for (const auto *frag : validFragments) {
+                        try {
+                            SBuf bits;
+                            bits.append(magic);
+                            bits.append(action);
+                            bits.append(param);
+                            bits.append(frag);
+                            mgrUrl.path(bits);
+
+                            (void)mgr->ParseUrl(mgrUrl);
+
+                            std::cerr << std::endl
+                                      << "FAIL: " << mgrUrl
+                                      << Debug::Extra << "error: should be rejected due to '" << param << "'" << std::endl;
+                        } catch (const TextException &e) {
+                            continue; // success. caught bad input
+                        }
+                        CPPUNIT_FAIL("failed to reject an invalid URL");
+                    }
+                }
+            }
+        }
+    }
+}
diff -u -r -N squid-5.0.5/src/tests/testCacheManager.h squid-5.0.6/src/tests/testCacheManager.h
--- squid-5.0.5/src/tests/testCacheManager.h	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/tests/testCacheManager.h	2021-05-10 21:02:34.000000000 +1200
@@ -20,6 +20,7 @@
     CPPUNIT_TEST_SUITE( testCacheManager );
     CPPUNIT_TEST( testCreate );
     CPPUNIT_TEST( testRegister );
+    CPPUNIT_TEST( testParseUrl );
     CPPUNIT_TEST_SUITE_END();
 
 public:
@@ -28,6 +29,7 @@
 protected:
     void testCreate();
     void testRegister();
+    void testParseUrl();
 };
 
 #endif
diff -u -r -N squid-5.0.5/src/urn.cc squid-5.0.6/src/urn.cc
--- squid-5.0.5/src/urn.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/urn.cc	2021-05-10 21:02:34.000000000 +1200
@@ -261,6 +261,12 @@
         return;
     }
 
+    if (!e->isAccepting()) {
+        debugs(52, 3, "terminating due to bad " << *e);
+        delete urnState;
+        return;
+    }
+
     /* Update reqofs to point to where in the buffer we'd be */
     urnState->reqofs += result.length;
 
@@ -429,6 +435,7 @@
     }
 
     debugs(52, 3, "urnParseReply: Found " << i << " URLs");
+    xfree(buf);
     return list;
 }
 
diff -u -r -N squid-5.0.5/src/whois.cc squid-5.0.6/src/whois.cc
--- squid-5.0.5/src/whois.cc	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/src/whois.cc	2021-05-10 21:02:34.000000000 +1200
@@ -118,6 +118,16 @@
     debugs(75, 3, HERE << conn << " read " << aBufferLength << " bytes");
     debugs(75, 5, "{" << aBuffer << "}");
 
+    // TODO: Honor delay pools.
+
+    // XXX: Update statCounter before bailing
+    if (!entry->isAccepting()) {
+        debugs(52, 3, "terminating due to bad " << *entry);
+        // TODO: Do not abuse connection for triggering cleanup.
+        conn->close();
+        return;
+    }
+
     if (flag != Comm::OK) {
         debugs(50, 2, conn << ": read failure: " << xstrerr(xerrno));
 
diff -u -r -N squid-5.0.5/test-suite/Makefile.am squid-5.0.6/test-suite/Makefile.am
--- squid-5.0.5/test-suite/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/test-suite/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -95,30 +95,49 @@
 ## XXX: somewhat broken. Its meant to test our debugs() implementation.
 ## but it has never been linked to the actual src/debug.cc implementation !!
 ## all it tests are the stream operators and macro in src/Debug.h
-debug_SOURCES = debug.cc stub_libmem.cc $(DEBUG_SOURCE) 
-
-ESIExpressions_SOURCES = ESIExpressions.cc stub_libmem.cc $(DEBUG_SOURCE)
+debug_SOURCES = \
+	$(DEBUG_SOURCE) \
+	debug.cc \
+	stub_libmem.cc
+
+ESIExpressions_SOURCES = \
+	$(DEBUG_SOURCE) \
+	ESIExpressions.cc \
+	stub_libmem.cc
 ESIExpressions_LDADD = $(top_builddir)/src/esi/Expression.o \
 		$(LDADD)
 
-mem_node_test_SOURCES = mem_node_test.cc $(DEBUG_SOURCE)
+mem_node_test_SOURCES = \
+	$(DEBUG_SOURCE) \
+	mem_node_test.cc
 mem_node_test_LDADD = \
 	$(top_builddir)/src/mem_node.o \
 	$(top_builddir)/src/mem/libmem.la \
 	$(LDADD)
 
-mem_hdr_test_SOURCES = mem_hdr_test.cc $(DEBUG_SOURCE)
+mem_hdr_test_SOURCES = \
+	$(DEBUG_SOURCE) \
+	mem_hdr_test.cc
 mem_hdr_test_LDADD = \
 	$(top_builddir)/src/stmem.o \
 	$(top_builddir)/src/mem_node.o \
 	$(top_builddir)/src/mem/libmem.la \
 	$(LDADD)
 
-splay_SOURCES = splay.cc stub_libmem.cc $(DEBUG_SOURCE)
-
-syntheticoperators_SOURCES = syntheticoperators.cc stub_libmem.cc $(DEBUG_SOURCE)
-
-VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc stub_libmem.cc $(DEBUG_SOURCE)
+splay_SOURCES = \
+	$(DEBUG_SOURCE) \
+	splay.cc \
+	stub_libmem.cc
+
+syntheticoperators_SOURCES = \
+	$(DEBUG_SOURCE) \
+	stub_libmem.cc \
+	syntheticoperators.cc
+
+VirtualDeleteOperator_SOURCES = \
+	$(DEBUG_SOURCE) \
+	VirtualDeleteOperator.cc \
+	stub_libmem.cc
 
 ## membanger won't link today. Bitrot..
 ##CC	= gcc
diff -u -r -N squid-5.0.5/test-suite/Makefile.in squid-5.0.6/test-suite/Makefile.in
--- squid-5.0.5/test-suite/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/test-suite/Makefile.in	2021-05-10 22:57:56.000000000 +1200
@@ -175,8 +175,8 @@
 	stub_MemBuf.$(OBJEXT) stub_SBuf.$(OBJEXT) stub_tools.$(OBJEXT) \
 	stub_fatal.$(OBJEXT)
 am__objects_2 = test_tools.$(OBJEXT) $(am__objects_1)
-am_ESIExpressions_OBJECTS = ESIExpressions.$(OBJEXT) \
-	stub_libmem.$(OBJEXT) $(am__objects_2)
+am_ESIExpressions_OBJECTS = $(am__objects_2) ESIExpressions.$(OBJEXT) \
+	stub_libmem.$(OBJEXT)
 ESIExpressions_OBJECTS = $(am_ESIExpressions_OBJECTS)
 @ENABLE_XPROF_STATS_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/lib/profiler/libprofiler.la
 am__DEPENDENCIES_2 = $(top_builddir)/compat/libcompatsquid.la \
@@ -192,8 +192,8 @@
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-am_VirtualDeleteOperator_OBJECTS = VirtualDeleteOperator.$(OBJEXT) \
-	stub_libmem.$(OBJEXT) $(am__objects_2)
+am_VirtualDeleteOperator_OBJECTS = $(am__objects_2) \
+	VirtualDeleteOperator.$(OBJEXT) stub_libmem.$(OBJEXT)
 VirtualDeleteOperator_OBJECTS = $(am_VirtualDeleteOperator_OBJECTS)
 VirtualDeleteOperator_LDADD = $(LDADD)
 VirtualDeleteOperator_DEPENDENCIES =  \
@@ -201,20 +201,20 @@
 	$(top_builddir)/src/globals.o $(top_builddir)/src/time.o \
 	$(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_3)
-am_debug_OBJECTS = debug.$(OBJEXT) stub_libmem.$(OBJEXT) \
-	$(am__objects_2)
+am_debug_OBJECTS = $(am__objects_2) debug.$(OBJEXT) \
+	stub_libmem.$(OBJEXT)
 debug_OBJECTS = $(am_debug_OBJECTS)
 debug_LDADD = $(LDADD)
 debug_DEPENDENCIES = $(top_builddir)/src/base/libbase.la \
 	$(top_builddir)/src/globals.o $(top_builddir)/src/time.o \
 	$(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_3)
-am_mem_hdr_test_OBJECTS = mem_hdr_test.$(OBJEXT) $(am__objects_2)
+am_mem_hdr_test_OBJECTS = $(am__objects_2) mem_hdr_test.$(OBJEXT)
 mem_hdr_test_OBJECTS = $(am_mem_hdr_test_OBJECTS)
 mem_hdr_test_DEPENDENCIES = $(top_builddir)/src/stmem.o \
 	$(top_builddir)/src/mem_node.o \
 	$(top_builddir)/src/mem/libmem.la $(am__DEPENDENCIES_4)
-am_mem_node_test_OBJECTS = mem_node_test.$(OBJEXT) $(am__objects_2)
+am_mem_node_test_OBJECTS = $(am__objects_2) mem_node_test.$(OBJEXT)
 mem_node_test_OBJECTS = $(am_mem_node_test_OBJECTS)
 mem_node_test_DEPENDENCIES = $(top_builddir)/src/mem_node.o \
 	$(top_builddir)/src/mem/libmem.la $(am__DEPENDENCIES_4)
@@ -225,16 +225,16 @@
 	$(top_builddir)/src/globals.o $(top_builddir)/src/time.o \
 	$(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_3)
-am_splay_OBJECTS = splay.$(OBJEXT) stub_libmem.$(OBJEXT) \
-	$(am__objects_2)
+am_splay_OBJECTS = $(am__objects_2) splay.$(OBJEXT) \
+	stub_libmem.$(OBJEXT)
 splay_OBJECTS = $(am_splay_OBJECTS)
 splay_LDADD = $(LDADD)
 splay_DEPENDENCIES = $(top_builddir)/src/base/libbase.la \
 	$(top_builddir)/src/globals.o $(top_builddir)/src/time.o \
 	$(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_3)
-am_syntheticoperators_OBJECTS = syntheticoperators.$(OBJEXT) \
-	stub_libmem.$(OBJEXT) $(am__objects_2)
+am_syntheticoperators_OBJECTS = $(am__objects_2) stub_libmem.$(OBJEXT) \
+	syntheticoperators.$(OBJEXT)
 syntheticoperators_OBJECTS = $(am_syntheticoperators_OBJECTS)
 syntheticoperators_LDADD = $(LDADD)
 syntheticoperators_DEPENDENCIES = $(top_builddir)/src/base/libbase.la \
@@ -843,27 +843,53 @@
 	STUB.h
 
 DEBUG_SOURCE = test_tools.cc $(STUBS)
-debug_SOURCES = debug.cc stub_libmem.cc $(DEBUG_SOURCE) 
-ESIExpressions_SOURCES = ESIExpressions.cc stub_libmem.cc $(DEBUG_SOURCE)
+debug_SOURCES = \
+	$(DEBUG_SOURCE) \
+	debug.cc \
+	stub_libmem.cc
+
+ESIExpressions_SOURCES = \
+	$(DEBUG_SOURCE) \
+	ESIExpressions.cc \
+	stub_libmem.cc
+
 ESIExpressions_LDADD = $(top_builddir)/src/esi/Expression.o \
 		$(LDADD)
 
-mem_node_test_SOURCES = mem_node_test.cc $(DEBUG_SOURCE)
+mem_node_test_SOURCES = \
+	$(DEBUG_SOURCE) \
+	mem_node_test.cc
+
 mem_node_test_LDADD = \
 	$(top_builddir)/src/mem_node.o \
 	$(top_builddir)/src/mem/libmem.la \
 	$(LDADD)
 
-mem_hdr_test_SOURCES = mem_hdr_test.cc $(DEBUG_SOURCE)
+mem_hdr_test_SOURCES = \
+	$(DEBUG_SOURCE) \
+	mem_hdr_test.cc
+
 mem_hdr_test_LDADD = \
 	$(top_builddir)/src/stmem.o \
 	$(top_builddir)/src/mem_node.o \
 	$(top_builddir)/src/mem/libmem.la \
 	$(LDADD)
 
-splay_SOURCES = splay.cc stub_libmem.cc $(DEBUG_SOURCE)
-syntheticoperators_SOURCES = syntheticoperators.cc stub_libmem.cc $(DEBUG_SOURCE)
-VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc stub_libmem.cc $(DEBUG_SOURCE)
+splay_SOURCES = \
+	$(DEBUG_SOURCE) \
+	splay.cc \
+	stub_libmem.cc
+
+syntheticoperators_SOURCES = \
+	$(DEBUG_SOURCE) \
+	stub_libmem.cc \
+	syntheticoperators.cc
+
+VirtualDeleteOperator_SOURCES = \
+	$(DEBUG_SOURCE) \
+	VirtualDeleteOperator.cc \
+	stub_libmem.cc
+
 all: all-am
 
 .SUFFIXES:
diff -u -r -N squid-5.0.5/tools/helper-mux/helper-mux.8 squid-5.0.6/tools/helper-mux/helper-mux.8
--- squid-5.0.5/tools/helper-mux/helper-mux.8	2021-02-08 13:46:41.000000000 +1300
+++ squid-5.0.6/tools/helper-mux/helper-mux.8	2021-05-10 23:02:25.000000000 +1200
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "HELPER-MUX 8"
-.TH HELPER-MUX 8 "2021-02-08" "perl v5.32.0" "User Contributed Perl Documentation"
+.TH HELPER-MUX 8 "2021-05-10" "perl v5.32.0" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -u -r -N squid-5.0.5/tools/Makefile.am squid-5.0.6/tools/Makefile.am
--- squid-5.0.5/tools/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/tools/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -72,18 +72,18 @@
 libexec_PROGRAMS = cachemgr$(CGIEXT)
 
 cachemgr__CGIEXT__SOURCES = \
-	cachemgr.cc \
 	CharacterSet.cc \
 	Here.cc \
 	MemBuf.cc \
+	cachemgr.cc \
 	test_tools.cc \
 	time.cc
 
 nodist_cachemgr__CGIEXT__SOURCES = \
-	tests/STUB.h \
 	tests/stub_cbdata.cc \
 	tests/stub_debug.cc \
-	tests/stub_libmem.cc
+	tests/stub_libmem.cc \
+	tests/STUB.h
 
 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
 
diff -u -r -N squid-5.0.5/tools/Makefile.in squid-5.0.6/tools/Makefile.in
--- squid-5.0.5/tools/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/tools/Makefile.in	2021-05-10 22:57:56.000000000 +1200
@@ -166,10 +166,11 @@
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)"
 PROGRAMS = $(libexec_PROGRAMS)
-am_cachemgr__CGIEXT__OBJECTS = cachemgr__CGIEXT_-cachemgr.$(OBJEXT) \
+am_cachemgr__CGIEXT__OBJECTS =  \
 	cachemgr__CGIEXT_-CharacterSet.$(OBJEXT) \
 	cachemgr__CGIEXT_-Here.$(OBJEXT) \
 	cachemgr__CGIEXT_-MemBuf.$(OBJEXT) \
+	cachemgr__CGIEXT_-cachemgr.$(OBJEXT) \
 	cachemgr__CGIEXT_-test_tools.$(OBJEXT) \
 	cachemgr__CGIEXT_-time.$(OBJEXT)
 am__dirstamp = $(am__leading_dot)dirstamp
@@ -837,18 +838,18 @@
 TESTSOURCES = test_tools.cc
 DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
 cachemgr__CGIEXT__SOURCES = \
-	cachemgr.cc \
 	CharacterSet.cc \
 	Here.cc \
 	MemBuf.cc \
+	cachemgr.cc \
 	test_tools.cc \
 	time.cc
 
 nodist_cachemgr__CGIEXT__SOURCES = \
-	tests/STUB.h \
 	tests/stub_cbdata.cc \
 	tests/stub_debug.cc \
-	tests/stub_libmem.cc
+	tests/stub_libmem.cc \
+	tests/STUB.h
 
 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
 all: all-recursive
@@ -1007,20 +1008,6 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
-cachemgr__CGIEXT_-cachemgr.o: cachemgr.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -MT cachemgr__CGIEXT_-cachemgr.o -MD -MP -MF $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Tpo -c -o cachemgr__CGIEXT_-cachemgr.o `test -f 'cachemgr.cc' || echo '$(srcdir)/'`cachemgr.cc
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Tpo $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='cachemgr.cc' object='cachemgr__CGIEXT_-cachemgr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -c -o cachemgr__CGIEXT_-cachemgr.o `test -f 'cachemgr.cc' || echo '$(srcdir)/'`cachemgr.cc
-
-cachemgr__CGIEXT_-cachemgr.obj: cachemgr.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -MT cachemgr__CGIEXT_-cachemgr.obj -MD -MP -MF $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Tpo -c -o cachemgr__CGIEXT_-cachemgr.obj `if test -f 'cachemgr.cc'; then $(CYGPATH_W) 'cachemgr.cc'; else $(CYGPATH_W) '$(srcdir)/cachemgr.cc'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Tpo $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='cachemgr.cc' object='cachemgr__CGIEXT_-cachemgr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -c -o cachemgr__CGIEXT_-cachemgr.obj `if test -f 'cachemgr.cc'; then $(CYGPATH_W) 'cachemgr.cc'; else $(CYGPATH_W) '$(srcdir)/cachemgr.cc'; fi`
-
 cachemgr__CGIEXT_-CharacterSet.o: CharacterSet.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -MT cachemgr__CGIEXT_-CharacterSet.o -MD -MP -MF $(DEPDIR)/cachemgr__CGIEXT_-CharacterSet.Tpo -c -o cachemgr__CGIEXT_-CharacterSet.o `test -f 'CharacterSet.cc' || echo '$(srcdir)/'`CharacterSet.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cachemgr__CGIEXT_-CharacterSet.Tpo $(DEPDIR)/cachemgr__CGIEXT_-CharacterSet.Po
@@ -1063,6 +1050,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -c -o cachemgr__CGIEXT_-MemBuf.obj `if test -f 'MemBuf.cc'; then $(CYGPATH_W) 'MemBuf.cc'; else $(CYGPATH_W) '$(srcdir)/MemBuf.cc'; fi`
 
+cachemgr__CGIEXT_-cachemgr.o: cachemgr.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -MT cachemgr__CGIEXT_-cachemgr.o -MD -MP -MF $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Tpo -c -o cachemgr__CGIEXT_-cachemgr.o `test -f 'cachemgr.cc' || echo '$(srcdir)/'`cachemgr.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Tpo $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='cachemgr.cc' object='cachemgr__CGIEXT_-cachemgr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -c -o cachemgr__CGIEXT_-cachemgr.o `test -f 'cachemgr.cc' || echo '$(srcdir)/'`cachemgr.cc
+
+cachemgr__CGIEXT_-cachemgr.obj: cachemgr.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -MT cachemgr__CGIEXT_-cachemgr.obj -MD -MP -MF $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Tpo -c -o cachemgr__CGIEXT_-cachemgr.obj `if test -f 'cachemgr.cc'; then $(CYGPATH_W) 'cachemgr.cc'; else $(CYGPATH_W) '$(srcdir)/cachemgr.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Tpo $(DEPDIR)/cachemgr__CGIEXT_-cachemgr.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='cachemgr.cc' object='cachemgr__CGIEXT_-cachemgr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -c -o cachemgr__CGIEXT_-cachemgr.obj `if test -f 'cachemgr.cc'; then $(CYGPATH_W) 'cachemgr.cc'; else $(CYGPATH_W) '$(srcdir)/cachemgr.cc'; fi`
+
 cachemgr__CGIEXT_-test_tools.o: test_tools.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cachemgr__CGIEXT__CXXFLAGS) $(CXXFLAGS) -MT cachemgr__CGIEXT_-test_tools.o -MD -MP -MF $(DEPDIR)/cachemgr__CGIEXT_-test_tools.Tpo -c -o cachemgr__CGIEXT_-test_tools.o `test -f 'test_tools.cc' || echo '$(srcdir)/'`test_tools.cc
 @am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cachemgr__CGIEXT_-test_tools.Tpo $(DEPDIR)/cachemgr__CGIEXT_-test_tools.Po
diff -u -r -N squid-5.0.5/tools/purge/Makefile.am squid-5.0.6/tools/purge/Makefile.am
--- squid-5.0.5/tools/purge/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/tools/purge/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -13,19 +13,19 @@
 endif
 
 purge_SOURCES = \
+	conffile.cc \
+	conffile.hh \
 	convert.cc \
 	convert.hh \
-	socket.cc \
-	socket.hh \
+	copyout.cc \
+	copyout.hh \
+	purge.cc \
 	signal.cc \
 	signal.hh \
+	socket.cc \
+	socket.hh \
 	squid-tlv.cc \
-	squid-tlv.hh \
-	copyout.cc \
-	copyout.hh \
-	conffile.cc \
-	conffile.hh \
-	purge.cc
+	squid-tlv.hh
 
 purge_LDADD = \
 	$(COMPAT_LIB) \
diff -u -r -N squid-5.0.5/tools/purge/Makefile.in squid-5.0.6/tools/purge/Makefile.in
--- squid-5.0.5/tools/purge/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/tools/purge/Makefile.in	2021-05-10 22:57:56.000000000 +1200
@@ -166,9 +166,9 @@
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_purge_OBJECTS = convert.$(OBJEXT) socket.$(OBJEXT) signal.$(OBJEXT) \
-	squid-tlv.$(OBJEXT) copyout.$(OBJEXT) conffile.$(OBJEXT) \
-	purge.$(OBJEXT)
+am_purge_OBJECTS = conffile.$(OBJEXT) convert.$(OBJEXT) \
+	copyout.$(OBJEXT) purge.$(OBJEXT) signal.$(OBJEXT) \
+	socket.$(OBJEXT) squid-tlv.$(OBJEXT)
 purge_OBJECTS = $(am_purge_OBJECTS)
 @ENABLE_XPROF_STATS_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/lib/profiler/libprofiler.la
 am__DEPENDENCIES_2 = $(top_builddir)/compat/libcompatsquid.la \
@@ -739,19 +739,19 @@
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
 @ENABLE_WIN32SPECIFIC_FALSE@man_MANS = purge.1
 purge_SOURCES = \
+	conffile.cc \
+	conffile.hh \
 	convert.cc \
 	convert.hh \
-	socket.cc \
-	socket.hh \
+	copyout.cc \
+	copyout.hh \
+	purge.cc \
 	signal.cc \
 	signal.hh \
+	socket.cc \
+	socket.hh \
 	squid-tlv.cc \
-	squid-tlv.hh \
-	copyout.cc \
-	copyout.hh \
-	conffile.cc \
-	conffile.hh \
-	purge.cc
+	squid-tlv.hh
 
 purge_LDADD = \
 	$(COMPAT_LIB) \
diff -u -r -N squid-5.0.5/tools/squidclient/Makefile.am squid-5.0.6/tools/squidclient/Makefile.am
--- squid-5.0.5/tools/squidclient/Makefile.am	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/tools/squidclient/Makefile.am	2021-05-10 21:02:34.000000000 +1200
@@ -54,16 +54,16 @@
 bin_PROGRAMS = squidclient
 
 squidclient_SOURCES = \
-	gssapi_support.cc \
-	gssapi_support.h \
 	Parameters.h \
 	Ping.cc \
 	Ping.h \
+	Transport.cc \
+	Transport.h \
+	gssapi_support.cc \
+	gssapi_support.h \
 	squidclient.cc \
 	test_tools.cc \
-	time.cc \
-	Transport.cc \
-	Transport.h
+	time.cc
 
 nodist_squidclient_SOURCES = \
 	tests/stub_debug.cc \
diff -u -r -N squid-5.0.5/tools/squidclient/Makefile.in squid-5.0.6/tools/squidclient/Makefile.in
--- squid-5.0.5/tools/squidclient/Makefile.in	2021-02-08 13:40:48.000000000 +1300
+++ squid-5.0.6/tools/squidclient/Makefile.in	2021-05-10 22:57:56.000000000 +1200
@@ -166,9 +166,9 @@
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_squidclient_OBJECTS = gssapi_support.$(OBJEXT) Ping.$(OBJEXT) \
-	squidclient.$(OBJEXT) test_tools.$(OBJEXT) time.$(OBJEXT) \
-	Transport.$(OBJEXT)
+am_squidclient_OBJECTS = Ping.$(OBJEXT) Transport.$(OBJEXT) \
+	gssapi_support.$(OBJEXT) squidclient.$(OBJEXT) \
+	test_tools.$(OBJEXT) time.$(OBJEXT)
 am__dirstamp = $(am__leading_dot)dirstamp
 nodist_squidclient_OBJECTS = tests/stub_debug.$(OBJEXT) \
 	tests/stub_libmem.$(OBJEXT)
@@ -822,16 +822,16 @@
 # Neither of these should be disted from here.
 TESTSOURCES = test_tools.cc
 squidclient_SOURCES = \
-	gssapi_support.cc \
-	gssapi_support.h \
 	Parameters.h \
 	Ping.cc \
 	Ping.h \
+	Transport.cc \
+	Transport.h \
+	gssapi_support.cc \
+	gssapi_support.h \
 	squidclient.cc \
 	test_tools.cc \
-	time.cc \
-	Transport.cc \
-	Transport.h
+	time.cc
 
 nodist_squidclient_SOURCES = \
 	tests/stub_debug.cc \
diff -u -r -N squid-5.0.5/tools/squidclient/squidclient.1 squid-5.0.6/tools/squidclient/squidclient.1
--- squid-5.0.5/tools/squidclient/squidclient.1	2021-02-05 11:15:11.000000000 +1300
+++ squid-5.0.6/tools/squidclient/squidclient.1	2021-05-10 21:02:34.000000000 +1200
@@ -219,7 +219,7 @@
 .
 .if !'po4a'hide' .TP
 .if !'po4a'hide' .B "\-g count"
-Ping mode, perform\
+Ping mode, perform
 .I count
 iterations (default is to loop until interrupted).
 .
