diff -u -r -N squid-4.1/ChangeLog squid-4.2/ChangeLog
--- squid-4.1/ChangeLog	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/ChangeLog	2018-08-06 02:13:41.000000000 +1200
@@ -1,3 +1,16 @@
+Changes to squid-4.2 (04 Aug 2018):
+
+	- Regression fix: support for https_port clientca= option
+	- Regression Bug 4870: milliseconds logformats prepend 0s instead of spaces
+	- Bug 4861: HTTPMSGLOCK missing pointer safety
+	- Bug 4843 pt3: GCC-8 fixes and refactoring
+	- HTTP: Do not update stored headers on 304 responses
+	- Fix segmentation fault on -k parse
+	- Fix %>ru logging of huge URLs
+	- ... and several performance optimizations
+	- ... and some documentation updates
+	- ... and all fixes from 3.5.28
+
 Changes to squid-4.1 (02 Jul 2018):
 
 	- Bug 4223: fixed retries of failed re-forwardable transactions
@@ -396,6 +409,23 @@
 	- ... and many documentation changes
 	- ... and much code cleanup and polishing
 
+Changes to squid-3.5.28 (15 Jul 2018):
+
+	- SQUID-2018:1: crash processing SSL-Bumped traffic containing ESI
+	- SQUID-2018:2: crash handling responses to internally generated requests
+	- SQUID-2018:3 / CVE-2018-1172: crash in ESI Response processing
+	- Bug 4861: HTTPMSGLOCK missing pointer safety
+	- Bug 4829: IPC shared memory leaks when disker queue overflows
+	- Bug 4767: SMP breaks IPv6 SNMP and cache manager queries
+	- Bug 2821: Ignore Content-Range in non-206 responses
+	- HTCP: Ignore HTCP packets with invalid URI
+	- SSL-Bump: fix authentication with schemes other than Basic
+	- TPROXY: Fix clientside_mark and client port logging
+	- Fix "Cannot assign requested address" for to-origin TPROXY FTP data
+	- Fix --with-netfilter-conntrack error message
+	- Validate mime icon URL before allocating store entries
+	- ... and many documentation changes
+
 Changes to squid-3.5.27 (20 Aug 2017):
 
 	- Regression Bug #4112: ssl_engine does not accept cryptodev
diff -u -r -N squid-4.1/configure squid-4.2/configure
--- squid-4.1/configure	2018-07-02 15:32:06.000000000 +1200
+++ squid-4.2/configure	2018-08-06 02:31:44.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 4.1.
+# Generated by GNU Autoconf 2.69 for Squid Web Proxy 4.2.
 #
 # 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='4.1'
-PACKAGE_STRING='Squid Web Proxy 4.1'
+PACKAGE_VERSION='4.2'
+PACKAGE_STRING='Squid Web Proxy 4.2'
 PACKAGE_BUGREPORT='http://bugs.squid-cache.org/'
 PACKAGE_URL=''
 
@@ -1647,7 +1647,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 4.1 to adapt to many kinds of systems.
+\`configure' configures Squid Web Proxy 4.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1718,7 +1718,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Squid Web Proxy 4.1:";;
+     short | recursive ) echo "Configuration of Squid Web Proxy 4.2:";;
    esac
   cat <<\_ACEOF
 
@@ -2147,7 +2147,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Squid Web Proxy configure 4.1
+Squid Web Proxy configure 4.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3251,7 +3251,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 4.1, which was
+It was created by Squid Web Proxy $as_me 4.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4118,7 +4118,7 @@
 
 # Define the identity of the package.
  PACKAGE='squid'
- VERSION='4.1'
+ VERSION='4.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -43832,7 +43832,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 4.1, which was
+This file was extended by Squid Web Proxy $as_me 4.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -43898,7 +43898,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 4.1
+Squid Web Proxy config.status 4.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -u -r -N squid-4.1/configure.ac squid-4.2/configure.ac
--- squid-4.1/configure.ac	2018-07-02 15:32:06.000000000 +1200
+++ squid-4.2/configure.ac	2018-08-06 02:31:44.000000000 +1200
@@ -5,7 +5,7 @@
 ## Please see the COPYING and CONTRIBUTORS files for details.
 ##
 
-AC_INIT([Squid Web Proxy],[4.1],[http://bugs.squid-cache.org/],[squid])
+AC_INIT([Squid Web Proxy],[4.2],[http://bugs.squid-cache.org/],[squid])
 AC_PREREQ(2.61)
 AC_CONFIG_HEADERS([include/autoconf.h])
 AC_CONFIG_AUX_DIR(cfgaux)
diff -u -r -N squid-4.1/doc/release-notes/release-4.html squid-4.2/doc/release-notes/release-4.html
--- squid-4.1/doc/release-notes/release-4.html	2018-07-02 15:39:05.000000000 +1200
+++ squid-4.2/doc/release-notes/release-4.html	2018-08-06 02:42:39.000000000 +1200
@@ -2,10 +2,10 @@
 <HTML>
 <HEAD>
  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.72">
- <TITLE>Squid 4.1 release notes</TITLE>
+ <TITLE>Squid 4.2 release notes</TITLE>
 </HEAD>
 <BODY>
-<H1>Squid 4.1 release notes</H1>
+<H1>Squid 4.2 release notes</H1>
 
 <H2>Squid Developers</H2>
 <HR>
@@ -63,7 +63,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-4.1 for testing.</P>
+<P>The Squid Team are pleased to announce the release of Squid-4.2 for testing.</P>
 <P>This new release is available for download from 
 <A HREF="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</A> or the
 <A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>
diff -u -r -N squid-4.1/errors/af/ERR_AGENT_CONFIGURE squid-4.2/errors/af/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/af/ERR_AGENT_CONFIGURE	2018-07-02 15:32:50.000000000 +1200
+++ squid-4.2/errors/af/ERR_AGENT_CONFIGURE	2018-08-06 02:32:35.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Hoe om hierdie instellings in die blaaier te vind:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Nutsgoed -&gt; Opsies -&gt; Gevorderd -&gt; Netwerk -&gt; Verbinding</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/af/ERR_AGENT_WPAD squid-4.2/errors/af/ERR_AGENT_WPAD
--- squid-4.1/errors/af/ERR_AGENT_WPAD	2018-07-02 15:32:50.000000000 +1200
+++ squid-4.2/errors/af/ERR_AGENT_WPAD	2018-08-06 02:32:36.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Hoe om hierdie instellings in die blaaier te vind:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Nutsgoed -&gt; Opsies -&gt; Gevorderd -&gt; Netwerk -&gt; Verbinding</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Kies "Outospeur instaanopstelling vir hierdie netwerk"</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ar/ERR_AGENT_CONFIGURE squid-4.2/errors/ar/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/ar/ERR_AGENT_CONFIGURE	2018-07-02 15:32:59.000000000 +1200
+++ squid-4.2/errors/ar/ERR_AGENT_CONFIGURE	2018-08-06 02:32:49.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ar/ERR_AGENT_WPAD squid-4.2/errors/ar/ERR_AGENT_WPAD
--- squid-4.1/errors/ar/ERR_AGENT_WPAD	2018-07-02 15:33:00.000000000 +1200
+++ squid-4.2/errors/ar/ERR_AGENT_WPAD	2018-08-06 02:32:49.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/az/ERR_AGENT_CONFIGURE squid-4.2/errors/az/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/az/ERR_AGENT_CONFIGURE	2018-07-02 15:33:08.000000000 +1200
+++ squid-4.2/errors/az/ERR_AGENT_CONFIGURE	2018-08-06 02:33:02.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/az/ERR_AGENT_WPAD squid-4.2/errors/az/ERR_AGENT_WPAD
--- squid-4.1/errors/az/ERR_AGENT_WPAD	2018-07-02 15:33:08.000000000 +1200
+++ squid-4.2/errors/az/ERR_AGENT_WPAD	2018-08-06 02:33:03.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/bg/ERR_AGENT_CONFIGURE squid-4.2/errors/bg/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/bg/ERR_AGENT_CONFIGURE	2018-07-02 15:33:16.000000000 +1200
+++ squid-4.2/errors/bg/ERR_AGENT_CONFIGURE	2018-08-06 02:33:15.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Как да намерите тези настройки на Вашия браузер:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Инструменти -&gt; Опции за интернет -&gt; Връзки -&gt; LAN настройки -&gt; Прокси сървър</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/bg/ERR_AGENT_WPAD squid-4.2/errors/bg/ERR_AGENT_WPAD
--- squid-4.1/errors/bg/ERR_AGENT_WPAD	2018-07-02 15:33:16.000000000 +1200
+++ squid-4.2/errors/bg/ERR_AGENT_WPAD	2018-08-06 02:33:16.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Как да намерите тези настройки на Вашия браузер:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Инструменти -&gt; Опции за интернет -&gt; Връзки -&gt; LAN настройки -&gt; Прокси сървър</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Изберете Автоматично откриване на настройките.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Изберете Използване на Автоматично конфигуриране на прокси сървър.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ca/ERR_AGENT_CONFIGURE squid-4.2/errors/ca/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/ca/ERR_AGENT_CONFIGURE	2018-07-02 15:33:24.000000000 +1200
+++ squid-4.2/errors/ca/ERR_AGENT_CONFIGURE	2018-08-06 02:33:31.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ca/ERR_AGENT_WPAD squid-4.2/errors/ca/ERR_AGENT_WPAD
--- squid-4.1/errors/ca/ERR_AGENT_WPAD	2018-07-02 15:33:25.000000000 +1200
+++ squid-4.2/errors/ca/ERR_AGENT_WPAD	2018-08-06 02:33:32.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/cs/ERR_AGENT_CONFIGURE squid-4.2/errors/cs/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/cs/ERR_AGENT_CONFIGURE	2018-07-02 15:33:33.000000000 +1200
+++ squid-4.2/errors/cs/ERR_AGENT_CONFIGURE	2018-08-06 02:33:46.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/cs/ERR_AGENT_WPAD squid-4.2/errors/cs/ERR_AGENT_WPAD
--- squid-4.1/errors/cs/ERR_AGENT_WPAD	2018-07-02 15:33:33.000000000 +1200
+++ squid-4.2/errors/cs/ERR_AGENT_WPAD	2018-08-06 02:33:47.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/da/ERR_AGENT_CONFIGURE squid-4.2/errors/da/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/da/ERR_AGENT_CONFIGURE	2018-07-02 15:33:41.000000000 +1200
+++ squid-4.2/errors/da/ERR_AGENT_CONFIGURE	2018-08-06 02:34:00.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/da/ERR_AGENT_WPAD squid-4.2/errors/da/ERR_AGENT_WPAD
--- squid-4.1/errors/da/ERR_AGENT_WPAD	2018-07-02 15:33:41.000000000 +1200
+++ squid-4.2/errors/da/ERR_AGENT_WPAD	2018-08-06 02:34:00.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/de/ERR_AGENT_CONFIGURE squid-4.2/errors/de/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/de/ERR_AGENT_CONFIGURE	2018-07-02 15:33:49.000000000 +1200
+++ squid-4.2/errors/de/ERR_AGENT_CONFIGURE	2018-08-06 02:34:14.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Wie sie diese Einstellung in ihrem Browser finden:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Extras -&gt; Optionen -&gt; Erweitert -&gt; Netzwerk -&gt; Verbindungseinstellungen</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Extras -&gt; Internetoptionen -&gt; Verbindung -&gt; LAN Einstellungen -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Extras -&gt; Einstellungen -&gt; Erweitert -&gt; Netzwerk -&gt; Proxyserver</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/de/ERR_AGENT_WPAD squid-4.2/errors/de/ERR_AGENT_WPAD
--- squid-4.1/errors/de/ERR_AGENT_WPAD	2018-07-02 15:33:49.000000000 +1200
+++ squid-4.2/errors/de/ERR_AGENT_WPAD	2018-08-06 02:34:14.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Wie sie diese Einstellung in ihrem Browser finden:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Extras -&gt; Optionen -&gt; Erweitert -&gt; Netzwerk -&gt; Verbindungseinstellungen</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Wählen sie Automatische Suche von Einstellungen für dieses Netzwerk</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Extras -&gt; Internetoptionen -&gt; Verbindung -&gt; LAN Einstellungen -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Automatische Suche von Einstellungen</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Extras -&gt; Einstellungen -&gt; Erweitert -&gt; Netzwerk -&gt; Proxyserver</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Automatisches Konfigurationsskript verwenden</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/el/ERR_AGENT_CONFIGURE squid-4.2/errors/el/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/el/ERR_AGENT_CONFIGURE	2018-07-02 15:33:57.000000000 +1200
+++ squid-4.2/errors/el/ERR_AGENT_CONFIGURE	2018-08-06 02:34:27.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/el/ERR_AGENT_WPAD squid-4.2/errors/el/ERR_AGENT_WPAD
--- squid-4.1/errors/el/ERR_AGENT_WPAD	2018-07-02 15:33:58.000000000 +1200
+++ squid-4.2/errors/el/ERR_AGENT_WPAD	2018-08-06 02:34:27.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/en/ERR_AGENT_CONFIGURE squid-4.2/errors/en/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/en/ERR_AGENT_CONFIGURE	2018-07-02 15:34:06.000000000 +1200
+++ squid-4.2/errors/en/ERR_AGENT_CONFIGURE	2018-08-06 02:34:41.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/en/ERR_AGENT_WPAD squid-4.2/errors/en/ERR_AGENT_WPAD
--- squid-4.1/errors/en/ERR_AGENT_WPAD	2018-07-02 15:34:06.000000000 +1200
+++ squid-4.2/errors/en/ERR_AGENT_WPAD	2018-08-06 02:34:41.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/es/ERR_AGENT_CONFIGURE squid-4.2/errors/es/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/es/ERR_AGENT_CONFIGURE	2018-07-02 15:34:15.000000000 +1200
+++ squid-4.2/errors/es/ERR_AGENT_CONFIGURE	2018-08-06 02:34:54.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Como encontrar estas preferencias en su navegador:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Ajustes de conexión</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Herramientas -&gt; Opciones de Internet  -&gt; Conexión -&gt; Preferencias de RED -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Servidores Proxy</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/es/ERR_AGENT_WPAD squid-4.2/errors/es/ERR_AGENT_WPAD
--- squid-4.1/errors/es/ERR_AGENT_WPAD	2018-07-02 15:34:15.000000000 +1200
+++ squid-4.2/errors/es/ERR_AGENT_WPAD	2018-08-06 02:34:55.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Como encontrar estas preferencias en su navegador:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Ajustes de conexión</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Herramientas -&gt; Opciones de Internet  -&gt; Conexión -&gt; Preferencias de RED -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Seleccione Detectar preferencias automáticamente</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Servidores Proxy</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Seleccione Usar Configuración automática de Proxy</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/et/ERR_AGENT_CONFIGURE squid-4.2/errors/et/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/et/ERR_AGENT_CONFIGURE	2018-07-02 15:34:23.000000000 +1200
+++ squid-4.2/errors/et/ERR_AGENT_CONFIGURE	2018-08-06 02:35:08.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/et/ERR_AGENT_WPAD squid-4.2/errors/et/ERR_AGENT_WPAD
--- squid-4.1/errors/et/ERR_AGENT_WPAD	2018-07-02 15:34:23.000000000 +1200
+++ squid-4.2/errors/et/ERR_AGENT_WPAD	2018-08-06 02:35:08.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/fa/ERR_AGENT_CONFIGURE squid-4.2/errors/fa/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/fa/ERR_AGENT_CONFIGURE	2018-07-02 15:34:32.000000000 +1200
+++ squid-4.2/errors/fa/ERR_AGENT_CONFIGURE	2018-08-06 02:35:21.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/fa/ERR_AGENT_WPAD squid-4.2/errors/fa/ERR_AGENT_WPAD
--- squid-4.1/errors/fa/ERR_AGENT_WPAD	2018-07-02 15:34:32.000000000 +1200
+++ squid-4.2/errors/fa/ERR_AGENT_WPAD	2018-08-06 02:35:22.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/fi/ERR_AGENT_CONFIGURE squid-4.2/errors/fi/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/fi/ERR_AGENT_CONFIGURE	2018-07-02 15:34:40.000000000 +1200
+++ squid-4.2/errors/fi/ERR_AGENT_CONFIGURE	2018-08-06 02:35:34.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/fi/ERR_AGENT_WPAD squid-4.2/errors/fi/ERR_AGENT_WPAD
--- squid-4.1/errors/fi/ERR_AGENT_WPAD	2018-07-02 15:34:41.000000000 +1200
+++ squid-4.2/errors/fi/ERR_AGENT_WPAD	2018-08-06 02:35:35.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Valitse Automaattisesti haetut asetukset</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/fr/ERR_AGENT_CONFIGURE squid-4.2/errors/fr/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/fr/ERR_AGENT_CONFIGURE	2018-07-02 15:34:49.000000000 +1200
+++ squid-4.2/errors/fr/ERR_AGENT_CONFIGURE	2018-08-06 02:35:47.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Comment trouver ces réglages dans votre navigateur :</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Outils -&gt; Options -&gt; Avancé -&gt; Réseau -&gt; Paramètres de Connexion</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Outils -&gt; Options Internet -&gt; Connexion -&gt; Paramètres LAN -&gt; Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Outils -&gt; Préférences -&gt; Avancé -&gt; Réseau -&gt; Serveur Proxy</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/fr/ERR_AGENT_WPAD squid-4.2/errors/fr/ERR_AGENT_WPAD
--- squid-4.1/errors/fr/ERR_AGENT_WPAD	2018-07-02 15:34:49.000000000 +1200
+++ squid-4.2/errors/fr/ERR_AGENT_WPAD	2018-08-06 02:35:47.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Comment trouver ces réglages dans votre navigateur :</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Outils -&gt; Options -&gt; Avancé -&gt; Réseau -&gt; Paramètres de Connexion</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Sélectionnez détection automatique dans les paramètres du proxy pour ce réseau</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Outils -&gt; Options Internet -&gt; Connexion -&gt; Paramètres LAN -&gt; Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Sélectionnez le paramètre détection automatique</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Outils -&gt; Préférences -&gt; Avancé -&gt; Réseau -&gt; Serveur Proxy</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Utilisez la sélection automatique pour configurer le proxy</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/he/ERR_AGENT_CONFIGURE squid-4.2/errors/he/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/he/ERR_AGENT_CONFIGURE	2018-07-02 15:34:57.000000000 +1200
+++ squid-4.2/errors/he/ERR_AGENT_CONFIGURE	2018-08-06 02:36:00.000000000 +1200
@@ -24,19 +24,19 @@
 <p>איך למצוא את ההגדרות האלה בדפדפן שלך:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>כלים -&gt; אפשרויות -&gt; אפשרויות מתקדמות -&gt; רשת -&gt; הגדרות חיבור</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>כלים -&gt; אפשרויות אינטרנט -&gt; חיבורים -&gt; הגדרות LAN -&gt; פרוקסי</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>כלים -&gt; העדפות -&gt; הגדרות מתקדמות -&gt; רשת -&gt; שרתי פרוקסי</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/he/ERR_AGENT_WPAD squid-4.2/errors/he/ERR_AGENT_WPAD
--- squid-4.1/errors/he/ERR_AGENT_WPAD	2018-07-02 15:34:57.000000000 +1200
+++ squid-4.2/errors/he/ERR_AGENT_WPAD	2018-08-06 02:36:00.000000000 +1200
@@ -24,19 +24,19 @@
 <p>איך למצוא את ההגדרות האלה בדפדפן שלך:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>כלים -&gt; אפשרויות -&gt; אפשרויות מתקדמות -&gt; רשת -&gt; הגדרות חיבור</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>בחר "איתור הגדרות אוטומטי" עבר הרשת הזו</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>כלים -&gt; אפשרויות אינטרנט -&gt; חיבורים -&gt; הגדרות LAN -&gt; פרוקסי</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>בחר "איתור הגדרות אוטומטי"</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>כלים -&gt; העדפות -&gt; הגדרות מתקדמות -&gt; רשת -&gt; שרתי פרוקסי</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>בחר באיתור הגדרות אוטומטי עבור הגדרת הפרוקסי</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/hu/ERR_AGENT_CONFIGURE squid-4.2/errors/hu/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/hu/ERR_AGENT_CONFIGURE	2018-07-02 15:35:05.000000000 +1200
+++ squid-4.2/errors/hu/ERR_AGENT_CONFIGURE	2018-08-06 02:36:13.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Ezeket a beállításokat az alábbi menüpontokon keresztül találhatja meg:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Kapcsolatbeállítások</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Eszközök -&gt; Internetbeállítások -&gt; Kapcsolat -&gt; Helyi hálózat beállításai -&gt; Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Proxyszerverek</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/hu/ERR_AGENT_WPAD squid-4.2/errors/hu/ERR_AGENT_WPAD
--- squid-4.1/errors/hu/ERR_AGENT_WPAD	2018-07-02 15:35:05.000000000 +1200
+++ squid-4.2/errors/hu/ERR_AGENT_WPAD	2018-08-06 02:36:14.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Ezeket a beállításokat az alábbi menüpontokon keresztül találhatja meg:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Kapcsolatbeállítások</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Válassza ki a „Proxybeállítások automatikus felismerése ehhez a hálózathoz” jelölőnégyzetet</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Eszközök -&gt; Internetbeállítások -&gt; Kapcsolat -&gt; Helyi hálózat beállításai -&gt; Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Válassza ki az „Automatikus felismerés” opciót</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Proxyszerverek</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Válassza ki az "Automatikus proxybeállítás használata" opciót</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/hy/ERR_AGENT_CONFIGURE squid-4.2/errors/hy/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/hy/ERR_AGENT_CONFIGURE	2018-07-02 15:35:13.000000000 +1200
+++ squid-4.2/errors/hy/ERR_AGENT_CONFIGURE	2018-08-06 02:36:27.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Ինչպես փնտրել այս կարգաբերումները քո բրաուզերում:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Գործիքներ -&gt; Կարգաբերումներ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Կապի կարգաբերումներ</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Գործիքներ -&gt; Ինտերնետ կարգաբերումներ -&gt; Կապ -&gt; LAN կարգաբերումներ -&gt;Պրոքսի</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Գործիքներ -&gt; Նախընտրություններ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Պրոքսի սերվերներ</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/hy/ERR_AGENT_WPAD squid-4.2/errors/hy/ERR_AGENT_WPAD
--- squid-4.1/errors/hy/ERR_AGENT_WPAD	2018-07-02 15:35:13.000000000 +1200
+++ squid-4.2/errors/hy/ERR_AGENT_WPAD	2018-08-06 02:36:27.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Ինչպես փնտրել այս կարգաբերումները քո բրաուզերում:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Գործիքներ -&gt; Կարգաբերումներ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Կապի կարգաբերումներ</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Ընտրեք Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Գործիքներ -&gt; Ինտերնետ կարգաբերումներ -&gt; Կապ -&gt; LAN կարգաբերումներ -&gt;Պրոքսի</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Ընտրեք Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Գործիքներ -&gt; Նախընտրություններ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Պրոքսի սերվերներ</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Ընտրեք Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/id/ERR_AGENT_CONFIGURE squid-4.2/errors/id/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/id/ERR_AGENT_CONFIGURE	2018-07-02 15:35:21.000000000 +1200
+++ squid-4.2/errors/id/ERR_AGENT_CONFIGURE	2018-08-06 02:36:40.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/id/ERR_AGENT_WPAD squid-4.2/errors/id/ERR_AGENT_WPAD
--- squid-4.1/errors/id/ERR_AGENT_WPAD	2018-07-02 15:35:22.000000000 +1200
+++ squid-4.2/errors/id/ERR_AGENT_WPAD	2018-08-06 02:36:40.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/it/ERR_AGENT_CONFIGURE squid-4.2/errors/it/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/it/ERR_AGENT_CONFIGURE	2018-07-02 15:35:30.000000000 +1200
+++ squid-4.2/errors/it/ERR_AGENT_CONFIGURE	2018-08-06 02:36:53.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Indicazioni su come configurare il tuo browser sono disponibili a:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Strumenti -&gt; Opzioni -&gt; Avanzate -&gt; Rete -&gt; Impostazioni di connessione</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Strumenti -&gt; Opzioni Internet -&gt; Connessioni -&gt; Impostazioni LAN -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Strumenti -&gt; Preferenze -&gt; Avanzate -&gt; Rete -&gt; Server proxy</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/it/ERR_AGENT_WPAD squid-4.2/errors/it/ERR_AGENT_WPAD
--- squid-4.1/errors/it/ERR_AGENT_WPAD	2018-07-02 15:35:30.000000000 +1200
+++ squid-4.2/errors/it/ERR_AGENT_WPAD	2018-08-06 02:36:54.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Indicazioni su come configurare il tuo browser sono disponibili a:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Strumenti -&gt; Opzioni -&gt; Avanzate -&gt; Rete -&gt; Impostazioni di connessione</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Seleziona "Rileva automaticamente impostazioni proxy per questa rete"</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Strumenti -&gt; Opzioni Internet -&gt; Connessioni -&gt; Impostazioni LAN -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Seleziona "Rileva automaticamente impostazioni"</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Strumenti -&gt; Preferenze -&gt; Avanzate -&gt; Rete -&gt; Server proxy</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Seleziona "Usa script di configurazione automatica"</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ja/ERR_AGENT_CONFIGURE squid-4.2/errors/ja/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/ja/ERR_AGENT_CONFIGURE	2018-07-02 15:35:38.000000000 +1200
+++ squid-4.2/errors/ja/ERR_AGENT_CONFIGURE	2018-08-06 02:37:07.000000000 +1200
@@ -24,19 +24,19 @@
 <p>ご利用のブラウザを設定する方法の探し方:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>ツール -&gt; オプション -&gt; 詳細 -&gt; ネットワーク -&gt; 接続設定</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>ツール -&gt; インターネット オプション -&gt; 接続 -&gt; LAN の設定 -&gt; プロキシ サーバー</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>ツール -&gt; 設定 -&gt; 詳細 -&gt; ネットワーク -&gt; プロキシサーバー</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ja/ERR_AGENT_WPAD squid-4.2/errors/ja/ERR_AGENT_WPAD
--- squid-4.1/errors/ja/ERR_AGENT_WPAD	2018-07-02 15:35:38.000000000 +1200
+++ squid-4.2/errors/ja/ERR_AGENT_WPAD	2018-08-06 02:37:07.000000000 +1200
@@ -24,19 +24,19 @@
 <p>ご利用のブラウザを設定する方法の探し方:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>ツール -&gt; オプション -&gt; 詳細 -&gt; ネットワーク -&gt; 接続設定</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>ツール -&gt; インターネット オプション -&gt; 接続 -&gt; LAN の設定 -&gt; プロキシ サーバー</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>自動検出の設定を選択してください。</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>ツール -&gt; 設定 -&gt; 詳細 -&gt; ネットワーク -&gt; プロキシサーバー</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>proxyの自動構成を選択してください。</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ka/ERR_AGENT_CONFIGURE squid-4.2/errors/ka/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/ka/ERR_AGENT_CONFIGURE	2018-07-02 15:35:46.000000000 +1200
+++ squid-4.2/errors/ka/ERR_AGENT_CONFIGURE	2018-08-06 02:37:20.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ka/ERR_AGENT_WPAD squid-4.2/errors/ka/ERR_AGENT_WPAD
--- squid-4.1/errors/ka/ERR_AGENT_WPAD	2018-07-02 15:35:46.000000000 +1200
+++ squid-4.2/errors/ka/ERR_AGENT_WPAD	2018-08-06 02:37:21.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ko/ERR_AGENT_CONFIGURE squid-4.2/errors/ko/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/ko/ERR_AGENT_CONFIGURE	2018-07-02 15:35:54.000000000 +1200
+++ squid-4.2/errors/ko/ERR_AGENT_CONFIGURE	2018-08-06 02:37:34.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ko/ERR_AGENT_WPAD squid-4.2/errors/ko/ERR_AGENT_WPAD
--- squid-4.1/errors/ko/ERR_AGENT_WPAD	2018-07-02 15:35:54.000000000 +1200
+++ squid-4.2/errors/ko/ERR_AGENT_WPAD	2018-08-06 02:37:34.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/lt/ERR_AGENT_CONFIGURE squid-4.2/errors/lt/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/lt/ERR_AGENT_CONFIGURE	2018-07-02 15:36:02.000000000 +1200
+++ squid-4.2/errors/lt/ERR_AGENT_CONFIGURE	2018-08-06 02:37:47.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/lt/ERR_AGENT_WPAD squid-4.2/errors/lt/ERR_AGENT_WPAD
--- squid-4.1/errors/lt/ERR_AGENT_WPAD	2018-07-02 15:36:03.000000000 +1200
+++ squid-4.2/errors/lt/ERR_AGENT_WPAD	2018-08-06 02:37:47.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/lv/ERR_AGENT_CONFIGURE squid-4.2/errors/lv/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/lv/ERR_AGENT_CONFIGURE	2018-07-02 15:36:11.000000000 +1200
+++ squid-4.2/errors/lv/ERR_AGENT_CONFIGURE	2018-08-06 02:38:00.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/lv/ERR_AGENT_WPAD squid-4.2/errors/lv/ERR_AGENT_WPAD
--- squid-4.1/errors/lv/ERR_AGENT_WPAD	2018-07-02 15:36:11.000000000 +1200
+++ squid-4.2/errors/lv/ERR_AGENT_WPAD	2018-08-06 02:38:01.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ms/ERR_AGENT_CONFIGURE squid-4.2/errors/ms/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/ms/ERR_AGENT_CONFIGURE	2018-07-02 15:36:19.000000000 +1200
+++ squid-4.2/errors/ms/ERR_AGENT_CONFIGURE	2018-08-06 02:38:14.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ms/ERR_AGENT_WPAD squid-4.2/errors/ms/ERR_AGENT_WPAD
--- squid-4.1/errors/ms/ERR_AGENT_WPAD	2018-07-02 15:36:19.000000000 +1200
+++ squid-4.2/errors/ms/ERR_AGENT_WPAD	2018-08-06 02:38:14.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/nl/ERR_AGENT_CONFIGURE squid-4.2/errors/nl/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/nl/ERR_AGENT_CONFIGURE	2018-07-02 15:36:27.000000000 +1200
+++ squid-4.2/errors/nl/ERR_AGENT_CONFIGURE	2018-08-06 02:38:27.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Hoe kunt u deze instellingen in uw browser vinden:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Configuratie -&gt; Internet Opties -&gt; Geavanceerd -&gt; Netwerk -&gt;LAN Instellingen </li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Configuratie -&gt; Internet Opties -&gt; Verbinding -&gt; LAN Instellingen -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Configuratie -&gt;Voorkeursinstellingen -&gt; Geavanceerd -&gt; Netwerk -&gt;Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/nl/ERR_AGENT_WPAD squid-4.2/errors/nl/ERR_AGENT_WPAD
--- squid-4.1/errors/nl/ERR_AGENT_WPAD	2018-07-02 15:36:27.000000000 +1200
+++ squid-4.2/errors/nl/ERR_AGENT_WPAD	2018-08-06 02:38:27.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Hoe kunt u deze instellingen in uw browser vinden:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Configuratie -&gt; Internet Opties -&gt; Geavanceerd -&gt; Netwerk -&gt;LAN Instellingen </li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Configuratie -&gt; Internet Opties -&gt; Verbinding -&gt; LAN Instellingen -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Selecteer: Instellingen automatisch detecteren</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Configuratie -&gt;Voorkeursinstellingen -&gt; Geavanceerd -&gt; Netwerk -&gt;Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Selecteer: Gebruik automatisch proxy configuratie</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/oc/ERR_AGENT_CONFIGURE squid-4.2/errors/oc/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/oc/ERR_AGENT_CONFIGURE	2018-07-02 15:36:35.000000000 +1200
+++ squid-4.2/errors/oc/ERR_AGENT_CONFIGURE	2018-08-06 02:38:40.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/oc/ERR_AGENT_WPAD squid-4.2/errors/oc/ERR_AGENT_WPAD
--- squid-4.1/errors/oc/ERR_AGENT_WPAD	2018-07-02 15:36:35.000000000 +1200
+++ squid-4.2/errors/oc/ERR_AGENT_WPAD	2018-08-06 02:38:41.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/pl/ERR_AGENT_CONFIGURE squid-4.2/errors/pl/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/pl/ERR_AGENT_CONFIGURE	2018-07-02 15:36:43.000000000 +1200
+++ squid-4.2/errors/pl/ERR_AGENT_CONFIGURE	2018-08-06 02:38:54.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/pl/ERR_AGENT_WPAD squid-4.2/errors/pl/ERR_AGENT_WPAD
--- squid-4.1/errors/pl/ERR_AGENT_WPAD	2018-07-02 15:36:43.000000000 +1200
+++ squid-4.2/errors/pl/ERR_AGENT_WPAD	2018-08-06 02:38:54.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/pt/ERR_AGENT_CONFIGURE squid-4.2/errors/pt/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/pt/ERR_AGENT_CONFIGURE	2018-07-02 15:37:01.000000000 +1200
+++ squid-4.2/errors/pt/ERR_AGENT_CONFIGURE	2018-08-06 02:39:21.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Como encontrar essas configurações em seu navegador:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/pt/ERR_AGENT_WPAD squid-4.2/errors/pt/ERR_AGENT_WPAD
--- squid-4.1/errors/pt/ERR_AGENT_WPAD	2018-07-02 15:37:01.000000000 +1200
+++ squid-4.2/errors/pt/ERR_AGENT_WPAD	2018-08-06 02:39:21.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Como encontrar essas configurações em seu navegador:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Selecionar automaticamente a detecção de configurações.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Selecione configuração automática do Proxy.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/pt-br/ERR_AGENT_CONFIGURE squid-4.2/errors/pt-br/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/pt-br/ERR_AGENT_CONFIGURE	2018-07-02 15:36:52.000000000 +1200
+++ squid-4.2/errors/pt-br/ERR_AGENT_CONFIGURE	2018-08-06 02:39:07.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Como encontrar estas configurações no seu navegador:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Ferramentas -&gt; Opções -&gt; Avançado -&gt; Rede -&gt; Configurações da Conexão</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Na caixa HTTP proxy digite o nome do proxy %h e porta %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Ferramentas -&gt; Opções de Internet -&gt; Conexão -&gt; Configurações da LAN -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Na caixa HTTP proxy digite o nome do proxy %h e porta %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Ferramentas -&gt; Preferências -&gt; Avançado -&gt; Rede -&gt; Servidores Proxy</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Na caixa HTTP proxy digite o nome do proxy %h e porta %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/pt-br/ERR_AGENT_WPAD squid-4.2/errors/pt-br/ERR_AGENT_WPAD
--- squid-4.1/errors/pt-br/ERR_AGENT_WPAD	2018-07-02 15:36:52.000000000 +1200
+++ squid-4.2/errors/pt-br/ERR_AGENT_WPAD	2018-08-06 02:39:08.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Como encontrar estas configurações no seu navegador:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Ferramentas -&gt; Opções -&gt; Avançado -&gt; Rede -&gt; Configurações da Conexão</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Selecionar configurações de auto-detecção de proxy para esta rede</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Ferramentas -&gt; Opções de Internet -&gt; Conexão -&gt; Configurações da LAN -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Selecione Detectar configurações automaticamente</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Ferramentas -&gt; Preferências -&gt; Avançado -&gt; Rede -&gt; Servidores Proxy</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Selecione Usar configuração automática de proxy</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ro/ERR_AGENT_CONFIGURE squid-4.2/errors/ro/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/ro/ERR_AGENT_CONFIGURE	2018-07-02 15:37:09.000000000 +1200
+++ squid-4.2/errors/ro/ERR_AGENT_CONFIGURE	2018-08-06 02:39:34.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Cum să găseşti aceste setări în navigatorul tău:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ro/ERR_AGENT_WPAD squid-4.2/errors/ro/ERR_AGENT_WPAD
--- squid-4.1/errors/ro/ERR_AGENT_WPAD	2018-07-02 15:37:09.000000000 +1200
+++ squid-4.2/errors/ro/ERR_AGENT_WPAD	2018-08-06 02:39:34.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Cum să găseşti aceste setări în navigatorul tău:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Selectează Detectează automat setările</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Selectează Configurare pentru proxy automată</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ru/ERR_AGENT_CONFIGURE squid-4.2/errors/ru/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/ru/ERR_AGENT_CONFIGURE	2018-07-02 15:37:17.000000000 +1200
+++ squid-4.2/errors/ru/ERR_AGENT_CONFIGURE	2018-08-06 02:39:48.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Эти настройки в вашем браузере:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Инструменты -&gt; Опции -&gt; Дополнительно -&gt; Сеть -&gt; Настойки соединения</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Инструменты -&gt; Настройки интернета -&gt; Соединения -&gt; Настройки LAN -&gt; Прокси</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Инструменты -&gt; Настройки -&gt; Дополнительно -&gt; Сеть -&gt; Прокси-серверы</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/ru/ERR_AGENT_WPAD squid-4.2/errors/ru/ERR_AGENT_WPAD
--- squid-4.1/errors/ru/ERR_AGENT_WPAD	2018-07-02 15:37:18.000000000 +1200
+++ squid-4.2/errors/ru/ERR_AGENT_WPAD	2018-08-06 02:39:48.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Эти настройки в вашем браузере:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Инструменты -&gt; Опции -&gt; Дополнительно -&gt; Сеть -&gt; Настойки соединения</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Инструменты -&gt; Настройки интернета -&gt; Соединения -&gt; Настройки LAN -&gt; Прокси</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Выберите Автоматически определять настройки</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Инструменты -&gt; Настройки -&gt; Дополнительно -&gt; Сеть -&gt; Прокси-серверы</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Выберите Использовать Автоматическое определение прокси</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sk/ERR_AGENT_CONFIGURE squid-4.2/errors/sk/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/sk/ERR_AGENT_CONFIGURE	2018-07-02 15:37:26.000000000 +1200
+++ squid-4.2/errors/sk/ERR_AGENT_CONFIGURE	2018-08-06 02:40:01.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Ako nájsť tieto nastavenia vo vašom prehliadači:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Nástroje -&gt; Možnosti -&gt; Rozšírené -&gt; Sieť -&gt; Nastavenie pripojenia</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Nástroje -&gt; Možnosti internetu -&gt; Pripojenie -&gt; Nastavenia LAN -&gt; Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Nástroje -&gt; Nastavenia -&gt; Rozšírené -&gt; Sieť -&gt; Proxy servery</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sk/ERR_AGENT_WPAD squid-4.2/errors/sk/ERR_AGENT_WPAD
--- squid-4.1/errors/sk/ERR_AGENT_WPAD	2018-07-02 15:37:26.000000000 +1200
+++ squid-4.2/errors/sk/ERR_AGENT_WPAD	2018-08-06 02:40:01.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Ako nájsť tieto nastavenia vo vašom prehliadači:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Nástroje -&gt; Možnosti -&gt; Rozšírené -&gt; Sieť -&gt; Nastavenie pripojenia</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Nástroje -&gt; Možnosti internetu -&gt; Pripojenie -&gt; Nastavenia LAN -&gt; Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Vyberte Automaticky zistiť nastavenia</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Nástroje -&gt; Nastavenia -&gt; Rozšírené -&gt; Sieť -&gt; Proxy servery</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Vyberte Automatická konfigurácia proxy</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sl/ERR_AGENT_CONFIGURE squid-4.2/errors/sl/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/sl/ERR_AGENT_CONFIGURE	2018-07-02 15:37:34.000000000 +1200
+++ squid-4.2/errors/sl/ERR_AGENT_CONFIGURE	2018-08-06 02:40:15.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Kako najdete te nastavitve v svojem brskalniku:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Orodja -&gt; Možnosti -&gt; Napredno -&gt; Omrežje -&gt; Nastavitve povezave</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>V polje za posredniški strežnik HTTP vnesite ime posredniškega strežnika %h in vrata %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Orodja -&gt; Internetne možnosti -&gt; Povezava -&gt; Nastavitve LAN -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>V polje za posredniški strežnik HTTP vnesite ime posredniškega strežnika %h in vrata %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Orodja -&gt; Nastavitve -&gt; Napredno -&gt; Omrežje -&gt; Posredovalni strežniki</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>V polje za posredniški strežnik HTTP vnesite ime posredniškega strežnika %h in vrata %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sl/ERR_AGENT_WPAD squid-4.2/errors/sl/ERR_AGENT_WPAD
--- squid-4.1/errors/sl/ERR_AGENT_WPAD	2018-07-02 15:37:34.000000000 +1200
+++ squid-4.2/errors/sl/ERR_AGENT_WPAD	2018-08-06 02:40:15.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Kako najdete te nastavitve v svojem brskalniku:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Orodja -&gt; Možnosti -&gt; Napredno -&gt; Omrežje -&gt; Nastavitve povezave</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Za to omrežje izberite samozaznavo nastavitev posredniškega strežnika</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Orodja -&gt; Internetne možnosti -&gt; Povezava -&gt; Nastavitve LAN -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Izberite samodejno zaznavo nastavitev</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Orodja -&gt; Nastavitve -&gt; Napredno -&gt; Omrežje -&gt; Posredovalni strežniki</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Izberite uporabo samodejne konfiguracije posredniškega strežnika</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sr-cyrl/ERR_AGENT_CONFIGURE squid-4.2/errors/sr-cyrl/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/sr-cyrl/ERR_AGENT_CONFIGURE	2018-07-02 15:37:42.000000000 +1200
+++ squid-4.2/errors/sr-cyrl/ERR_AGENT_CONFIGURE	2018-08-06 02:40:28.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sr-cyrl/ERR_AGENT_WPAD squid-4.2/errors/sr-cyrl/ERR_AGENT_WPAD
--- squid-4.1/errors/sr-cyrl/ERR_AGENT_WPAD	2018-07-02 15:37:42.000000000 +1200
+++ squid-4.2/errors/sr-cyrl/ERR_AGENT_WPAD	2018-08-06 02:40:28.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sr-latn/ERR_AGENT_CONFIGURE squid-4.2/errors/sr-latn/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/sr-latn/ERR_AGENT_CONFIGURE	2018-07-02 15:37:50.000000000 +1200
+++ squid-4.2/errors/sr-latn/ERR_AGENT_CONFIGURE	2018-08-06 02:40:41.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sr-latn/ERR_AGENT_WPAD squid-4.2/errors/sr-latn/ERR_AGENT_WPAD
--- squid-4.1/errors/sr-latn/ERR_AGENT_WPAD	2018-07-02 15:37:51.000000000 +1200
+++ squid-4.2/errors/sr-latn/ERR_AGENT_WPAD	2018-08-06 02:40:42.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sv/ERR_AGENT_CONFIGURE squid-4.2/errors/sv/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/sv/ERR_AGENT_CONFIGURE	2018-07-02 15:37:59.000000000 +1200
+++ squid-4.2/errors/sv/ERR_AGENT_CONFIGURE	2018-08-06 02:40:55.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/sv/ERR_AGENT_WPAD squid-4.2/errors/sv/ERR_AGENT_WPAD
--- squid-4.1/errors/sv/ERR_AGENT_WPAD	2018-07-02 15:37:59.000000000 +1200
+++ squid-4.2/errors/sv/ERR_AGENT_WPAD	2018-08-06 02:40:55.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/th/ERR_AGENT_CONFIGURE squid-4.2/errors/th/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/th/ERR_AGENT_CONFIGURE	2018-07-02 15:38:07.000000000 +1200
+++ squid-4.2/errors/th/ERR_AGENT_CONFIGURE	2018-08-06 02:41:07.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/th/ERR_AGENT_WPAD squid-4.2/errors/th/ERR_AGENT_WPAD
--- squid-4.1/errors/th/ERR_AGENT_WPAD	2018-07-02 15:38:07.000000000 +1200
+++ squid-4.2/errors/th/ERR_AGENT_WPAD	2018-08-06 02:41:07.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/tr/ERR_AGENT_CONFIGURE squid-4.2/errors/tr/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/tr/ERR_AGENT_CONFIGURE	2018-07-02 15:38:15.000000000 +1200
+++ squid-4.2/errors/tr/ERR_AGENT_CONFIGURE	2018-08-06 02:41:19.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/tr/ERR_AGENT_WPAD squid-4.2/errors/tr/ERR_AGENT_WPAD
--- squid-4.1/errors/tr/ERR_AGENT_WPAD	2018-07-02 15:38:15.000000000 +1200
+++ squid-4.2/errors/tr/ERR_AGENT_WPAD	2018-08-06 02:41:19.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/uk/ERR_AGENT_CONFIGURE squid-4.2/errors/uk/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/uk/ERR_AGENT_CONFIGURE	2018-07-02 15:38:23.000000000 +1200
+++ squid-4.2/errors/uk/ERR_AGENT_CONFIGURE	2018-08-06 02:41:32.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Як знайти ці налаштування у Вашому браузері:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Інструменти -&gt; Опції -&gt; Додатково -&gt; Мережа -&gt; Параметри з'єднання</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Інструменти -&gt; Властивості браузера -&gt; З'єднання -&gt; Налаштування LAN -&gt; Проксі</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Інструменти -&gt; Налаштування -&gt; Додатково -&gt; Мережа -&gt; Проксі сервера</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/uk/ERR_AGENT_WPAD squid-4.2/errors/uk/ERR_AGENT_WPAD
--- squid-4.1/errors/uk/ERR_AGENT_WPAD	2018-07-02 15:38:24.000000000 +1200
+++ squid-4.2/errors/uk/ERR_AGENT_WPAD	2018-08-06 02:41:32.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Як знайти ці налаштування у Вашому браузері:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Інструменти -&gt; Опції -&gt; Додатково -&gt; Мережа -&gt; Параметри з'єднання</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Інструменти -&gt; Властивості браузера -&gt; З'єднання -&gt; Налаштування LAN -&gt; Проксі</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Виберіть "Автоматичне визначення параметрів"</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Інструменти -&gt; Налаштування -&gt; Додатково -&gt; Мережа -&gt; Проксі сервера</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Виберіть " Автоматичне налаштування проксі" </li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/uz/ERR_AGENT_CONFIGURE squid-4.2/errors/uz/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/uz/ERR_AGENT_CONFIGURE	2018-07-02 15:38:32.000000000 +1200
+++ squid-4.2/errors/uz/ERR_AGENT_CONFIGURE	2018-08-06 02:41:45.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/uz/ERR_AGENT_WPAD squid-4.2/errors/uz/ERR_AGENT_WPAD
--- squid-4.1/errors/uz/ERR_AGENT_WPAD	2018-07-02 15:38:32.000000000 +1200
+++ squid-4.2/errors/uz/ERR_AGENT_WPAD	2018-08-06 02:41:46.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/vi/ERR_AGENT_CONFIGURE squid-4.2/errors/vi/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/vi/ERR_AGENT_CONFIGURE	2018-07-02 15:38:40.000000000 +1200
+++ squid-4.2/errors/vi/ERR_AGENT_CONFIGURE	2018-08-06 02:41:59.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Cách tìm thiết lập này trong trình duyệt:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/vi/ERR_AGENT_WPAD squid-4.2/errors/vi/ERR_AGENT_WPAD
--- squid-4.1/errors/vi/ERR_AGENT_WPAD	2018-07-02 15:38:40.000000000 +1200
+++ squid-4.2/errors/vi/ERR_AGENT_WPAD	2018-08-06 02:41:59.000000000 +1200
@@ -24,19 +24,19 @@
 <p>Cách tìm thiết lập này trong trình duyệt:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Bật tùy chọn Tự động phát hiện thiết lập</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Bật tùy chọn Dùng tự động cấu hình ủy nhiệm</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/zh-hans/ERR_AGENT_CONFIGURE squid-4.2/errors/zh-hans/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/zh-hans/ERR_AGENT_CONFIGURE	2018-07-02 15:38:48.000000000 +1200
+++ squid-4.2/errors/zh-hans/ERR_AGENT_CONFIGURE	2018-08-06 02:42:12.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/zh-hans/ERR_AGENT_WPAD squid-4.2/errors/zh-hans/ERR_AGENT_WPAD
--- squid-4.1/errors/zh-hans/ERR_AGENT_WPAD	2018-07-02 15:38:48.000000000 +1200
+++ squid-4.2/errors/zh-hans/ERR_AGENT_WPAD	2018-08-06 02:42:13.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/zh-hant/ERR_AGENT_CONFIGURE squid-4.2/errors/zh-hant/ERR_AGENT_CONFIGURE
--- squid-4.1/errors/zh-hant/ERR_AGENT_CONFIGURE	2018-07-02 15:38:56.000000000 +1200
+++ squid-4.2/errors/zh-hant/ERR_AGENT_CONFIGURE	2018-08-06 02:42:26.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>In the HTTP proxy box type the proxy name %h and port %b.</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/errors/zh-hant/ERR_AGENT_WPAD squid-4.2/errors/zh-hant/ERR_AGENT_WPAD
--- squid-4.1/errors/zh-hant/ERR_AGENT_WPAD	2018-07-02 15:38:57.000000000 +1200
+++ squid-4.2/errors/zh-hant/ERR_AGENT_WPAD	2018-08-06 02:42:26.000000000 +1200
@@ -24,19 +24,19 @@
 <p>How to find these settings in your browser:</p>
 
 <div id="firefox"> For Firefox browsers go to: <ul>
-<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
 <li>Select Auto-detect proxy settings for this network</li>
 </ul>
 </div>
 
 <div id="microsoft"> For Internet Explorer browsers go to: <ul>
-<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
 <li>Select Automatically detect settings</li>
 </ul>
 </div>
 
 <div id="opera"> For Opera browsers go to: <ul>
-<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
 <li>Select Use Automatic proxy configuration</li>
 </ul>
 </div>
diff -u -r -N squid-4.1/include/version.h squid-4.2/include/version.h
--- squid-4.1/include/version.h	2018-07-02 15:32:06.000000000 +1200
+++ squid-4.2/include/version.h	2018-08-06 02:31:44.000000000 +1200
@@ -7,7 +7,7 @@
  */
 
 #ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1530502317
+#define SQUID_RELEASE_TIME 1533479491
 #endif
 
 /*
diff -u -r -N squid-4.1/RELEASENOTES.html squid-4.2/RELEASENOTES.html
--- squid-4.1/RELEASENOTES.html	2018-07-02 15:39:05.000000000 +1200
+++ squid-4.2/RELEASENOTES.html	2018-08-06 02:42:39.000000000 +1200
@@ -2,10 +2,10 @@
 <HTML>
 <HEAD>
  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.72">
- <TITLE>Squid 4.1 release notes</TITLE>
+ <TITLE>Squid 4.2 release notes</TITLE>
 </HEAD>
 <BODY>
-<H1>Squid 4.1 release notes</H1>
+<H1>Squid 4.2 release notes</H1>
 
 <H2>Squid Developers</H2>
 <HR>
@@ -63,7 +63,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-4.1 for testing.</P>
+<P>The Squid Team are pleased to announce the release of Squid-4.2 for testing.</P>
 <P>This new release is available for download from 
 <A HREF="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</A> or the
 <A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>
diff -u -r -N squid-4.1/src/AccessLogEntry.cc squid-4.2/src/AccessLogEntry.cc
--- squid-4.1/src/AccessLogEntry.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/AccessLogEntry.cc	2018-08-06 02:13:41.000000000 +1200
@@ -112,3 +112,15 @@
 #endif
 }
 
+const SBuf *
+AccessLogEntry::effectiveVirginUrl() const
+{
+    const SBuf *effectiveUrl = request ? &request->url.absolute() : &virginUrlForMissingRequest_;
+    if (effectiveUrl && !effectiveUrl->isEmpty())
+        return effectiveUrl;
+    // We can not use ALE::url here because it may contain a request URI after
+    // adaptation/redirection. When the request is missing, a non-empty ALE::url
+    // means that we missed a setVirginUrlForMissingRequest() call somewhere.
+    return nullptr;
+}
+
diff -u -r -N squid-4.1/src/AccessLogEntry.h squid-4.2/src/AccessLogEntry.h
--- squid-4.1/src/AccessLogEntry.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/AccessLogEntry.h	2018-08-06 02:13:41.000000000 +1200
@@ -271,6 +271,24 @@
     }
     icap;
 #endif
+
+    /// Effective URI of the received client (or equivalent) HTTP request or,
+    /// in rare cases where that information was not collected, a nil pointer.
+    /// Receiving errors are represented by "error:..." URIs.
+    /// Adaptations and redirections do not affect this URI.
+    const SBuf *effectiveVirginUrl() const;
+
+    /// Remember Client URI (or equivalent) when there is no HttpRequest.
+    void setVirginUrlForMissingRequest(const SBuf &vu)
+    {
+        if (!request)
+            virginUrlForMissingRequest_ = vu;
+    }
+
+private:
+    /// Client URI (or equivalent) for effectiveVirginUrl() when HttpRequest is
+    /// missing. This member is ignored unless the request member is nil.
+    SBuf virginUrlForMissingRequest_;
 };
 
 class ACLChecklist;
diff -u -r -N squid-4.1/src/acl/BoolOps.cc squid-4.2/src/acl/BoolOps.cc
--- squid-4.1/src/acl/BoolOps.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/acl/BoolOps.cc	2018-08-06 02:13:41.000000000 +1200
@@ -17,9 +17,10 @@
 Acl::NotNode::NotNode(ACL *acl)
 {
     assert(acl);
+    Must(strlen(acl->name) <= sizeof(name)-2);
     name[0] = '!';
     name[1] = '\0';
-    strncat(&name[1], acl->name, sizeof(name)-1-1);
+    xstrncpy(&name[1], acl->name, sizeof(name)-1); // -1 for '!'
     add(acl);
 }
 
diff -u -r -N squid-4.1/src/acl/external/delayer/ext_delayer_acl.8 squid-4.2/src/acl/external/delayer/ext_delayer_acl.8
--- squid-4.1/src/acl/external/delayer/ext_delayer_acl.8	2018-07-02 15:39:06.000000000 +1200
+++ squid-4.2/src/acl/external/delayer/ext_delayer_acl.8	2018-08-06 02:42:41.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EXT_DELAYER_ACL 8"
-.TH EXT_DELAYER_ACL 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH EXT_DELAYER_ACL 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/acl/external/SQL_session/ext_sql_session_acl.8 squid-4.2/src/acl/external/SQL_session/ext_sql_session_acl.8
--- squid-4.1/src/acl/external/SQL_session/ext_sql_session_acl.8	2018-07-02 15:39:06.000000000 +1200
+++ squid-4.2/src/acl/external/SQL_session/ext_sql_session_acl.8	2018-08-06 02:42:41.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EXT_SQL_SESSION_ACL 8"
-.TH EXT_SQL_SESSION_ACL 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH EXT_SQL_SESSION_ACL 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8 squid-4.2/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8
--- squid-4.1/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8	2018-07-02 15:39:06.000000000 +1200
+++ squid-4.2/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8	2018-08-06 02:42:41.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EXT_WBINFO_GROUP_ACL 8"
-.TH EXT_WBINFO_GROUP_ACL 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH EXT_WBINFO_GROUP_ACL 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/acl/FilledChecklist.cc squid-4.2/src/acl/FilledChecklist.cc
--- squid-4.1/src/acl/FilledChecklist.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/acl/FilledChecklist.cc	2018-08-06 02:13:41.000000000 +1200
@@ -132,11 +132,11 @@
 {
     if (!al)
         return;
-    if (!al->adapted_request) {
+    if (adaptedRequest && !al->adapted_request) {
         al->adapted_request = adaptedRequest;
         HTTPMSGLOCK(al->adapted_request);
     }
-    if (al->url.isEmpty())
+    if (logUri && al->url.isEmpty())
         al->url = logUri;
 }
 
diff -u -r -N squid-4.1/src/anyp/TrafficMode.h squid-4.2/src/anyp/TrafficMode.h
--- squid-4.1/src/anyp/TrafficMode.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/anyp/TrafficMode.h	2018-08-06 02:13:41.000000000 +1200
@@ -21,17 +21,13 @@
 class TrafficMode
 {
 public:
-    TrafficMode() : accelSurrogate(false), proxySurrogate(false), natIntercept(false), tproxyIntercept(false), tunnelSslBumping(false) {}
-    TrafficMode(const TrafficMode &rhs) { operator =(rhs); }
-    TrafficMode &operator =(const TrafficMode &rhs) { memcpy(this, &rhs, sizeof(TrafficMode)); return *this; }
-
     /** marks HTTP accelerator (reverse/surrogate proxy) traffic
      *
      * Indicating the following are required:
      *  - URL translation from relative to absolute form
      *  - restriction to origin peer relay recommended
      */
-    bool accelSurrogate;
+    bool accelSurrogate = false;
 
     /** marks ports receiving PROXY protocol traffic
      *
@@ -41,7 +37,7 @@
      *  - indirect client IP trust verification is mandatory
      *  - TLS is not supported
      */
-    bool proxySurrogate;
+    bool proxySurrogate = false;
 
     /** marks NAT intercepted traffic
      *
@@ -52,7 +48,7 @@
      *  - destination pinning is recommended
      *  - authentication prohibited
      */
-    bool natIntercept;
+    bool natIntercept = false;
 
     /** marks TPROXY intercepted traffic
      *
@@ -64,7 +60,7 @@
      *  - destination pinning is recommended
      *  - authentication prohibited
      */
-    bool tproxyIntercept;
+    bool tproxyIntercept = false;
 
     /** marks intercept and decryption of CONNECT (tunnel) SSL traffic
      *
@@ -75,7 +71,7 @@
      *  - encrypted outbound server connections
      *  - peer relay prohibited. TODO: re-encrypt and re-wrap with CONNECT
      */
-    bool tunnelSslBumping;
+    bool tunnelSslBumping = false;
 
     /** true if the traffic is in any way intercepted
      *
diff -u -r -N squid-4.1/src/anyp/Uri.cc squid-4.2/src/anyp/Uri.cc
--- squid-4.1/src/anyp/Uri.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/anyp/Uri.cc	2018-08-06 02:13:41.000000000 +1200
@@ -445,11 +445,11 @@
 /// Update the URL object with parsed URI data.
 void
 AnyP::Uri::parseFinish(const AnyP::ProtocolType protocol,
-                 const char *const protoStr, // for unknown protocols
-                 const char *const aUrlPath,
-                 const char *const aHost,
-                 const SBuf &aLogin,
-                 const int aPort)
+                       const char *const protoStr, // for unknown protocols
+                       const char *const aUrlPath,
+                       const char *const aHost,
+                       const SBuf &aLogin,
+                       const int aPort)
 {
     setScheme(protocol, protoStr);
     path(aUrlPath);
@@ -515,15 +515,15 @@
  *        and never copy the query-string part in the first place
  */
 char *
-urlCanonicalClean(const HttpRequest * request)
+urlCanonicalCleanWithoutRequest(const SBuf &url, const HttpRequestMethod &method, const AnyP::UriScheme &scheme)
 {
     LOCAL_ARRAY(char, buf, MAX_URL);
 
-    snprintf(buf, sizeof(buf), SQUIDSBUFPH, SQUIDSBUFPRINT(request->effectiveRequestUri()));
+    snprintf(buf, sizeof(buf), SQUIDSBUFPH, SQUIDSBUFPRINT(url));
     buf[sizeof(buf)-1] = '\0';
 
     // URN, CONNECT method, and non-stripped URIs can go straight out
-    if (Config.onoff.strip_query_terms && !(request->method == Http::METHOD_CONNECT || request->url.getScheme() == AnyP::PROTO_URN)) {
+    if (Config.onoff.strip_query_terms && !(method == Http::METHOD_CONNECT || scheme == AnyP::PROTO_URN)) {
         // strip anything AFTER a question-mark
         // leaving the '?' in place
         if (auto t = strchr(buf, '?')) {
@@ -555,7 +555,7 @@
     }
 
     // else do the normal complete canonical thing.
-    return urlCanonicalClean(request);
+    return request->canonicalCleanUrl();
 }
 
 /*
@@ -936,3 +936,56 @@
     *host_=0;
 }
 
+// TODO: fix code duplication with AnyP::Uri::parse()
+char *
+AnyP::Uri::cleanup(const char *uri)
+{
+    int flags = 0;
+    char *cleanedUri = nullptr;
+    switch (Config.uri_whitespace) {
+    case URI_WHITESPACE_ALLOW:
+        flags |= RFC1738_ESCAPE_NOSPACE;
+        // fall through to next case
+    case URI_WHITESPACE_ENCODE:
+        flags |= RFC1738_ESCAPE_UNESCAPED;
+        cleanedUri = xstrndup(rfc1738_do_escape(uri, flags), MAX_URL);
+        break;
+
+    case URI_WHITESPACE_CHOP: {
+        flags |= RFC1738_ESCAPE_UNESCAPED;
+        const auto pos = strcspn(uri, w_space);
+        char *choppedUri = nullptr;
+        if (pos < strlen(uri))
+            choppedUri = xstrndup(uri, pos + 1);
+        cleanedUri = xstrndup(rfc1738_do_escape(choppedUri ? choppedUri : uri, flags), MAX_URL);
+        cleanedUri[pos] = '\0';
+        xfree(choppedUri);
+    }
+    break;
+
+    case URI_WHITESPACE_DENY:
+    case URI_WHITESPACE_STRIP:
+    default: {
+        // TODO: avoid duplication with urlParse()
+        const char *t;
+        char *tmp_uri = static_cast<char*>(xmalloc(strlen(uri) + 1));
+        char *q = tmp_uri;
+        t = uri;
+        while (*t) {
+            if (!xisspace(*t)) {
+                *q = *t;
+                ++q;
+            }
+            ++t;
+        }
+        *q = '\0';
+        cleanedUri = xstrndup(rfc1738_escape_unescaped(tmp_uri), MAX_URL);
+        xfree(tmp_uri);
+    }
+    break;
+    }
+
+    assert(cleanedUri);
+    return cleanedUri;
+}
+
diff -u -r -N squid-4.1/src/anyp/Uri.h squid-4.2/src/anyp/Uri.h
--- squid-4.1/src/anyp/Uri.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/anyp/Uri.h	2018-08-06 02:13:41.000000000 +1200
@@ -61,6 +61,9 @@
 
     bool parse(const HttpRequestMethod &, const char *url);
 
+    /// \return a new URI that honors uri_whitespace
+    static char *cleanup(const char *uri);
+
     AnyP::UriScheme const & getScheme() const {return scheme_;}
 
     /// convert the URL scheme to that given
@@ -179,7 +182,10 @@
 class HttpRequest;
 
 void urlInitialize(void);
-char *urlCanonicalClean(const HttpRequest *);
+/// call HttpRequest::canonicalCleanUrl() instead if you have HttpRequest
+/// \returns a pointer to a local static buffer containing request URI
+/// that honors strip_query_terms and %-encodes unsafe URI characters
+char *urlCanonicalCleanWithoutRequest(const SBuf &url, const HttpRequestMethod &, const AnyP::UriScheme &);
 const char *urlCanonicalFakeHttps(const HttpRequest * request);
 bool urlIsRelative(const char *);
 char *urlMakeAbsolute(const HttpRequest *, const char *);
diff -u -r -N squid-4.1/src/auth/basic/DB/basic_db_auth.8 squid-4.2/src/auth/basic/DB/basic_db_auth.8
--- squid-4.1/src/auth/basic/DB/basic_db_auth.8	2018-07-02 15:39:07.000000000 +1200
+++ squid-4.2/src/auth/basic/DB/basic_db_auth.8	2018-08-06 02:42:42.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BASIC_DB_AUTH 8"
-.TH BASIC_DB_AUTH 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH BASIC_DB_AUTH 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/auth/basic/POP3/basic_pop3_auth.8 squid-4.2/src/auth/basic/POP3/basic_pop3_auth.8
--- squid-4.1/src/auth/basic/POP3/basic_pop3_auth.8	2018-07-02 15:39:07.000000000 +1200
+++ squid-4.2/src/auth/basic/POP3/basic_pop3_auth.8	2018-08-06 02:42:42.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BASIC_POP3_AUTH 8"
-.TH BASIC_POP3_AUTH 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH BASIC_POP3_AUTH 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/cache_cf.cc squid-4.2/src/cache_cf.cc
--- squid-4.1/src/cache_cf.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/cache_cf.cc	2018-08-06 02:13:41.000000000 +1200
@@ -2298,15 +2298,8 @@
         p->connect_fail_limit = 10;
 
 #if USE_CACHE_DIGESTS
-
-    if (!p->options.no_digest) {
-        /* XXX This looks odd.. who has the original pointer
-         * then?
-         */
-        PeerDigest *pd = peerDigestCreate(p);
-        p->digest = cbdataReference(pd);
-    }
-
+    if (!p->options.no_digest)
+        peerDigestCreate(p);
 #endif
 
     p->index =  ++Config.npeers;
@@ -3774,6 +3767,15 @@
         }
     }
 
+    if (s->secure.encryptTransport) {
+        if (s->secure.certs.empty()) {
+            debugs(3, DBG_CRITICAL, "FATAL: " << AnyP::UriScheme(s->transport.protocol) << "_port requires a cert= parameter");
+            self_destruct();
+            return;
+        }
+    }
+
+    // *_port line should now be fully valid so we can clone it if necessary
     if (Ip::EnableIpv6&IPV6_SPECIAL_SPLITSTACK && s->s.isAnyAddr()) {
         // clone the port options from *s to *(s->next)
         s->next = s->clone();
diff -u -r -N squid-4.1/src/CacheManager.h squid-4.2/src/CacheManager.h
--- squid-4.1/src/CacheManager.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/CacheManager.h	2018-08-06 02:13:41.000000000 +1200
@@ -58,9 +58,6 @@
     void registerProfile(const Mgr::ActionProfilePointer &profile);
 
     Menu menu_;
-
-private:
-    static CacheManager* instance;
 };
 
 #endif /* SQUID_CACHEMANAGER_H */
diff -u -r -N squid-4.1/src/cf.data.pre squid-4.2/src/cf.data.pre
--- squid-4.1/src/cf.data.pre	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/cf.data.pre	2018-08-06 02:13:41.000000000 +1200
@@ -612,12 +612,15 @@
 		Concurrency must not be set unless it's known the helper
 		supports the input format with channel-ID fields.
 
-		The queue-size=N option sets the maximum number of queued
-		requests to N. The default maximum is 2*numberofchildren. Squid
-		is allowed to temporarily exceed the configured maximum, marking
-		the affected helper as "overloaded". If the helper overload
-		lasts more than 3 minutes, the action prescribed by the
-		on-persistent-overload option applies.
+		The queue-size option sets the maximum number of queued
+		requests. A request is queued when no existing child can
+		accept it due to concurrency limit and no new child can be
+		started due to numberofchildren limit. The default maximum is
+		2*numberofchildren. Squid is allowed to temporarily exceed the
+		configured maximum, marking the affected helper as
+		"overloaded". If the helper overload lasts more than 3
+		minutes, the action prescribed by the on-persistent-overload
+		option applies.
 
 		The on-persistent-overload=action option specifies Squid
 		reaction to a new helper request arriving when the helper
@@ -846,10 +849,12 @@
 	  concurrency=n	concurrency level per process. Only used with helpers
 			capable of processing more than one query at a time.
 
-	  queue-size=N  The queue-size= option sets the maximum number of queued
-			requests. If the queued requests exceed queue size 
-			the acl is ignored.
-			The default value is set to 2*children-max.
+	  queue-size=N  The queue-size option sets the maximum number of
+			queued requests. A request is queued when no existing
+			helper can accept it due to concurrency limit and no
+			new helper can be started due to children-max limit.
+			If the queued requests exceed queue size, the acl is
+			ignored. The default value is set to 2*children-max.
 
 	  protocol=2.5	Compatibility mode for Squid-2.5 external acl helpers.
 
@@ -3143,9 +3148,14 @@
 DEFAULT: 32 startup=5 idle=1
 LOC: Ssl::TheConfig.ssl_crtdChildren
 DOC_START
-	The maximum number of processes spawn to service ssl server.
-	The maximum this may be safely set to is 32.
-	
+	Specifies the maximum number of certificate generation processes that
+	Squid may spawn (numberofchildren) and several related options. Using
+	too few of these helper processes (a.k.a. "helpers") creates request
+	queues. Using too many helpers wastes your system resources. Squid
+	does not support spawning more than 32 helpers.
+
+	Usage: numberofchildren [option]...
+
 	The startup= and idle= options allow some measure of skew in your
 	tuning.
 	
@@ -3167,10 +3177,11 @@
 
 		queue-size=N
 
-	Sets the maximum number of queued requests.
-	If the queued requests exceed queue size for more than 3 minutes
-	squid aborts its operation.
-	The default value is set to 2*numberofchildren.
+	Sets the maximum number of queued requests. A request is queued when
+	no existing child is idle and no new child can be started due to
+	numberofchildren limit. If the queued requests exceed queue size for
+	more than 3 minutes squid aborts its operation. The default value is
+	set to 2*numberofchildren.
 	
 	You must have at least one ssl_crtd process.
 DOC_END
@@ -3197,8 +3208,13 @@
 DEFAULT: 32 startup=5 idle=1 concurrency=1
 LOC: Ssl::TheConfig.ssl_crt_validator_Children
 DOC_START
-	The maximum number of processes spawn to service SSL server.
-	The maximum this may be safely set to is 32.
+	Specifies the maximum number of certificate validation processes that
+	Squid may spawn (numberofchildren) and several related options. Using
+	too few of these helper processes (a.k.a. "helpers") creates request
+	queues. Using too many helpers wastes your system resources. Squid
+	does not support spawning more than 32 helpers.
+
+	Usage: numberofchildren [option]...
 	
 	The startup= and idle= options allow some measure of skew in your
 	tuning.
@@ -3233,10 +3249,11 @@
 
 		queue-size=N
 
-	Sets the maximum number of queued requests.
-	If the queued requests exceed queue size for more than 3 minutes
-	squid aborts its operation.
-	The default value is set to 2*numberofchildren.
+	Sets the maximum number of queued requests. A request is queued when
+	no existing child can accept it due to concurrency limit and no new
+	child can be started due to numberofchildren limit. If the queued
+	requests exceed queue size for more than 3 minutes squid aborts its
+	operation. The default value is set to 2*numberofchildren.
 	
 	You must have at least one ssl_crt_validator process.
 DOC_END
@@ -4276,19 +4293,42 @@
 
 	The <format specification> is a string with embedded % format codes
 
-	% format codes all follow the same basic structure where all but
-	the formatcode is optional. Output strings are automatically escaped
-	as required according to their context and the output format
-	modifiers are usually not needed, but can be specified if an explicit
-	output format is desired.
-
-		% ["|[|'|#|/] [-] [[0]width] [{arg}] formatcode [{arg}]
-
-		"	output in quoted string format
-		[	output in squid text log format as used by log_mime_hdrs
-		#	output in URL quoted format
-		/	output in shell \-escaped format
-		'	output as-is
+	% format codes all follow the same basic structure where all
+	components but the formatcode are optional and usually unnecessary,
+	especially when dealing with common codes.
+
+		% [encoding] [-] [[0]width] [{arg}] formatcode [{arg}]
+
+		encoding escapes or otherwise protects "special" characters:
+
+			"	Quoted string encoding where quote(") and
+				backslash(\) characters are \-escaped while
+				CR, LF, and TAB characters are encoded as \r,
+				\n, and \t two-character sequences.
+
+			[	Custom Squid encoding where percent(%), square
+				brackets([]), backslash(\) and characters with
+				codes outside of [32,126] range are %-encoded.
+				SP is not encoded. Used by log_mime_hdrs.
+
+			#	URL encoding (a.k.a. percent-encoding) where
+				all URL unsafe and control characters (per RFC
+				1738) are %-encoded.
+
+			/	Shell-like encoding where quote(") and
+				backslash(\) characters are \-escaped while CR
+				and LF characters are encoded as \r and \n
+				two-character sequences. Values containing SP
+				character(s) are surrounded by quotes(").
+
+			'	Raw/as-is encoding with no escaping/quoting.
+
+			Default encoding: When no explicit encoding is
+			specified, each %code determines its own encoding.
+			Most %codes use raw/as-is encoding, but some codes use
+			a so called "pass-through URL encoding" where all URL
+			unsafe and control characters (per RFC 1738) are
+			%-encoded, but the percent character(%) is left as is.
 
 		-	left aligned
 
@@ -4394,8 +4434,40 @@
 		[http::]rm	Request method (GET/POST etc)
 		[http::]>rm	Request method from client
 		[http::]<rm	Request method sent to server or peer
-		[http::]ru	Request URL from client (historic, filtered for logging)
-		[http::]>ru	Request URL from client
+
+		[http::]ru	Request URL received (or computed) and sanitized
+
+				Logs request URI received from the client, a
+				request adaptation service, or a request
+				redirector (whichever was applied last).
+
+				Computed URLs are URIs of internally generated
+				requests and various "error:..." URIs.
+
+				Honors strip_query_terms and uri_whitespace.
+
+				This field is not encoded by default. Encoding
+				this field using variants of %-encoding will
+				clash with uri_whitespace modifications that
+				also use %-encoding.
+
+		[http::]>ru	Request URL received from the client (or computed)
+
+				Computed URLs are URIs of internally generated
+				requests and various "error:..." URIs.
+
+				Unlike %ru, this request URI is not affected
+				by request adaptation, URL rewriting services,
+				and strip_query_terms.
+
+				Honors uri_whitespace.
+
+				This field is using pass-through URL encoding
+				by default. Encoding this field using other
+				variants of %-encoding will clash with
+				uri_whitespace modifications that also use
+				%-encoding.
+
 		[http::]<ru	Request URL sent to server or peer
 		[http::]>rs	Request URL scheme from client
 		[http::]<rs	Request URL scheme sent to server or peer
@@ -5321,11 +5393,13 @@
 DEFAULT: 20 startup=0 idle=1 concurrency=0
 LOC: Config.redirectChildren
 DOC_START
-	The maximum number of redirector processes to spawn. If you limit
-	it too few Squid will have to wait for them to process a backlog of
-	URLs, slowing it down. If you allow too many they will use RAM
-	and other system resources noticably.
-	
+	Specifies the maximum number of redirector processes that Squid may
+	spawn (numberofchildren) and several related options. Using too few of
+	these helper processes (a.k.a. "helpers") creates request queues.
+	Using too many helpers wastes your system resources.
+
+	Usage: numberofchildren [option]...
+
 	The startup= and idle= options allow some measure of skew in your
 	tuning.
 	
@@ -5358,13 +5432,16 @@
 
 		queue-size=N
 
-	Sets the maximum number of queued requests to N. The default maximum
-	is 2*numberofchildren. If the queued requests exceed queue size and
-	redirector_bypass configuration option is set, then redirector is bypassed.
-	Otherwise, Squid is allowed to temporarily exceed the configured maximum,
-	marking the affected helper as "overloaded". If the helper overload lasts
-	more than 3 minutes, the action prescribed by the on-persistent-overload
-	option applies.
+	Sets the maximum number of queued requests. A request is queued when
+	no existing child can accept it due to concurrency limit and no new
+	child can be started due to numberofchildren limit. The default
+	maximum is zero if url_rewrite_bypass is enabled and
+	2*numberofchildren otherwise. If the queued requests exceed queue size
+	and redirector_bypass configuration option is set, then redirector is
+	bypassed. Otherwise, Squid is allowed to temporarily exceed the
+	configured maximum, marking the affected helper as "overloaded". If
+	the helper overload lasts more than 3 minutes, the action prescribed
+	by the on-persistent-overload option applies.
 
 		on-persistent-overload=action
 
@@ -5430,8 +5507,9 @@
 	redirectors for access control, and you enable this option,
 	users may have access to pages they should not
 	be allowed to request.
-	This options sets default queue-size option of the url_rewrite_children
-	to 0.
+
+	Enabling this option sets the default url_rewrite_children queue-size
+	option value to 0.
 DOC_END
 
 NAME: url_rewrite_extras
@@ -5545,10 +5623,12 @@
 DEFAULT: 20 startup=0 idle=1 concurrency=0
 LOC: Config.storeIdChildren
 DOC_START
-	The maximum number of StoreID helper processes to spawn. If you limit
-	it too few Squid will have to wait for them to process a backlog of
-	requests, slowing it down. If you allow too many they will use RAM
-	and other system resources noticably.
+	Specifies the maximum number of StoreID helper processes that Squid
+	may spawn (numberofchildren) and several related options. Using
+	too few of these helper processes (a.k.a. "helpers") creates request
+	queues. Using too many helpers wastes your system resources.
+
+	Usage: numberofchildren [option]...
 	
 	The startup= and idle= options allow some measure of skew in your
 	tuning.
@@ -5582,13 +5662,15 @@
 
 		queue-size=N
 
-	Sets the maximum number of queued requests to N. The default maximum
-	is 2*numberofchildren. If the queued requests exceed queue size and
-	redirector_bypass configuration option is set, then redirector is bypassed.
-	Otherwise, Squid is allowed to temporarily exceed the configured maximum,
-	marking the affected helper as "overloaded". If the helper overload lasts
-	more than 3 minutes, the action prescribed by the on-persistent-overload
-	option applies.
+	Sets the maximum number of queued requests to N. A request is queued
+	when no existing child can accept it due to concurrency limit and no
+	new child can be started due to numberofchildren limit. The default
+	maximum is 2*numberofchildren. If the queued requests exceed queue
+	size and redirector_bypass configuration option is set, then
+	redirector is bypassed. Otherwise, Squid is allowed to temporarily
+	exceed the configured maximum, marking the affected helper as
+	"overloaded". If the helper overload lasts more than 3 minutes, the
+	action prescribed by the on-persistent-overload option applies.
 
 		on-persistent-overload=action
 
diff -u -r -N squid-4.1/src/clients/FtpGateway.cc squid-4.2/src/clients/FtpGateway.cc
--- squid-4.1/src/clients/FtpGateway.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/clients/FtpGateway.cc	2018-08-06 02:13:41.000000000 +1200
@@ -10,6 +10,7 @@
 
 #include "squid.h"
 #include "acl/FilledChecklist.h"
+#include "base/PackableStream.h"
 #include "clients/forward.h"
 #include "clients/FtpClient.h"
 #include "comm.h"
@@ -131,7 +132,7 @@
     void unhack();
     void readStor();
     void parseListing();
-    MemBuf *htmlifyListEntry(const char *line);
+    bool htmlifyListEntry(const char *line, PackableStream &);
     void completedListing(void);
 
     /// create a data channel acceptor and start listening.
@@ -763,53 +764,37 @@
     return p;
 }
 
-MemBuf *
-Ftp::Gateway::htmlifyListEntry(const char *line)
+bool
+Ftp::Gateway::htmlifyListEntry(const char *line, PackableStream &html)
 {
-    char icon[2048];
-    char href[2048 + 40];
-    char text[ 2048];
-    char size[ 2048];
-    char chdir[ 2048 + 40];
-    char view[ 2048 + 40];
-    char download[ 2048 + 40];
-    char link[ 2048 + 40];
-    MemBuf *html;
-    char prefix[2048];
-    ftpListParts *parts;
-    *icon = *href = *text = *size = *chdir = *view = *download = *link = '\0';
-
-    debugs(9, 7, HERE << " line ={" << line << "}");
+    debugs(9, 7, "line={" << line << "}");
 
     if (strlen(line) > 1024) {
-        html = new MemBuf();
-        html->init();
-        html->appendf("<tr><td colspan=\"5\">%s</td></tr>\n", line);
-        return html;
+        html << "<tr><td colspan=\"5\">" << line << "</td></tr>\n";
+        return true;
     }
 
-    if (flags.dir_slash && dirpath && typecode != 'D')
-        snprintf(prefix, 2048, "%s/", rfc1738_escape_part(dirpath));
-    else
-        prefix[0] = '\0';
-
-    if ((parts = ftpListParseParts(line, flags)) == NULL) {
-        const char *p;
+    SBuf prefix;
+    if (flags.dir_slash && dirpath && typecode != 'D') {
+        prefix.append(rfc1738_escape_part(dirpath));
+        prefix.append("/", 1);
+    }
 
-        html = new MemBuf();
-        html->init();
-        html->appendf("<tr class=\"entry\"><td colspan=\"5\">%s</td></tr>\n", line);
+    ftpListParts *parts = ftpListParseParts(line, flags);
+    if (!parts) {
+        html << "<tr class=\"entry\"><td colspan=\"5\">" << line << "</td></tr>\n";
 
+        const char *p;
         for (p = line; *p && xisspace(*p); ++p);
         if (*p && !xisspace(*p))
             flags.listformat_unknown = 1;
 
-        return html;
+        return true;
     }
 
     if (!strcmp(parts->name, ".") || !strcmp(parts->name, "..")) {
         ftpListPartsFree(&parts);
-        return NULL;
+        return false;
     }
 
     parts->size += 1023;
@@ -817,87 +802,82 @@
     parts->showname = xstrdup(parts->name);
 
     /* {icon} {text} . . . {date}{size}{chdir}{view}{download}{link}\n  */
-    xstrncpy(href, rfc1738_escape_part(parts->name), 2048);
+    SBuf href(prefix);
+    href.append(rfc1738_escape_part(parts->name));
 
-    xstrncpy(text, parts->showname, 2048);
+    SBuf text(parts->showname);
 
+    SBuf icon, size, chdir, link;
     switch (parts->type) {
 
     case 'd':
-        snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
-                 mimeGetIconURL("internal-dir"),
-                 "[DIR]");
-        strcat(href, "/");  /* margin is allocated above */
+        icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
+                     mimeGetIconURL("internal-dir"),
+                     "[DIR]");
+        href.append("/", 1);  /* margin is allocated above */
         break;
 
     case 'l':
-        snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
-                 mimeGetIconURL("internal-link"),
-                 "[LINK]");
+        icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
+                     mimeGetIconURL("internal-link"),
+                     "[LINK]");
         /* sometimes there is an 'l' flag, but no "->" link */
 
         if (parts->link) {
-            char *link2 = xstrdup(html_quote(rfc1738_escape(parts->link)));
-            snprintf(link, 2048, " -&gt; <a href=\"%s%s\">%s</a>",
-                     *link2 != '/' ? prefix : "", link2,
-                     html_quote(parts->link));
-            safe_free(link2);
+            SBuf link2(html_quote(rfc1738_escape(parts->link)));
+            link.appendf(" -&gt; <a href=\"%s" SQUIDSBUFPH "\">%s</a>",
+                         link2[0] != '/' ? prefix.c_str() : "", SQUIDSBUFPRINT(link2),
+                         html_quote(parts->link));
         }
 
         break;
 
     case '\0':
-        snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
-                 mimeGetIconURL(parts->name),
-                 "[UNKNOWN]");
-        snprintf(chdir, 2048, "<a href=\"%s/;type=d\"><img border=\"0\" src=\"%s\" "
-                 "alt=\"[DIR]\"></a>",
-                 rfc1738_escape_part(parts->name),
-                 mimeGetIconURL("internal-dir"));
+        icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
+                     mimeGetIconURL(parts->name),
+                     "[UNKNOWN]");
+        chdir.appendf("<a href=\"%s/;type=d\"><img border=\"0\" src=\"%s\" "
+                      "alt=\"[DIR]\"></a>",
+                      rfc1738_escape_part(parts->name),
+                      mimeGetIconURL("internal-dir"));
         break;
 
     case '-':
 
     default:
-        snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
-                 mimeGetIconURL(parts->name),
-                 "[FILE]");
-        snprintf(size, 2048, " %6" PRId64 "k", parts->size);
+        icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
+                     mimeGetIconURL(parts->name),
+                     "[FILE]");
+        size.appendf(" %6" PRId64 "k", parts->size);
         break;
     }
 
+    SBuf view, download;
     if (parts->type != 'd') {
         if (mimeGetViewOption(parts->name)) {
-            snprintf(view, 2048, "<a href=\"%s%s;type=a\"><img border=\"0\" src=\"%s\" "
-                     "alt=\"[VIEW]\"></a>",
-                     prefix, href, mimeGetIconURL("internal-view"));
+            view.appendf("<a href=\"" SQUIDSBUFPH ";type=a\"><img border=\"0\" src=\"%s\" "
+                         "alt=\"[VIEW]\"></a>",
+                         SQUIDSBUFPRINT(href), mimeGetIconURL("internal-view"));
         }
 
         if (mimeGetDownloadOption(parts->name)) {
-            snprintf(download, 2048, "<a href=\"%s%s;type=i\"><img border=\"0\" src=\"%s\" "
-                     "alt=\"[DOWNLOAD]\"></a>",
-                     prefix, href, mimeGetIconURL("internal-download"));
+            download.appendf("<a href=\"" SQUIDSBUFPH ";type=i\"><img border=\"0\" src=\"%s\" "
+                             "alt=\"[DOWNLOAD]\"></a>",
+                             SQUIDSBUFPRINT(href), mimeGetIconURL("internal-download"));
         }
     }
 
     /* construct the table row from parts. */
-    html = new MemBuf();
-    html->init();
-    html->appendf("<tr class=\"entry\">"
-                  "<td class=\"icon\"><a href=\"%s%s\">%s</a></td>"
-                  "<td class=\"filename\"><a href=\"%s%s\">%s</a></td>"
-                  "<td class=\"date\">%s</td>"
-                  "<td class=\"size\">%s</td>"
-                  "<td class=\"actions\">%s%s%s%s</td>"
-                  "</tr>\n",
-                  prefix, href, icon,
-                  prefix, href, html_quote(text),
-                  parts->date,
-                  size,
-                  chdir, view, download, link);
+    html << "<tr class=\"entry\">"
+         "<td class=\"icon\"><a href=\"" << href << "\">" << icon << "</a></td>"
+         "<td class=\"filename\"><a href=\"" << href << "\">" << html_quote(text.c_str()) << "</a></td>"
+         "<td class=\"date\">" << parts->date << "</td>"
+         "<td class=\"size\">" << size << "</td>"
+         "<td class=\"actions\">" << chdir << view << download << link << "</td>"
+         "</tr>\n";
 
     ftpListPartsFree(&parts);
-    return html;
+    return true;
 }
 
 void
@@ -908,7 +888,6 @@
     char *end;
     char *line;
     char *s;
-    MemBuf *t;
     size_t linelen;
     size_t usable;
     size_t len = data.readBuf->contentSize();
@@ -968,12 +947,14 @@
         if (!strncmp(line, "total", 5))
             continue;
 
-        t = htmlifyListEntry(line);
-
-        if ( t != NULL) {
-            debugs(9, 7, HERE << "listing append: t = {" << t->contentSize() << ", '" << t->content() << "'}");
-            listing.append(t->content(), t->contentSize());
-            delete t;
+        MemBuf htmlPage;
+        htmlPage.init();
+        PackableStream html(htmlPage);
+
+        if (htmlifyListEntry(line, html)) {
+            html.flush();
+            debugs(9, 7, "listing append: t = {" << htmlPage.contentSize() << ", '" << htmlPage.content() << "'}");
+            listing.append(htmlPage.content(), htmlPage.contentSize());
         }
     }
 
diff -u -r -N squid-4.1/src/client_side.cc squid-4.2/src/client_side.cc
--- squid-4.1/src/client_side.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/client_side.cc	2018-08-06 02:13:41.000000000 +1200
@@ -103,7 +103,6 @@
 #include "mime_header.h"
 #include "parser/Tokenizer.h"
 #include "profiler/Profiler.h"
-#include "rfc1738.h"
 #include "security/NegotiationHistory.h"
 #include "servers/forward.h"
 #include "SquidConfig.h"
@@ -473,10 +472,9 @@
 ClientHttpRequest::freeResources()
 {
     safe_free(uri);
-    safe_free(log_uri);
     safe_free(redirect.location);
     range_iter.boundary.clean();
-    HTTPMSGUNLOCK(request);
+    clearRequest();
 
     if (client_stream.tail)
         clientStreamAbort((clientStreamNode *)client_stream.tail->data, this);
@@ -1011,8 +1009,7 @@
 {
     ClientHttpRequest *http = new ClientHttpRequest(this);
     http->req_sz = inBuf.length();
-    http->uri = xstrdup(uri);
-    setLogUri (http, uri);
+    http->setErrorUri(uri);
     auto *context = new Http::Stream(clientConnection, http);
     StoreIOBuffer tempBuffer;
     tempBuffer.data = context->reqbuf;
@@ -1084,57 +1081,6 @@
     return NULL;
 }
 
-void
-setLogUri(ClientHttpRequest * http, char const *uri, bool cleanUrl)
-{
-    safe_free(http->log_uri);
-
-    if (!cleanUrl)
-        // The uri is already clean just dump it.
-        http->log_uri = xstrndup(uri, MAX_URL);
-    else {
-        int flags = 0;
-        switch (Config.uri_whitespace) {
-        case URI_WHITESPACE_ALLOW:
-            flags |= RFC1738_ESCAPE_NOSPACE;
-
-        case URI_WHITESPACE_ENCODE:
-            flags |= RFC1738_ESCAPE_UNESCAPED;
-            http->log_uri = xstrndup(rfc1738_do_escape(uri, flags), MAX_URL);
-            break;
-
-        case URI_WHITESPACE_CHOP: {
-            flags |= RFC1738_ESCAPE_NOSPACE;
-            flags |= RFC1738_ESCAPE_UNESCAPED;
-            http->log_uri = xstrndup(rfc1738_do_escape(uri, flags), MAX_URL);
-            int pos = strcspn(http->log_uri, w_space);
-            http->log_uri[pos] = '\0';
-        }
-        break;
-
-        case URI_WHITESPACE_DENY:
-        case URI_WHITESPACE_STRIP:
-        default: {
-            const char *t;
-            char *tmp_uri = static_cast<char*>(xmalloc(strlen(uri) + 1));
-            char *q = tmp_uri;
-            t = uri;
-            while (*t) {
-                if (!xisspace(*t)) {
-                    *q = *t;
-                    ++q;
-                }
-                ++t;
-            }
-            *q = '\0';
-            http->log_uri = xstrndup(rfc1738_escape_unescaped(tmp_uri), MAX_URL);
-            xfree(tmp_uri);
-        }
-        break;
-        }
-    }
-}
-
 static void
 prepareAcceleratedURL(ConnStateData * conn, ClientHttpRequest *http, const Http1::RequestParserPointer &hp)
 {
@@ -1498,12 +1444,6 @@
         debugs(33, 5, "Responding with delated error for " << http->uri);
         repContext->setReplyToStoreEntry(sslServerBump->entry, "delayed SslBump error");
 
-        // save the original request for logging purposes
-        if (!context->http->al->request) {
-            context->http->al->request = http->request;
-            HTTPMSGLOCK(context->http->al->request);
-        }
-
         // Get error details from the fake certificate-peeking request.
         http->request->detailError(sslServerBump->request->errType, sslServerBump->request->errDetail);
         context->pullData();
@@ -1546,11 +1486,6 @@
                     SQUID_X509_V_ERR_DOMAIN_MISMATCH,
                     srvCert.get(), nullptr);
                 err->detail = errDetail;
-                // Save the original request for logging purposes.
-                if (!context->http->al->request) {
-                    context->http->al->request = request;
-                    HTTPMSGLOCK(context->http->al->request);
-                }
                 repContext->setReplyToError(request->method, err);
                 assert(context->http->out.offset == 0);
                 context->pullData();
@@ -1660,12 +1595,12 @@
             request->url.host(internalHostname());
             request->url.port(getMyPort());
             http->flags.internal = true;
+            http->setLogUriToRequestUri();
         } else
             debugs(33, 2, "internal URL found: " << request->url.getScheme() << "://" << request->url.authority(true) << " (not this proxy)");
     }
 
     request->flags.internal = http->flags.internal;
-    setLogUri (http, urlCanonicalClean(request.getRaw()));
 
     if (!isFtp) {
         // XXX: for non-HTTP messages instantiate a different HttpMsg child type
@@ -2463,10 +2398,11 @@
 #if USE_DELAY_POOLS
     fd_table[clientConnection->fd].clientInfo = NULL;
 
-    if (Config.onoff.client_db) {
-        /* it was said several times that client write limiter does not work if client_db is disabled */
+    if (!Config.onoff.client_db)
+        return; // client delay pools require client_db
 
-        ClientDelayPools& pools(Config.ClientDelay.pools);
+    ClientDelayPools& pools(Config.ClientDelay.pools);
+    if (pools.size()) {
         ACLFilledChecklist ch(NULL, NULL, NULL);
 
         // TODO: we check early to limit error response bandwith but we
@@ -3187,8 +3123,7 @@
     }
 
     // We should disable read/write handlers
-    Comm::SetSelect(clientConnection->fd, COMM_SELECT_READ, NULL, NULL, 0);
-    Comm::SetSelect(clientConnection->fd, COMM_SELECT_WRITE, NULL, NULL, 0);
+    Comm::ResetSelect(clientConnection->fd);
 
     if (unsupportedProtocol) {
         Http::StreamPointer context = pipeline.front();
@@ -3468,8 +3403,7 @@
     request->method = method;
     request->url.host(useHost.c_str());
     request->url.port(usePort);
-    http->request = request.getRaw();
-    HTTPMSGLOCK(http->request);
+    http->initRequest(request.getRaw());
 
     request->manager(this, http->al);
 
@@ -3485,7 +3419,6 @@
     inBuf = payload;
     flags.readMore = false;
 
-    setLogUri(http, urlCanonicalClean(request.getRaw()));
     return http;
 }
 
@@ -4154,9 +4087,7 @@
     ClientHttpRequest http(this);
     http.req_sz = inBuf.length();
     // XXX: Or we died while waiting for the pinned connection to become idle.
-    char const *uri = "error:transaction-end-before-headers";
-    http.uri = xstrdup(uri);
-    setLogUri(&http, uri);
+    http.setErrorUri("error:transaction-end-before-headers");
 }
 
 bool
diff -u -r -N squid-4.1/src/client_side.h squid-4.2/src/client_side.h
--- squid-4.1/src/client_side.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/client_side.h	2018-08-06 02:13:41.000000000 +1200
@@ -412,8 +412,6 @@
     SBuf connectionTag_; ///< clt_conn_tag=Tag annotation for client connection
 };
 
-void setLogUri(ClientHttpRequest * http, char const *uri, bool cleanUrl = false);
-
 const char *findTrailingHTTPVersion(const char *uriAndHTTPVersion, const char *end = NULL);
 
 int varyEvaluateMatch(StoreEntry * entry, HttpRequest * req);
diff -u -r -N squid-4.1/src/client_side_reply.cc squid-4.2/src/client_side_reply.cc
--- squid-4.1/src/client_side_reply.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/client_side_reply.cc	2018-08-06 02:13:41.000000000 +1200
@@ -1443,13 +1443,8 @@
              */
             /* TODO: if maxage or s-maxage is present, don't do this */
 
-            if (squid_curtime - http->storeEntry()->timestamp >= 86400) {
-                char tbuf[512];
-                snprintf (tbuf, sizeof(tbuf), "%s %s %s",
-                          "113", ThisCache,
-                          "This cache hit is still fresh and more than 1 day old");
-                hdr->putStr(Http::HdrType::WARNING, tbuf);
-            }
+            if (squid_curtime - http->storeEntry()->timestamp >= 86400)
+                hdr->putWarning(113, "This cache hit is still fresh and more than 1 day old");
         }
     }
 
@@ -2266,7 +2261,10 @@
 
     if (http->request == NULL) {
         const MasterXaction::Pointer mx = new MasterXaction(XactionInitiator::initClient);
-        http->request = new HttpRequest(m, AnyP::PROTO_NONE, "http", null_string, mx);
+        // XXX: These fake URI parameters shadow the real (or error:...) URI.
+        // TODO: Either always set the request earlier and assert here OR use
+        // http->uri (converted to Anyp::Uri) to create this catch-all request.
+        const_cast<HttpRequest *&>(http->request) =  new HttpRequest(m, AnyP::PROTO_NONE, "http", null_string, mx);
         HTTPMSGLOCK(http->request);
     }
 
diff -u -r -N squid-4.1/src/client_side_request.cc squid-4.2/src/client_side_request.cc
--- squid-4.1/src/client_side_request.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/client_side_request.cc	2018-08-06 02:13:41.000000000 +1200
@@ -48,6 +48,7 @@
 #include "Parsing.h"
 #include "profiler/Profiler.h"
 #include "redirect.h"
+#include "rfc1738.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
 #include "Store.h"
@@ -358,8 +359,6 @@
     if (header)
         request->header.update(header);
 
-    http->log_uri = xstrdup(urlCanonicalClean(request));
-
     /* http struct now ready */
 
     /*
@@ -390,8 +389,7 @@
 
     request->http_ver = Http::ProtocolVersion();
 
-    http->request = request;
-    HTTPMSGLOCK(http->request);
+    http->initRequest(request);
 
     /* optional - skip the access check ? */
     http->calloutContext = new ClientRequestContext(http);
@@ -1279,12 +1277,8 @@
                                " from request " << old_request << " to " << new_request);
                     }
 
-                    // update the current working ClientHttpRequest fields
-                    xfree(http->uri);
-                    http->uri = SBufToCstring(new_request->effectiveRequestUri());
-                    HTTPMSGUNLOCK(old_request);
-                    http->request = new_request;
-                    HTTPMSGLOCK(http->request);
+                    http->resetRequest(new_request);
+                    old_request = nullptr;
                 } else {
                     debugs(85, DBG_CRITICAL, "ERROR: URL-rewrite produces invalid request: " <<
                            old_request->method << " " << urlNote << " " << old_request->http_ver);
@@ -1654,6 +1648,56 @@
         loggingEntry_->lock("ClientHttpRequest::loggingEntry");
 }
 
+void
+ClientHttpRequest::initRequest(HttpRequest *aRequest)
+{
+    assignRequest(aRequest);
+    if (const auto csd = getConn()) {
+        if (!csd->connectionTag().isEmpty()) {
+            if (!request->notes)
+                request->notes = new NotePairs;
+            // TODO: assert if "clt_conn_tag" already added?
+            request->notes->add("clt_conn_tag", SBuf(csd->connectionTag()).c_str());
+        }
+    }
+    // al is created in the constructor
+    assert(al);
+    if (!al->request) {
+        al->request = request;
+        HTTPMSGLOCK(al->request);
+        (void)SyncNotes(*al, *request);
+    }
+}
+
+void
+ClientHttpRequest::resetRequest(HttpRequest *newRequest)
+{
+    assert(request != newRequest);
+    clearRequest();
+    assignRequest(newRequest);
+    xfree(uri);
+    uri = SBufToCstring(request->effectiveRequestUri());
+}
+
+void
+ClientHttpRequest::assignRequest(HttpRequest *newRequest)
+{
+    assert(newRequest);
+    assert(!request);
+    const_cast<HttpRequest *&>(request) = newRequest;
+    HTTPMSGLOCK(request);
+    setLogUriToRequestUri();
+}
+
+void
+ClientHttpRequest::clearRequest()
+{
+    HttpRequest *oldRequest = request;
+    HTTPMSGUNLOCK(oldRequest);
+    const_cast<HttpRequest *&>(request) = nullptr;
+    absorbLogUri(nullptr);
+}
+
 /*
  * doCallouts() - This function controls the order of "callout"
  * executions, including non-blocking access control checks, the
@@ -1694,19 +1738,6 @@
 {
     assert(calloutContext);
 
-    /*Save the original request for logging purposes*/
-    if (!calloutContext->http->al->request) {
-        calloutContext->http->al->request = request;
-        HTTPMSGLOCK(calloutContext->http->al->request);
-
-        NotePairs &notes = SyncNotes(*calloutContext->http->al, *calloutContext->http->request);
-        // Make the previously set client connection ID available as annotation.
-        if (ConnStateData *csd = calloutContext->http->getConn()) {
-            if (!csd->connectionTag().isEmpty())
-                notes.add("clt_conn_tag", SBuf(csd->connectionTag()).c_str());
-        }
-    }
-
     if (!calloutContext->error) {
         // CVE-2009-0801: verify the Host: header is consistent with other known details.
         if (!calloutContext->host_header_verify_done) {
@@ -1871,6 +1902,53 @@
 #endif
 }
 
+void
+ClientHttpRequest::setLogUriToRequestUri()
+{
+    assert(request);
+    const auto canonicalUri = request->canonicalCleanUrl();
+    absorbLogUri(xstrndup(canonicalUri, MAX_URL));
+}
+
+void
+ClientHttpRequest::setLogUriToRawUri(const char *rawUri, const HttpRequestMethod &method)
+{
+    assert(rawUri);
+    // Should(!request);
+
+    // TODO: SBuf() performance regression, fix by converting rawUri to SBuf
+    char *canonicalUri = urlCanonicalCleanWithoutRequest(SBuf(rawUri), method, AnyP::UriScheme());
+
+    absorbLogUri(AnyP::Uri::cleanup(canonicalUri));
+
+    char *cleanedRawUri = AnyP::Uri::cleanup(rawUri);
+    al->setVirginUrlForMissingRequest(SBuf(cleanedRawUri));
+    xfree(cleanedRawUri);
+}
+
+void
+ClientHttpRequest::absorbLogUri(char *aUri)
+{
+    xfree(log_uri);
+    const_cast<char *&>(log_uri) = aUri;
+}
+
+void
+ClientHttpRequest::setErrorUri(const char *aUri)
+{
+    assert(!uri);
+    assert(aUri);
+    // Should(!request);
+
+    uri = xstrdup(aUri);
+    // TODO: SBuf() performance regression, fix by converting setErrorUri() parameter to SBuf
+    const SBuf errorUri(aUri);
+    const auto canonicalUri = urlCanonicalCleanWithoutRequest(errorUri, HttpRequestMethod(), AnyP::UriScheme());
+    absorbLogUri(xstrndup(canonicalUri, MAX_URL));
+
+    al->setVirginUrlForMissingRequest(errorUri);
+}
+
 #if !_USE_INLINE_
 #include "client_side_request.cci"
 #endif
@@ -1919,23 +1997,11 @@
     assert(msg);
 
     if (HttpRequest *new_req = dynamic_cast<HttpRequest*>(msg)) {
-        /*
-         * Replace the old request with the new request.
-         */
-        HTTPMSGUNLOCK(request);
-        request = new_req;
-        HTTPMSGLOCK(request);
 
         // update the new message to flag whether URL re-writing was done on it
-        if (request->effectiveRequestUri().cmp(uri) != 0)
-            request->flags.redirected = 1;
-
-        /*
-         * Store the new URI for logging
-         */
-        xfree(uri);
-        uri = SBufToCstring(request->effectiveRequestUri());
-        setLogUri(this, urlCanonicalClean(request));
+        if (request->effectiveRequestUri() != new_req->effectiveRequestUri())
+            new_req->flags.redirected = true;
+        resetRequest(new_req);
         assert(request->method.id());
     } else if (HttpReply *new_rep = dynamic_cast<HttpReply*>(msg)) {
         debugs(85,3,HERE << "REQMOD reply is HTTP reply");
diff -u -r -N squid-4.1/src/client_side_request.h squid-4.2/src/client_side_request.h
--- squid-4.1/src/client_side_request.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/client_side_request.h	2018-08-06 02:13:41.000000000 +1200
@@ -63,14 +63,37 @@
     _SQUID_INLINE_ ConnStateData * getConn() const;
     _SQUID_INLINE_ void setConn(ConnStateData *);
 
+    /// Initializes the current request with the virgin request.
+    /// Call this method when the virgin request becomes known.
+    /// To update the current request later, use resetRequest().
+    void initRequest(HttpRequest *);
+
+    /// Resets the current request to the latest adapted or redirected
+    /// request. Call this every time adaptation or redirection changes
+    /// the request. To set the virgin request, use initRequest().
+    void resetRequest(HttpRequest *);
+
     /** Details of the client socket which produced us.
      * Treat as read-only for the lifetime of this HTTP request.
      */
     Comm::ConnectionPointer clientConnection;
 
-    HttpRequest *request;       /* Parsed URL ... */
+    /// Request currently being handled by ClientHttpRequest.
+    /// Starts as a virgin request; see initRequest().
+    /// Usually remains nil until the virgin request header is parsed or faked.
+    /// Adaptation and redirections replace it; see resetRequest().
+    HttpRequest * const request;
+    /// Usually starts as a URI received from the client, with scheme and host
+    /// added if needed. Is used to create the virgin request for initRequest().
+    /// URIs of adapted/redirected requests replace it via resetRequest().
     char *uri;
-    char *log_uri;
+
+    // TODO: remove this field and store the URI directly in al->url
+    /// Cleaned up URI of the current (virgin or adapted/redirected) request,
+    /// computed URI of an internally-generated requests, or
+    /// one of the hard-coded "error:..." URIs.
+    char * const log_uri;
+
     String store_id; /* StoreID for transactions where the request member is nil */
 
     struct Out {
@@ -113,6 +136,18 @@
     ClientRequestContext *calloutContext;
     void doCallouts();
 
+    // The three methods below prepare log_uri and friends for future logging.
+    // Call the best-fit method whenever the current request or its URI changes.
+
+    /// sets log_uri when we know the current request
+    void setLogUriToRequestUri();
+    /// sets log_uri to a parsed request URI when Squid fails to parse or
+    /// validate other request components, yielding no current request
+    void setLogUriToRawUri(const char *rawUri, const HttpRequestMethod &);
+    /// sets log_uri and uri to an internally-generated "error:..." URI when
+    /// neither the current request nor the parsed request URI are known
+    void setErrorUri(const char *errorUri);
+
     /// Build an error reply. For use with the callouts.
     void calloutsError(const err_type error, const int errDetail);
 
@@ -126,6 +161,14 @@
 #endif
 
 private:
+    /// assigns log_uri with aUri without copying the entire C-string
+    void absorbLogUri(char *aUri);
+    /// resets the current request and log_uri to nil
+    void clearRequest();
+    /// initializes the current unassigned request to the virgin request
+    /// sets the current request, asserting that it was unset
+    void assignRequest(HttpRequest *aRequest);
+
     int64_t maxReplyBodySize_;
     StoreEntry *entry_;
     StoreEntry *loggingEntry_;
diff -u -r -N squid-4.1/src/comm/Loops.h squid-4.2/src/comm/Loops.h
--- squid-4.1/src/comm/Loops.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/comm/Loops.h	2018-08-06 02:13:41.000000000 +1200
@@ -11,6 +11,7 @@
 
 #include "comm/Flag.h"
 #include "comm/forward.h"
+#include "defines.h"
 
 /* Comm layer select loops API.
  *
@@ -28,7 +29,11 @@
 void SetSelect(int, unsigned int, PF *, void *, time_t);
 
 /// reset/undo/unregister the watch for an FD which was set by Comm::SetSelect()
-void ResetSelect(int);
+inline void
+ResetSelect(int fd)
+{
+    SetSelect(fd, COMM_SELECT_READ|COMM_SELECT_WRITE, nullptr, nullptr, 0);
+}
 
 /** Perform a select() or equivalent call.
  * This is used by the main select loop engine to check for FD with IO available.
diff -u -r -N squid-4.1/src/comm/ModDevPoll.cc squid-4.2/src/comm/ModDevPoll.cc
--- squid-4.1/src/comm/ModDevPoll.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/comm/ModDevPoll.cc	2018-08-06 02:13:41.000000000 +1200
@@ -296,17 +296,6 @@
         F->timeout = squid_curtime + timeout;
 }
 
-/** \brief Clear polling of file handle (both read and write)
- *
- * @param fd file descriptor to clear polling on
- */
-void
-Comm::ResetSelect(int fd)
-{
-    SetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
-    SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
-}
-
 /** \brief Do poll and trigger callback functions as appropriate
  *
  * Check all connections for new connections and input data that is to be
diff -u -r -N squid-4.1/src/comm/ModEpoll.cc squid-4.2/src/comm/ModEpoll.cc
--- squid-4.1/src/comm/ModEpoll.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/comm/ModEpoll.cc	2018-08-06 02:13:41.000000000 +1200
@@ -180,14 +180,6 @@
         F->timeout = squid_curtime + timeout;
 }
 
-void
-Comm::ResetSelect(int fd)
-{
-    fde *F = &fd_table[fd];
-    F->epoll_state = 0;
-    SetSelect(fd, 0, NULL, NULL, 0);
-}
-
 static void commIncomingStats(StoreEntry * sentry);
 
 static void
diff -u -r -N squid-4.1/src/comm/ModKqueue.cc squid-4.2/src/comm/ModKqueue.cc
--- squid-4.1/src/comm/ModKqueue.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/comm/ModKqueue.cc	2018-08-06 02:13:41.000000000 +1200
@@ -168,7 +168,7 @@
 {
     fde *F = &fd_table[fd];
     assert(fd >= 0);
-    assert(F->flags.open);
+    assert(F->flags.open || (!handler && !client_data && !timeout));
     debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
            ", handler=" << handler << ", client_data=" << client_data <<
            ", timeout=" << timeout);
@@ -194,18 +194,6 @@
 
 }
 
-void
-Comm::ResetSelect(int fd)
-{
-    fde *F = &fd_table[fd];
-    if (F->read_handler) {
-        kq_update_events(fd, EVFILT_READ, (PF *)1);
-    }
-    if (F->write_handler) {
-        kq_update_events(fd, EVFILT_WRITE, (PF *)1);
-    }
-}
-
 /*
  * Check all connections for new connections and input data that is to be
  * processed. Also check for connections with data queued and whether we can
diff -u -r -N squid-4.1/src/comm/ModPoll.cc squid-4.2/src/comm/ModPoll.cc
--- squid-4.1/src/comm/ModPoll.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/comm/ModPoll.cc	2018-08-06 02:13:41.000000000 +1200
@@ -125,7 +125,7 @@
 {
     fde *F = &fd_table[fd];
     assert(fd >= 0);
-    assert(F->flags.open);
+    assert(F->flags.open || (!handler && !client_data && !timeout));
     debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
            ", handler=" << handler << ", client_data=" << client_data <<
            ", timeout=" << timeout);
@@ -144,11 +144,6 @@
         F->timeout = squid_curtime + timeout;
 }
 
-void
-Comm::ResetSelect(int fd)
-{
-}
-
 static int
 fdIsUdpListen(int fd)
 {
diff -u -r -N squid-4.1/src/comm/ModSelect.cc squid-4.2/src/comm/ModSelect.cc
--- squid-4.1/src/comm/ModSelect.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/comm/ModSelect.cc	2018-08-06 02:13:41.000000000 +1200
@@ -124,7 +124,7 @@
 {
     fde *F = &fd_table[fd];
     assert(fd >= 0);
-    assert(F->flags.open);
+    assert(F->flags.open || (!handler && !client_data && !timeout));
     debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
            ", handler=" << handler << ", client_data=" << client_data <<
            ", timeout=" << timeout);
@@ -145,11 +145,6 @@
         F->timeout = squid_curtime + timeout;
 }
 
-void
-Comm::ResetSelect(int fd)
-{
-}
-
 static int
 fdIsUdpListener(int fd)
 {
diff -u -r -N squid-4.1/src/comm/ModSelectWin32.cc squid-4.2/src/comm/ModSelectWin32.cc
--- squid-4.1/src/comm/ModSelectWin32.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/comm/ModSelectWin32.cc	2018-08-06 02:13:41.000000000 +1200
@@ -118,7 +118,7 @@
 {
     fde *F = &fd_table[fd];
     assert(fd >= 0);
-    assert(F->flags.open);
+    assert(F->flags.open || (!handler && !client_data && !timeout));
     debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
            ", handler=" << handler << ", client_data=" << client_data <<
            ", timeout=" << timeout);
@@ -139,11 +139,6 @@
         F->timeout = squid_curtime + timeout;
 }
 
-void
-Comm::ResetSelect(int fd)
-{
-}
-
 static int
 fdIsUdpListener(int fd)
 {
diff -u -r -N squid-4.1/src/comm/TcpAcceptor.cc squid-4.2/src/comm/TcpAcceptor.cc
--- squid-4.1/src/comm/TcpAcceptor.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/comm/TcpAcceptor.cc	2018-08-06 02:13:41.000000000 +1200
@@ -264,6 +264,7 @@
     AccessLogEntry::Pointer al = new AccessLogEntry;
     al->tcpClient = conn;
     al->url = "error:accept-client-connection";
+    al->setVirginUrlForMissingRequest(al->url);
     ACLFilledChecklist ch(nullptr, nullptr, nullptr);
     ch.src_addr = conn->remote;
     ch.my_addr = conn->local;
diff -u -r -N squid-4.1/src/debug.cc squid-4.2/src/debug.cc
--- squid-4.1/src/debug.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/debug.cc	2018-08-06 02:13:41.000000000 +1200
@@ -572,23 +572,27 @@
     time_t t = getCurrentTime();
 
     struct tm *tm;
-    static char buf[128];
+    static char buf[128]; // arbitrary size, big enough for the below timestamp strings.
     static time_t last_t = 0;
 
     if (Debug::Level() > 1) {
-        char buf2[128];
+        // 4 bytes smaller than buf to ensure .NNN catenation by snprintf()
+        // is safe and works even if strftime() fills its buffer.
+        char buf2[sizeof(buf)-4];
         tm = localtime(&t);
-        strftime(buf2, 127, "%Y/%m/%d %H:%M:%S", tm);
-        buf2[127] = '\0';
-        snprintf(buf, 127, "%s.%03d", buf2, (int) current_time.tv_usec / 1000);
+        strftime(buf2, sizeof(buf2), "%Y/%m/%d %H:%M:%S", tm);
+        buf2[sizeof(buf2)-1] = '\0';
+        const int sz = snprintf(buf, sizeof(buf), "%s.%03d", buf2, static_cast<int>(current_time.tv_usec / 1000));
+        assert(0 < sz && sz < static_cast<int>(sizeof(buf)));
         last_t = t;
     } else if (t != last_t) {
         tm = localtime(&t);
-        strftime(buf, 127, "%Y/%m/%d %H:%M:%S", tm);
+        const int sz = strftime(buf, sizeof(buf), "%Y/%m/%d %H:%M:%S", tm);
+        assert(0 < sz && sz <= static_cast<int>(sizeof(buf)));
         last_t = t;
     }
 
-    buf[127] = '\0';
+    buf[sizeof(buf)-1] = '\0';
     return buf;
 }
 
diff -u -r -N squid-4.1/src/dlink.h squid-4.2/src/dlink.h
--- squid-4.1/src/dlink.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/dlink.h	2018-08-06 02:13:41.000000000 +1200
@@ -15,20 +15,16 @@
 {
     MEMPROXY_CLASS(dlink_node);
 public:
-    dlink_node() : data(nullptr), prev(nullptr), next(nullptr) {}
-
-    void *data;
-    dlink_node *prev;
-    dlink_node *next;
+    void *data = nullptr;
+    dlink_node *prev = nullptr;
+    dlink_node *next = nullptr;
 };
 
 class dlink_list
 {
 public:
-    dlink_list() : head(NULL), tail(NULL) {}
-
-    dlink_node *head;
-    dlink_node *tail;
+    dlink_node *head = nullptr;
+    dlink_node *tail = nullptr;
 };
 
 extern dlink_list ClientActiveRequests;
diff -u -r -N squid-4.1/src/dns_internal.cc squid-4.2/src/dns_internal.cc
--- squid-4.1/src/dns_internal.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/dns_internal.cc	2018-08-06 02:13:41.000000000 +1200
@@ -96,8 +96,6 @@
     "Bad OPT Version or TSIG Signature Failure"
 };
 
-typedef struct _ns ns;
-
 typedef struct _sp sp;
 
 class idns_query
@@ -125,7 +123,6 @@
         ancount(0),
         error(NULL)
     {
-        memset(&hash, 0, sizeof(hash));
         memset(&query, 0, sizeof(query));
         *buf = 0;
         *name = 0;
@@ -185,29 +182,31 @@
     CBDATA_CLASS(nsvc);
 
 public:
-    explicit nsvc(int nsv) : ns(nsv), msglen(0), read_msglen(0), msg(new MemBuf()), queue(new MemBuf()), busy(true) {}
+    explicit nsvc(size_t nsv) : ns(nsv), msg(new MemBuf()), queue(new MemBuf()) {}
     ~nsvc();
 
-    int ns;
+    size_t ns = 0;
     Comm::ConnectionPointer conn;
-    unsigned short msglen;
-    int read_msglen;
+    unsigned short msglen = 0;
+    int read_msglen = 0;
     MemBuf *msg;
     MemBuf *queue;
-    bool busy;
+    bool busy = true;
 };
 
 CBDATA_CLASS_INIT(nsvc);
 
-struct _ns {
+class ns
+{
+public:
     Ip::Address S;
-    int nqueries;
-    int nreplies;
+    int nqueries = 0;
+    int nreplies = 0;
 #if WHEN_EDNS_RESPONSES_ARE_PARSED
-    int last_seen_edns;
+    int last_seen_edns = 0;
 #endif
-    bool mDNSResolver;
-    nsvc *vc;
+    bool mDNSResolver = false;
+    nsvc *vc = nullptr;
 };
 
 namespace Dns
@@ -231,10 +230,8 @@
     int queries;
 };
 
-static ns *nameservers = NULL;
+static std::vector<ns> nameservers;
 static sp *searchpath = NULL;
-static int nns = 0;
-static int nns_alloc = 0;
 static int nns_mdns_count = 0;
 static int npc = 0;
 static int npc_alloc = 0;
@@ -275,7 +272,6 @@
 static void idnsAddNameserver(const char *buf);
 static void idnsAddMDNSNameservers();
 static void idnsAddPathComponent(const char *buf);
-static void idnsFreeNameservers(void);
 static void idnsFreeSearchpath(void);
 static bool idnsParseNameservers(void);
 static bool idnsParseResolvConf(void);
@@ -326,14 +322,14 @@
     // mDNS resolver addresses are explicit multicast group IPs
     if (Ip::EnableIpv6) {
         idnsAddNameserver("FF02::FB");
-        nameservers[nns-1].S.port(5353);
-        nameservers[nns-1].mDNSResolver = true;
+        nameservers.back().S.port(5353);
+        nameservers.back().mDNSResolver = true;
         ++nns_mdns_count;
     }
 
     idnsAddNameserver("224.0.0.251");
-    nameservers[nns-1].S.port(5353);
-    nameservers[nns-1].mDNSResolver = true;
+    nameservers.back().S.port(5353);
+    nameservers.back().mDNSResolver = true;
 
     ++nns_mdns_count;
 }
@@ -359,33 +355,14 @@
         return;
     }
 
-    if (nns == nns_alloc) {
-        int oldalloc = nns_alloc;
-        ns *oldptr = nameservers;
-
-        if (nns_alloc == 0)
-            nns_alloc = 2;
-        else
-            nns_alloc <<= 1;
-
-        nameservers = (ns *)xcalloc(nns_alloc, sizeof(*nameservers));
-
-        if (oldptr && oldalloc)
-            memcpy(nameservers, oldptr, oldalloc * sizeof(*nameservers));
-
-        if (oldptr)
-            safe_free(oldptr);
-    }
-
-    assert(nns < nns_alloc);
+    nameservers.emplace_back(ns());
     A.port(NS_DEFAULTPORT);
-    nameservers[nns].S = A;
+    nameservers.back().S = A;
 #if WHEN_EDNS_RESPONSES_ARE_PARSED
-    nameservers[nns].last_seen_edns = RFC1035_DEFAULT_PACKET_SZ;
+    nameservers.back().last_seen_edns = RFC1035_DEFAULT_PACKET_SZ;
     // TODO generate a test packet to probe this NS from EDNS size and ability.
 #endif
-    debugs(78, 3, "idnsAddNameserver: Added nameserver #" << nns << " (" << A << ")");
-    ++nns;
+    debugs(78, 3, "Added nameserver #" << nameservers.size()-1 << " (" << A << ")");
 }
 
 static void
@@ -418,13 +395,6 @@
 }
 
 static void
-idnsFreeNameservers(void)
-{
-    safe_free(nameservers);
-    nns = nns_alloc = 0;
-}
-
-static void
 idnsFreeSearchpath(void)
 {
     safe_free(searchpath);
@@ -778,12 +748,12 @@
     storeAppendPrintf(sentry, "IP ADDRESS                                     # QUERIES # REPLIES Type\n");
     storeAppendPrintf(sentry, "---------------------------------------------- --------- --------- --------\n");
 
-    for (i = 0; i < nns; ++i) {
+    for (const auto &server : nameservers) {
         storeAppendPrintf(sentry, "%-45s %9d %9d %s\n",  /* Let's take the maximum: (15 IPv4/45 IPv6) */
-                          nameservers[i].S.toStr(buf,MAX_IPSTRLEN),
-                          nameservers[i].nqueries,
-                          nameservers[i].nreplies,
-                          nameservers[i].mDNSResolver?"multicast":"recurse");
+                          server.S.toStr(buf,MAX_IPSTRLEN),
+                          server.nqueries,
+                          server.nreplies,
+                          server.mDNSResolver?"multicast":"recurse");
     }
 
     storeAppendPrintf(sentry, "\nRcode Matrix:\n");
@@ -893,7 +863,7 @@
 
     if (status != Comm::OK || !conn) {
         char buf[MAX_IPSTRLEN] = "";
-        if (vc->ns < nns)
+        if (vc->ns < nameservers.size())
             nameservers[vc->ns].S.toStr(buf,MAX_IPSTRLEN);
         debugs(78, DBG_IMPORTANT, HERE << "Failed to connect to nameserver " << buf << " using TCP.");
         return;
@@ -920,15 +890,15 @@
 {
     delete queue;
     delete msg;
-    if (ns < nns) // XXX: idnsShutdownAndFreeState may have freed nameservers[]
+    if (ns < nameservers.size()) // XXX: idnsShutdownAndFreeState may have freed nameservers[]
         nameservers[ns].vc = NULL;
 }
 
 static void
-idnsInitVC(int nsv)
+idnsInitVC(size_t nsv)
 {
+    assert(nsv < nameservers.size());
     nsvc *vc = new nsvc(nsv);
-    assert(nsv < nns);
     assert(vc->conn == NULL); // MUST be NULL from the construction process!
     nameservers[nsv].vc = vc;
 
@@ -950,9 +920,9 @@
 }
 
 static void
-idnsSendQueryVC(idns_query * q, int nsn)
+idnsSendQueryVC(idns_query * q, size_t nsn)
 {
-    assert(nsn < nns);
+    assert(nsn < nameservers.size());
     if (nameservers[nsn].vc == NULL)
         idnsInitVC(nsn);
 
@@ -991,7 +961,7 @@
         return;
     }
 
-    if (nns <= 0) {
+    if (nameservers.empty()) {
         debugs(78, DBG_IMPORTANT, "WARNING: idnsSendQuery: Can't send query, no DNS nameservers known!");
         return;
     }
@@ -1001,14 +971,15 @@
     assert(q->lru.prev == NULL);
 
     int x = -1, y = -1;
-    int nsn;
+    size_t nsn;
+    const auto nsCount = nameservers.size();
 
     do {
         // only use mDNS resolvers for mDNS compatible queries
         if (!q->permit_mdns)
-            nsn = nns_mdns_count + q->nsends % (nns-nns_mdns_count);
+            nsn = nns_mdns_count + q->nsends % (nsCount - nns_mdns_count);
         else
-            nsn = q->nsends % nns;
+            nsn = q->nsends % nsCount;
 
         if (q->need_vc) {
             idnsSendQueryVC(q, nsn);
@@ -1030,7 +1001,7 @@
         if (x < 0 && nameservers[nsn].S.isIPv4())
             debugs(50, DBG_IMPORTANT, MYNAME << "FD " << DnsSocketA << ": sendto: " << xstrerr(xerrno));
 
-    } while ( (x<0 && y<0) && q->nsends % nns != 0);
+    } while ( (x<0 && y<0) && q->nsends % nsCount != 0);
 
     if (y > 0) {
         fd_bytes(DnsSocketB, y, FD_WRITE);
@@ -1049,9 +1020,7 @@
 static int
 idnsFromKnownNameserver(Ip::Address const &from)
 {
-    int i;
-
-    for (i = 0; i < nns; ++i) {
+    for (int i = 0; static_cast<size_t>(i) < nameservers.size(); ++i) {
         if (nameservers[i].S != from)
             continue;
 
@@ -1232,8 +1201,8 @@
             // the altered NS was limiting the whole group.
             max_shared_edns = q->edns_seen;
             // may be limited by one of the others still
-            for (int i = 0; i < nns; ++i)
-                max_shared_edns = min(max_shared_edns, nameservers[i].last_seen_edns);
+            for (const auto &server : nameservers)
+                max_shared_edns = min(max_shared_edns, server.last_seen_edns);
         } else {
             nameservers[from_ns].last_seen_edns = q->edns_seen;
             // maybe reduce the global limit downwards to accomodate this NS
@@ -1435,10 +1404,11 @@
     idns_query *q;
     event_queued = 0;
 
-    if (0 == nns)
+    if (nameservers.empty())
         /* name servers went away; reconfiguring or shutting down */
         return;
 
+    const auto nsCount = nameservers.size();
     for (n = lru_list.tail; n; n = p) {
 
         p = n->prev;
@@ -1449,7 +1419,7 @@
             break;
 
         /* Query timer still running? */
-        if ((time_msec_t)tvSubMsec(q->sent_t, current_time) < (Config.Timeout.idns_retransmit * 1 << ((q->nsends - 1) / nns))) {
+        if ((time_msec_t)tvSubMsec(q->sent_t, current_time) < (Config.Timeout.idns_retransmit * 1 << ((q->nsends - 1) / nsCount))) {
             dlinkDelete(&q->lru, &lru_list);
             q->queue_t = current_time;
             dlinkAdd(q, &q->lru, &lru_list);
@@ -1504,7 +1474,7 @@
         return;
     }
 
-    assert(vc->ns < nns);
+    assert(vc->ns < nameservers.size());
     debugs(78, 3, HERE << conn << ": received " << vc->msg->contentSize() << " bytes via TCP from " << nameservers[vc->ns].S << ".");
 
     idnsGrokReply(vc->msg->buf, vc->msg->contentSize(), vc->ns);
@@ -1623,7 +1593,7 @@
         }
     }
 
-    assert(0 == nns);
+    assert(nameservers.empty());
     idnsAddMDNSNameservers();
     bool nsFound = idnsParseNameservers();
 
@@ -1683,15 +1653,15 @@
         DnsSocketB = -1;
     }
 
-    for (int i = 0; i < nns; ++i) {
-        if (nsvc *vc = nameservers[i].vc) {
+    for (const auto &server : nameservers) {
+        if (const auto vc = server.vc) {
             if (Comm::IsConnOpen(vc->conn))
                 vc->conn->close();
         }
     }
 
     // XXX: vcs are not closed/freed yet and may try to access nameservers[]
-    idnsFreeNameservers();
+    nameservers.clear();
     idnsFreeSearchpath();
 }
 
@@ -1784,7 +1754,7 @@
     q->query_id = idnsQueryID();
 
     int nd = 0;
-    for (unsigned int i = 0; i < nameLength; ++i)
+    for (size_t i = 0; i < nameLength; ++i)
         if (name[i] == '.')
             ++nd;
 
@@ -1871,7 +1841,7 @@
 variable_list *
 snmp_netDnsFn(variable_list * Var, snint * ErrP)
 {
-    int i, n = 0;
+    int n = 0;
     variable_list *Answer = NULL;
     MemBuf tmp;
     debugs(49, 5, "snmp_netDnsFn: Processing request: " << snmpDebugOid(Var->name, Var->name_length, tmp));
@@ -1881,8 +1851,8 @@
 
     case DNS_REQ:
 
-        for (i = 0; i < nns; ++i)
-            n += nameservers[i].nqueries;
+        for (const auto &server : nameservers)
+            n += server.nqueries;
 
         Answer = snmp_var_new_integer(Var->name, Var->name_length,
                                       n,
@@ -1891,8 +1861,8 @@
         break;
 
     case DNS_REP:
-        for (i = 0; i < nns; ++i)
-            n += nameservers[i].nreplies;
+        for (const auto &server : nameservers)
+            n += server.nreplies;
 
         Answer = snmp_var_new_integer(Var->name, Var->name_length,
                                       n,
@@ -1902,7 +1872,7 @@
 
     case DNS_SERVERS:
         Answer = snmp_var_new_integer(Var->name, Var->name_length,
-                                      nns,
+                                      nameservers.size(),
                                       SMI_COUNTER32);
 
         break;
diff -u -r -N squid-4.1/src/Downloader.cc squid-4.2/src/Downloader.cc
--- squid-4.1/src/Downloader.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/Downloader.cc	2018-08-06 02:13:41.000000000 +1200
@@ -151,12 +151,10 @@
            "\n----------");
 
     ClientHttpRequest *const http = new ClientHttpRequest(nullptr);
-    http->request = request;
-    HTTPMSGLOCK(http->request);
+    http->initRequest(request);
     http->req_sz = 0;
     // XXX: performance regression. c_str() reallocates
     http->uri = xstrdup(url_.c_str());
-    setLogUri (http, urlCanonicalClean(request));
 
     context_ = new DownloaderContext(this, http);
     StoreIOBuffer tempBuffer;
diff -u -r -N squid-4.1/src/esi/Element.h squid-4.2/src/esi/Element.h
--- squid-4.1/src/esi/Element.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/esi/Element.h	2018-08-06 02:13:41.000000000 +1200
@@ -13,6 +13,8 @@
 #include "Debug.h"
 #include "esi/Segment.h"
 
+#include <vector>
+
 typedef enum {
     ESI_PROCESS_COMPLETE = 0,
     ESI_PROCESS_PENDING_WONTFAIL = 1,
@@ -83,5 +85,21 @@
     virtual void finish() = 0;
 };
 
+/// ESI protocol types and operators
+namespace Esi {
+
+/// an ordered set of ESI elements
+typedef std::vector<ESIElement::Pointer> Elements;
+
+} // namespace Esi
+
+/// Call finish() and set to nil the given element. Element may already be nil.
+/// When element is part of a set, use pos to indicate position/ID
+/// for debugging.
+extern void FinishAnElement(ESIElement::Pointer &, int pos = -1);
+
+// for all elements call finish() and set Pointer to nil
+extern void FinishAllElements(Esi::Elements &);
+
 #endif /* SQUID_ESIELEMENT_H */
 
diff -u -r -N squid-4.1/src/esi/ElementList.h squid-4.2/src/esi/ElementList.h
--- squid-4.1/src/esi/ElementList.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/esi/ElementList.h	1970-01-01 12:00:00.000000000 +1200
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 1996-2018 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 86    ESI processing */
-
-#ifndef SQUID_ELEMENTLIST_H
-#define SQUID_ELEMENTLIST_H
-
-#include "esi/Element.h"
-
-class ElementList
-{
-
-public:
-    ElementList();
-    ~ElementList();
-
-    ESIElement::Pointer &operator[](int);
-    ESIElement::Pointer const &operator[](int)const;
-    ESIElement::Pointer * elements; /* unprocessed or rendered nodes */
-    void pop_front (size_t const);
-    void push_back(ESIElement::Pointer &);
-    size_t size() const;
-    void setNULL (int start, int end);
-
-    int allocedcount;
-    size_t allocedsize;
-    int elementcount;
-
-private:
-    ElementList(ElementList const &);
-    ElementList &operator=(ElementList const&);
-};
-
-#endif /* SQUID_ELEMENTLIST_H */
-
diff -u -r -N squid-4.1/src/esi/Esi.cc squid-4.2/src/esi/Esi.cc
--- squid-4.1/src/esi/Esi.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/esi/Esi.cc	2018-08-06 02:13:41.000000000 +1200
@@ -176,7 +176,7 @@
     Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
     void NULLUnChosen();
 
-    ElementList elements;
+    Esi::Elements elements;
     int chosenelement;
     ESIElement::Pointer otherwise;
     void finish();
@@ -1884,6 +1884,7 @@
 esiChoose::~esiChoose()
 {
     debugs(86, 5, "esiChoose::~esiChoose " << this);
+    FinishAllElements(elements); // finish if not already done
 }
 
 esiChoose::esiChoose(esiTreeParentPtr aParent) :
@@ -1963,35 +1964,37 @@
     }
 }
 
+// TODO: make ESIElement destructor call finish() instead so it is
+//       a) only called when an element ref-count is 0, and
+//       b) caller can elements.clear() instead of doing this
 void
-esiChoose::finish()
+FinishAnElement(ESIElement::Pointer &element, int pos)
 {
-    elements.setNULL(0, elements.size());
-
-    if (otherwise.getRaw())
-        otherwise->finish();
-
-    otherwise = NULL;
+    if (element)
+        element->finish();
 
-    parent = NULL;
+    debugs(86, 5, "setting index " << pos << ", pointer " << (void*)element.getRaw() << " to nil");
+    element = nullptr;
 }
 
 void
-ElementList::setNULL (int start, int end)
+FinishAllElements(Esi::Elements &elements)
 {
-    assert (start >= 0 && start <= elementcount);
-    assert (end >= 0 && end <= elementcount);
+    int pos = 0;
+    for (auto &element : elements)
+        FinishAnElement(element, pos++);
+}
 
-    for (int loopPosition = start; loopPosition < end; ++loopPosition) {
-        if (elements[loopPosition].getRaw())
-            elements[loopPosition]->finish();
+void
+esiChoose::finish()
+{
+    FinishAllElements(elements);
 
-        debugs(86, 5, "esiSequence::NULLElements: Setting index " <<
-               loopPosition << ", pointer " <<
-               elements[loopPosition].getRaw() << " to NULL");
+    if (otherwise.getRaw())
+        otherwise->finish();
 
-        elements[loopPosition] = NULL;
-    }
+    otherwise = nullptr;
+    parent = nullptr;
 }
 
 void
@@ -2003,11 +2006,14 @@
 
         otherwise = NULL;
 
-        elements.setNULL (0, chosenelement);
+        int pos = 0;
+        for (auto &element : elements) {
+            if (pos != chosenelement)
+                FinishAnElement(element, pos++);
+        }
 
-        elements.setNULL (chosenelement + 1, elements.size());
     } else if (otherwise.getRaw()) {
-        elements.setNULL (0, elements.size());
+        FinishAllElements(elements);
     }
 }
 
@@ -2059,7 +2065,7 @@
 esiChoose::fail(ESIElement * source, char const *anError)
 {
     checkValidSource (source);
-    elements.setNULL (0, elements.size());
+    FinishAllElements(elements);
 
     if (otherwise.getRaw())
         otherwise->finish();
@@ -2138,59 +2144,6 @@
     return result;
 }
 
-/* ElementList */
-ElementList::ElementList () : elements(NULL), allocedcount(0), allocedsize(0), elementcount (0)
-{}
-
-ElementList::~ElementList()
-{
-    debugs(86, 5, "ElementList::~ElementList " << this);
-    setNULL(0, elementcount);
-
-    if (elements)
-        memFreeBuf (allocedsize, elements);
-}
-
-ESIElement::Pointer &
-ElementList::operator [] (int index)
-{
-    return elements[index];
-}
-
-ESIElement::Pointer const &
-ElementList::operator [] (int index) const
-{
-    return elements[index];
-}
-
-void
-ElementList::pop_front (size_t const count)
-{
-    if (!count)
-        return;
-
-    memmove(elements, &elements[count], (elementcount - count)  * sizeof (ESIElement::Pointer));
-
-    elementcount -= count;
-}
-
-void
-ElementList::push_back(ESIElement::Pointer &newElement)
-{
-    elements = (ESIElement::Pointer *)memReallocBuf (elements, ++elementcount * sizeof (ESIElement::Pointer),
-               &allocedsize);
-    assert (elements);
-    allocedcount = elementcount;
-    memset(&elements[elementcount - 1], '\0', sizeof (ESIElement::Pointer));
-    elements[elementcount - 1] = newElement;
-}
-
-size_t
-ElementList::size() const
-{
-    return elementcount;
-}
-
 /* esiWhen */
 esiWhen::esiWhen(esiTreeParentPtr aParent, int attrcount, const char **attr,ESIVarState *aVar) :
     esiSequence(aParent),
diff -u -r -N squid-4.1/src/esi/Makefile.am squid-4.2/src/esi/Makefile.am
--- squid-4.1/src/esi/Makefile.am	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/esi/Makefile.am	2018-08-06 02:13:41.000000000 +1200
@@ -32,7 +32,6 @@
 	Context.h \
 	$(ESI_PARSER_SOURCES) \
 	Element.h \
-	ElementList.h \
 	Esi.cc \
 	Esi.h \
 	Except.h \
diff -u -r -N squid-4.1/src/esi/Makefile.in squid-4.2/src/esi/Makefile.in
--- squid-4.1/src/esi/Makefile.in	2018-07-02 15:32:04.000000000 +1200
+++ squid-4.2/src/esi/Makefile.in	2018-08-06 02:31:41.000000000 +1200
@@ -173,10 +173,10 @@
 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 ElementList.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
+	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
 @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)
@@ -744,7 +744,6 @@
 	Context.h \
 	$(ESI_PARSER_SOURCES) \
 	Element.h \
-	ElementList.h \
 	Esi.cc \
 	Esi.h \
 	Except.h \
diff -u -r -N squid-4.1/src/esi/Sequence.cc squid-4.2/src/esi/Sequence.cc
--- squid-4.1/src/esi/Sequence.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/esi/Sequence.cc	2018-08-06 02:13:41.000000000 +1200
@@ -27,6 +27,7 @@
 esiSequence::~esiSequence ()
 {
     debugs(86, 5, "esiSequence::~esiSequence " << this);
+    FinishAllElements(elements); // finish if not already done
 }
 
 esiSequence::esiSequence(esiTreeParentPtr aParent, bool incrementalFlag) :
@@ -88,12 +89,13 @@
 
     for (size_t i = 0; i < processedcount; ++i) {
         elements[i]->render(output);
-        elements.setNULL(i,i+1);
+        FinishAnElement(elements[i], i);
         /* FIXME: pass a ESISegment ** ? */
         output = output->tail();
     }
 
-    elements.pop_front (processedcount);
+    // prune completed elements
+    elements.erase(elements.begin(), elements.begin() + processedcount);
     processedcount = 0;
     assert (output->next == NULL);
 }
@@ -102,7 +104,7 @@
 esiSequence::finish()
 {
     debugs(86, 5, "esiSequence::finish: " << this << " is finished");
-    elements.setNULL(0, elements.size());
+    FinishAllElements(elements);
     parent = NULL;
 }
 
@@ -126,7 +128,7 @@
     assert (index >= 0);
 
     /* remove the current node */
-    elements.setNULL(index, index+1);
+    FinishAnElement(elements[index], index);
 
     /* create a literal */
     esiLiteral *temp = new esiLiteral (data);
@@ -267,7 +269,7 @@
             return processingResult;
 
         if (processingResult == ESI_PROCESS_FAILED) {
-            elements.setNULL (0, elements.size());
+            FinishAllElements(elements);
             failed = true;
             parent = NULL;
             processing = false;
@@ -313,7 +315,7 @@
 
     debugs(86, 5, "esiSequence::fail: " << this << " has failed.");
     parent->fail (this, anError);
-    elements.setNULL(0, elements.size());
+    FinishAllElements(elements);
     parent = NULL;
 }
 
diff -u -r -N squid-4.1/src/esi/Sequence.h squid-4.2/src/esi/Sequence.h
--- squid-4.1/src/esi/Sequence.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/esi/Sequence.h	2018-08-06 02:13:41.000000000 +1200
@@ -12,7 +12,6 @@
 #define SQUID_ESISEQUENCE_H
 
 #include "esi/Element.h"
-#include "esi/ElementList.h"
 #include "mem/forward.h"
 
 /* esiSequence */
@@ -37,7 +36,7 @@
     void makeUsableElements(esiSequence const &old, ESIVarState &);
     Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
 
-    ElementList elements; /* unprocessed or rendered nodes */
+    Esi::Elements elements; /* unprocessed or rendered nodes */
     size_t processedcount;
 
     struct {
diff -u -r -N squid-4.1/src/eui/Eui64.h squid-4.2/src/eui/Eui64.h
--- squid-4.1/src/eui/Eui64.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/eui/Eui64.h	2018-08-06 02:13:41.000000000 +1200
@@ -36,11 +36,9 @@
 
 public:
     Eui64() { clear(); }
-    Eui64(const Eui64 &t) { memcpy(this, &t, sizeof(Eui64)); }
-    Eui64& operator= (const Eui64 &t) {memcpy(this, &t, sizeof(Eui64)); return *this;}
+
     bool operator== (const Eui64 &t) const { return (memcmp(eui,t.eui,SZ_EUI64_BUF) == 0); }
     bool operator< (const Eui64 &t) const { return (memcmp(eui,t.eui,SZ_EUI64_BUF) < 0); }
-    ~Eui64() {}
 
     const unsigned char *get(void);
 
diff -u -r -N squid-4.1/src/fd.cc squid-4.2/src/fd.cc
--- squid-4.1/src/fd.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/fd.cc	2018-08-06 02:13:41.000000000 +1200
@@ -92,8 +92,7 @@
     }
 
     debugs(51, 3, "fd_close FD " << fd << " " << F->desc);
-    Comm::SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
-    Comm::SetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
+    Comm::ResetSelect(fd);
     F->flags.open = false;
     fdUpdateBiggest(fd, 0);
     --Number_FD;
diff -u -r -N squid-4.1/src/format/Format.cc squid-4.2/src/format/Format.cc
--- squid-4.1/src/format/Format.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/format/Format.cc	2018-08-06 02:13:41.000000000 +1200
@@ -979,9 +979,8 @@
             break;
 
         case LFT_CLIENT_REQ_URI:
-            // original client URI
-            if (al->request) {
-                sb = al->request->effectiveRequestUri();
+            if (const auto uri = al->effectiveVirginUrl()) {
+                sb = *uri;
                 out = sb.c_str();
                 quote = 1;
             }
@@ -1383,7 +1382,7 @@
             out = sb.c_str();
         } else if (doMsec) {
             if (fmt->widthMax < 0) {
-                sb.appendf("%0*ld", fmt->widthMin , tvToMsec(outtv));
+                sb.appendf("%0*ld", fmt->zero && fmt->widthMin >= 0 ? fmt->widthMin : 0, tvToMsec(outtv));
             } else {
                 int precision = fmt->widthMax;
                 sb.appendf("%0*" PRId64 ".%0*" PRId64 "", fmt->zero && (fmt->widthMin - precision - 1 >= 0) ? fmt->widthMin - precision - 1 : 0, static_cast<int64_t>(outtv.tv_sec * 1000 + outtv.tv_usec / 1000), precision, static_cast<int64_t>((outtv.tv_usec % 1000 )* (1000 / fmt->divisor)));
diff -u -r -N squid-4.1/src/fqdncache.cc squid-4.2/src/fqdncache.cc
--- squid-4.1/src/fqdncache.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/fqdncache.cc	2018-08-06 02:13:41.000000000 +1200
@@ -708,8 +708,7 @@
     debugs(35, 3, "Initializing FQDN Cache...");
 
     memset(&FqdncacheStats, '\0', sizeof(FqdncacheStats));
-
-    memset(&lru_list, '\0', sizeof(lru_list));
+    lru_list = dlink_list();
 
     fqdncache_high = (long) (((float) Config.fqdncache.size *
                               (float) FQDN_HIGH_WATER) / (float) 100);
diff -u -r -N squid-4.1/src/fs/rock/RockRebuild.cc squid-4.2/src/fs/rock/RockRebuild.cc
--- squid-4.1/src/fs/rock/RockRebuild.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/fs/rock/RockRebuild.cc	2018-08-06 02:13:41.000000000 +1200
@@ -213,7 +213,6 @@
     validationPos(0)
 {
     assert(sd);
-    memset(&counts, 0, sizeof(counts));
     dbSize = sd->diskOffsetLimit(); // we do not care about the trailer waste
     dbSlotSize = sd->slotSize;
     dbEntryLimit = sd->entryLimitActual();
diff -u -r -N squid-4.1/src/fs/ufs/UFSSwapDir.cc squid-4.2/src/fs/ufs/UFSSwapDir.cc
--- squid-4.1/src/fs/ufs/UFSSwapDir.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/fs/ufs/UFSSwapDir.cc	2018-08-06 02:13:41.000000000 +1200
@@ -45,27 +45,23 @@
 {
 
 public:
-    UFSCleanLog(SwapDir *);
-    /** Get the next entry that is a candidate for clean log writing
-     */
+    UFSCleanLog(SwapDir *aSwapDir) : sd(aSwapDir) {}
+
+    /// Get the next entry that is a candidate for clean log writing
     virtual const StoreEntry *nextEntry();
-    /** "write" an entry to the clean log file.
-     */
+
+    /// "write" an entry to the clean log file.
     virtual void write(StoreEntry const &);
-    char *cur;
-    char *newLog;
-    char *cln;
-    char *outbuf;
-    off_t outbuf_offset;
-    int fd;
-    RemovalPolicyWalker *walker;
-    SwapDir *sd;
-};
 
-UFSCleanLog::UFSCleanLog(SwapDir *aSwapDir) :
-    cur(NULL), newLog(NULL), cln(NULL), outbuf(NULL),
-    outbuf_offset(0), fd(-1),walker(NULL), sd(aSwapDir)
-{}
+    SBuf cur;
+    SBuf newLog;
+    SBuf cln;
+    char *outbuf = nullptr;
+    off_t outbuf_offset = 0;
+    int fd = -1;
+    RemovalPolicyWalker *walker = nullptr;
+    SwapDir *sd = nullptr;
+};
 
 const StoreEntry *
 UFSCleanLog::nextEntry()
@@ -106,7 +102,7 @@
             debugs(50, DBG_CRITICAL, MYNAME << "Current swap logfile not replaced.");
             file_close(fd);
             fd = -1;
-            unlink(newLog);
+            unlink(newLog.c_str());
             sd->cleanLog = NULL;
             delete this;
             return;
@@ -686,39 +682,41 @@
     }
 }
 
-char *
+SBuf
 Fs::Ufs::UFSSwapDir::logFile(char const *ext) const
 {
-    LOCAL_ARRAY(char, lpath, MAXPATHLEN);
-    LOCAL_ARRAY(char, pathtmp, MAXPATHLEN);
-    LOCAL_ARRAY(char, digit, 32);
-    char *pathtmp2;
+    SBuf lpath;
 
     if (Config.Log.swap) {
-        xstrncpy(pathtmp, path, MAXPATHLEN - 64);
-        pathtmp2 = pathtmp;
+        static char pathtmp[MAXPATHLEN];
+        char *pathtmp2 = xstrncpy(pathtmp, path, MAXPATHLEN - 64);
 
-        while ((pathtmp2 = strchr(pathtmp2, '/')) != NULL)
+        // replace all '/' with '.'
+        while ((pathtmp2 = strchr(pathtmp2, '/')))
             *pathtmp2 = '.';
 
-        while (strlen(pathtmp) && pathtmp[strlen(pathtmp) - 1] == '.')
-            pathtmp[strlen(pathtmp) - 1] = '\0';
+        // remove any trailing '.' characters
+        int pos = strlen(pathtmp);
+        while (pos && pathtmp[pos-1] == '.')
+            pathtmp[--pos] = '\0';
 
+        // remove any prefix '.' characters
         for (pathtmp2 = pathtmp; *pathtmp2 == '.'; ++pathtmp2);
-        snprintf(lpath, MAXPATHLEN - 64, Config.Log.swap, pathtmp2);
-
-        if (strncmp(lpath, Config.Log.swap, MAXPATHLEN - 64) == 0) {
-            strcat(lpath, ".");
-            snprintf(digit, 32, "%02d", index);
-            strncat(lpath, digit, 3);
+        // replace a '%s' (if any) in the config string
+        // with the resulting pathtmp2 string
+        lpath.appendf(Config.Log.swap, pathtmp2);
+
+        // is pathtmp2 was NOT injected, append numeric file extension
+        if (lpath.cmp(Config.Log.swap) == 0) {
+            lpath.append(".", 1);
+            lpath.appendf("%02d", index);
         }
     } else {
-        xstrncpy(lpath, path, MAXPATHLEN - 64);
-        strcat(lpath, "/swap.state");
+        lpath.append(path);
+        lpath.append("/swap.state", 11);
     }
 
-    if (ext)
-        strncat(lpath, ext, 16);
+    lpath.append(ext); // may be nil, that is okay.
 
     return lpath;
 }
@@ -735,9 +733,8 @@
         return;
     }
 
-    char *logPath;
-    logPath = logFile();
-    swaplog_fd = file_open(logPath, O_WRONLY | O_CREAT | O_BINARY);
+    SBuf logPath(logFile());
+    swaplog_fd = file_open(logPath.c_str(), O_WRONLY | O_CREAT | O_BINARY);
 
     if (swaplog_fd < 0) {
         int xerrno = errno;
@@ -832,25 +829,23 @@
     assert(rebuilding_);
     rebuilding_ = false;
 
-    char *swaplog_path = xstrdup(logFile(NULL)); // where the swaplog should be
-    char *tmp_path = xstrdup(logFile(".new")); // the temporary file we have generated
-    int fd;
+    SBuf swaplog_path(logFile()); // where the swaplog should be
+    SBuf tmp_path(logFile(".new"));
+
     file_close(swaplog_fd);
 
-    if (xrename(tmp_path, swaplog_path) < 0) {
-        fatalf("Failed to rename log file %s to %s", tmp_path, swaplog_path);
+    if (!FileRename(tmp_path, swaplog_path)) {
+        fatalf("Failed to rename log file " SQUIDSBUFPH " to " SQUIDSBUFPH, SQUIDSBUFPRINT(tmp_path), SQUIDSBUFPRINT(swaplog_path));
     }
 
-    fd = file_open(swaplog_path, O_WRONLY | O_CREAT | O_BINARY);
+    int fd = file_open(swaplog_path.c_str(), O_WRONLY | O_CREAT | O_BINARY);
 
     if (fd < 0) {
         int xerrno = errno;
         debugs(50, DBG_IMPORTANT, "ERROR: " << swaplog_path << ": " << xstrerr(xerrno));
-        fatalf("Failed to open swap log %s", swaplog_path);
+        fatalf("Failed to open swap log " SQUIDSBUFPH, SQUIDSBUFPRINT(swaplog_path));
     }
 
-    xfree(swaplog_path);
-    xfree(tmp_path);
     swaplog_fd = fd;
     debugs(47, 3, "Cache Dir #" << index << " log opened on FD " << fd);
 }
@@ -860,21 +855,16 @@
 {
     assert(!rebuilding_);
 
-    char *swaplog_path = xstrdup(logFile(NULL));
-    char *clean_path = xstrdup(logFile(".last-clean"));
-    char *new_path = xstrdup(logFile(".new"));
+    SBuf swaplog_path(logFile());
+    SBuf clean_path(logFile(".last-clean"));
+    SBuf new_path(logFile(".new"));
 
     struct stat log_sb;
 
     struct stat clean_sb;
-    FILE *fp;
-    int fd;
 
-    if (::stat(swaplog_path, &log_sb) < 0) {
+    if (::stat(swaplog_path.c_str(), &log_sb) < 0) {
         debugs(47, DBG_IMPORTANT, "Cache Dir #" << index << ": No log file");
-        safe_free(swaplog_path);
-        safe_free(clean_path);
-        safe_free(new_path);
         return NULL;
     }
 
@@ -885,12 +875,11 @@
         file_close(swaplog_fd);
 
     /* open a write-only FD for the new log */
-    fd = file_open(new_path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
-
+    int fd = file_open(new_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
     if (fd < 0) {
         int xerrno = errno;
         debugs(50, DBG_IMPORTANT, "ERROR: while opening swap log" << new_path << ": " << xstrerr(xerrno));
-        fatalf("Failed to open swap log %s", new_path);
+        fatalf("Failed to open swap log " SQUIDSBUFPH, SQUIDSBUFPRINT(new_path));
     }
 
     swaplog_fd = fd;
@@ -909,30 +898,23 @@
     }
 
     /* open a read-only stream of the old log */
-    fp = fopen(swaplog_path, "rb");
-
+    FILE *fp = fopen(swaplog_path.c_str(), "rb");
     if (!fp) {
         int xerrno = errno;
         debugs(50, DBG_CRITICAL, "ERROR: while opening " << swaplog_path << ": " << xstrerr(xerrno));
-        fatalf("Failed to open swap log for reading %s", swaplog_path);
+        fatalf("Failed to open swap log for reading " SQUIDSBUFPH, SQUIDSBUFPRINT(swaplog_path));
     }
 
     memset(&clean_sb, '\0', sizeof(struct stat));
 
-    if (::stat(clean_path, &clean_sb) < 0)
+    if (::stat(clean_path.c_str(), &clean_sb) < 0)
         *clean_flag = 0;
     else if (clean_sb.st_mtime < log_sb.st_mtime)
         *clean_flag = 0;
     else
         *clean_flag = 1;
 
-    safeunlink(clean_path, 1);
-
-    safe_free(swaplog_path);
-
-    safe_free(clean_path);
-
-    safe_free(new_path);
+    safeunlink(clean_path.c_str(), 1);
 
     return fp;
 }
@@ -953,17 +935,17 @@
 #endif
 
     cleanLog = NULL;
-    state->newLog = xstrdup(logFile(".clean"));
-    state->fd = file_open(state->newLog, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
+    state->cur = logFile();
+    state->newLog = logFile(".clean");
+    state->fd = file_open(state->newLog.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
 
     if (state->fd < 0) {
-        xfree(state->newLog);
         delete state;
         return -1;
     }
 
-    state->cur = xstrdup(logFile(NULL));
-    state->cln = xstrdup(logFile(".last-clean"));
+    state->cln = state->cur;
+    state->cln.append(".last-clean");
     state->outbuf = (char *)xcalloc(CLEAN_BUF_SZ, 1);
     state->outbuf_offset = 0;
     /*copy the header */
@@ -973,11 +955,11 @@
     state->outbuf_offset += header.record_size;
 
     state->walker = repl->WalkInit(repl);
-    ::unlink(state->cln);
+    ::unlink(state->cln.c_str());
     debugs(47, 3, HERE << "opened " << state->newLog << ", FD " << state->fd);
 #if HAVE_FCHMOD
 
-    if (::stat(state->cur, &sb) == 0)
+    if (::stat(state->cur.c_str(), &sb) == 0)
         fchmod(state->fd, sb.st_mode);
 
 #endif
@@ -1006,7 +988,7 @@
         debugs(50, DBG_CRITICAL, MYNAME << "Current swap logfile not replaced.");
         file_close(state->fd);
         state->fd = -1;
-        ::unlink(state->newLog);
+        ::unlink(state->newLog.c_str());
     }
 
     safe_free(state->outbuf);
@@ -1025,7 +1007,8 @@
         state->fd = -1;
 #endif
 
-        xrename(state->newLog, state->cur);
+        FileRename(state->newLog, state->cur);
+        // TODO handle rename errors
     }
 
     /* touch a timestamp file if we're not still validating */
@@ -1034,15 +1017,9 @@
     else if (fd < 0)
         (void) 0;
     else
-        file_close(file_open(state->cln, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY));
+        file_close(file_open(state->cln.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY));
 
     /* close */
-    safe_free(state->cur);
-
-    safe_free(state->newLog);
-
-    safe_free(state->cln);
-
     if (state->fd >= 0)
         file_close(state->fd);
 
@@ -1330,10 +1307,6 @@
 Fs::Ufs::UFSSwapDir::DirClean(int swap_index)
 {
     DIR *dir_pointer = NULL;
-
-    LOCAL_ARRAY(char, p1, MAXPATHLEN + 1);
-    LOCAL_ARRAY(char, p2, MAXPATHLEN + 1);
-
     int files[20];
     int swapfileno;
     int fn;         /* same as swapfileno, but with dirn bits set */
@@ -1350,21 +1323,22 @@
     D1 = (swap_index / N0) % N1;
     N2 = SD->l2;
     D2 = ((swap_index / N0) / N1) % N2;
-    snprintf(p1, MAXPATHLEN, "%s/%02X/%02X",
-             SD->path, D1, D2);
+
+    SBuf p1;
+    p1.appendf("%s/%02X/%02X", SD->path, D1, D2);
     debugs(36, 3, HERE << "Cleaning directory " << p1);
-    dir_pointer = opendir(p1);
+    dir_pointer = opendir(p1.c_str());
 
     if (!dir_pointer) {
         int xerrno = errno;
         if (xerrno == ENOENT) {
             debugs(36, DBG_CRITICAL, MYNAME << "WARNING: Creating " << p1);
-            if (mkdir(p1, 0777) == 0)
+            if (mkdir(p1.c_str(), 0777) == 0)
                 return 0;
         }
 
         debugs(50, DBG_CRITICAL, MYNAME << p1 << ": " << xstrerr(xerrno));
-        safeunlink(p1, 1);
+        safeunlink(p1.c_str(), 1);
         return 0;
     }
 
@@ -1396,8 +1370,9 @@
 
     for (n = 0; n < k; ++n) {
         debugs(36, 3, HERE << "Cleaning file "<< std::setfill('0') << std::hex << std::uppercase << std::setw(8) << files[n]);
-        snprintf(p2, MAXPATHLEN + 1, "%s/%08X", p1, files[n]);
-        safeunlink(p2, 0);
+        SBuf p2(p1);
+        p2.appendf("/%08X", files[n]);
+        safeunlink(p2.c_str(), 0);
         ++statCounter.swap.files_cleaned;
     }
 
diff -u -r -N squid-4.1/src/fs/ufs/UFSSwapDir.h squid-4.2/src/fs/ufs/UFSSwapDir.h
--- squid-4.1/src/fs/ufs/UFSSwapDir.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/fs/ufs/UFSSwapDir.h	2018-08-06 02:13:41.000000000 +1200
@@ -140,7 +140,7 @@
     int createDirectory(const char *path, int);
     void createSwapSubDirs();
     void dumpEntry(StoreEntry &) const;
-    char *logFile(char const *ext = NULL)const;
+    SBuf logFile(char const *ext = nullptr) const;
     void changeIO(DiskIOModule *);
     bool optionIOParse(char const *option, const char *value, int reconfiguring);
     void optionIODump(StoreEntry * e) const;
diff -u -r -N squid-4.1/src/fs_io.cc squid-4.2/src/fs_io.cc
--- squid-4.1/src/fs_io.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/fs_io.cc	2018-08-06 02:13:41.000000000 +1200
@@ -504,26 +504,27 @@
     }
 }
 
-/*
- * Same as rename(2) but complains if something goes wrong;
- * the caller is responsible for handing and explaining the
- * consequences of errors.
- */
-int
-xrename(const char *from, const char *to)
+bool
+FileRename(const SBuf &from, const SBuf &to)
 {
-    debugs(21, 2, "xrename: renaming " << from << " to " << to);
+    debugs(21, 2, "renaming " << from << " to " << to);
+
+    // non-const copy for c_str()
+    SBuf from2(from);
+    // ensure c_str() lifetimes even if `to` and `from` share memory
+    SBuf to2(to.rawContent(), to.length());
+
 #if _SQUID_OS2_ || _SQUID_WINDOWS_
-    remove(to);
+    remove(to2.c_str());
 #endif
 
-    if (0 == rename(from, to))
-        return 0;
+    if (rename(from2.c_str(), to2.c_str()) == 0)
+        return true;
 
     int xerrno = errno;
-    debugs(21, errno == ENOENT ? 2 : 1, "xrename: Cannot rename " << from << " to " << to << ": " << xstrerr(xerrno));
+    debugs(21, (errno == ENOENT ? 2 : DBG_IMPORTANT), "Cannot rename " << from << " to " << to << ": " << xstrerr(xerrno));
 
-    return -1;
+    return false;
 }
 
 int
diff -u -r -N squid-4.1/src/fs_io.h squid-4.2/src/fs_io.h
--- squid-4.1/src/fs_io.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/fs_io.h	2018-08-06 02:13:41.000000000 +1200
@@ -12,6 +12,7 @@
 #define SQUID_FS_IO_H_
 
 #include "mem/forward.h"
+#include "sbuf/forward.h"
 #include "typedefs.h" //DRCB, DWCB
 
 class MemBuf;
@@ -47,7 +48,16 @@
 void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
 void file_read(int, char *, int, off_t, DRCB *, void *);
 void safeunlink(const char *path, int quiet);
-int xrename(const char *from, const char *to);
+
+/*
+ * Wrapper for rename(2) which complains if something goes wrong;
+ * the caller is responsible for handing and explaining the
+ * consequences of errors.
+ *
+ * \retval true successful rename
+ * \retval false an error occured
+ */
+bool FileRename(const SBuf &from, const SBuf &to);
 
 int fsBlockSize(const char *path, int *blksize);
 int fsStats(const char *, int *, int *, int *, int *);
diff -u -r -N squid-4.1/src/htcp.cc squid-4.2/src/htcp.cc
--- squid-4.1/src/htcp.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/htcp.cc	2018-08-06 02:13:41.000000000 +1200
@@ -151,18 +151,18 @@
     htcpDataHeader *dhdr = nullptr;
 };
 
-class htcpDetail {
+class htcpDetail
+{
     MEMPROXY_CLASS(htcpDetail);
 public:
-    htcpDetail() : resp_hdrs(nullptr), respHdrsSz(0), entity_hdrs(nullptr), entityHdrsSz(0), cache_hdrs(nullptr), cacheHdrsSz(0) {}
-    char *resp_hdrs;
-    size_t respHdrsSz;
+    char *resp_hdrs = nullptr;
+    size_t respHdrsSz = 0;
 
-    char *entity_hdrs;
-    size_t entityHdrsSz;
+    char *entity_hdrs = nullptr;
+    size_t entityHdrsSz = 0;
 
-    char *cache_hdrs;
-    size_t cacheHdrsSz;
+    char *cache_hdrs = nullptr;
+    size_t cacheHdrsSz = 0;
 };
 
 class htcpStuff
@@ -172,18 +172,14 @@
         op(o),
         rr(r),
         f1(f),
-        response(0),
-        reason(0),
         msg_id(id)
-    {
-        memset(&D, 0, sizeof(D));
-    }
+    {}
 
-    int op;
-    int rr;
-    int f1;
-    int response;
-    int reason;
+    int op = 0;
+    int rr = 0;
+    int f1 = 0;
+    int response = 0;
+    int reason = 0;
     uint32_t msg_id;
     htcpSpecifier S;
     htcpDetail D;
@@ -1438,7 +1434,6 @@
         return 0;
 
     old_squid_format = p->options.htcp_oldsquid;
-    memset(&flags, '\0', sizeof(flags));
     snprintf(vbuf, sizeof(vbuf), "%d/%d",
              req->http_ver.major, req->http_ver.minor);
 
@@ -1488,7 +1483,6 @@
         return;
 
     old_squid_format = p->options.htcp_oldsquid;
-    memset(&flags, '\0', sizeof(flags));
     snprintf(vbuf, sizeof(vbuf), "%d/%d",
              req->http_ver.major, req->http_ver.minor);
 
@@ -1585,6 +1579,7 @@
         return;
     al->htcp.opcode = htcpOpcodeStr[opcode];
     al->url = url;
+    al->setVirginUrlForMissingRequest(al->url);
     al->cache.caddr = caddr;
     al->cache.code = logcode;
     al->cache.trTime.tv_sec = 0;
diff -u -r -N squid-4.1/src/http/one/ResponseParser.cc squid-4.2/src/http/one/ResponseParser.cc
--- squid-4.1/src/http/one/ResponseParser.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/http/one/ResponseParser.cc	2018-08-06 02:13:41.000000000 +1200
@@ -121,16 +121,7 @@
 {
     Http1::Tokenizer tok(buf_);
 
-    CharacterSet WspDelim = CharacterSet::SP; // strict parse only accepts SP
-
-    if (Config.onoff.relaxed_header_parser) {
-        // RFC 7230 section 3.5
-        // tolerant parser MAY accept any of SP, HTAB, VT (%x0B), FF (%x0C), or bare CR
-        // as whitespace between status-line fields
-        WspDelim += CharacterSet::HTAB
-                    + CharacterSet("VT,FF","\x0B\x0C")
-                    + CharacterSet::CR;
-    }
+    const CharacterSet &WspDelim = DelimiterCharacters();
 
     if (msgProtocol_.protocol != AnyP::PROTO_NONE) {
         debugs(74, 6, "continue incremental parse for " << msgProtocol_);
diff -u -r -N squid-4.1/src/http/url_rewriters/LFS/url_lfs_rewrite.8 squid-4.2/src/http/url_rewriters/LFS/url_lfs_rewrite.8
--- squid-4.1/src/http/url_rewriters/LFS/url_lfs_rewrite.8	2018-07-02 15:39:08.000000000 +1200
+++ squid-4.2/src/http/url_rewriters/LFS/url_lfs_rewrite.8	2018-08-06 02:42:43.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "URL_LFS_REWRITE 8"
-.TH URL_LFS_REWRITE 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH URL_LFS_REWRITE 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/HttpMsg.h squid-4.2/src/HttpMsg.h
--- squid-4.1/src/HttpMsg.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/HttpMsg.h	2018-08-06 02:13:41.000000000 +1200
@@ -128,7 +128,7 @@
 };
 
 #define HTTPMSGUNLOCK(a) if (a) { if ((a)->unlock() == 0) delete (a); (a)=NULL; }
-#define HTTPMSGLOCK(a) (a)->lock()
+#define HTTPMSGLOCK(a) if (a) { (a)->lock(); }
 
 #endif /* SQUID_HTTPMSG_H */
 
diff -u -r -N squid-4.1/src/HttpReply.cc squid-4.2/src/HttpReply.cc
--- squid-4.1/src/HttpReply.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/HttpReply.cc	2018-08-06 02:13:41.000000000 +1200
@@ -82,18 +82,27 @@
 }
 
 void
-HttpReply::packHeadersInto(Packable * p) const
+HttpReply::packHeadersUsingFastPacker(Packable &p) const
 {
-    sline.packInto(p);
-    header.packInto(p);
-    p->append("\r\n", 2);
+    sline.packInto(&p);
+    header.packInto(&p);
+    p.append("\r\n", 2);
 }
 
 void
-HttpReply::packInto(Packable * p) const
+HttpReply::packHeadersUsingSlowPacker(Packable &p) const
 {
-    packHeadersInto(p);
-    body.packInto(p);
+    MemBuf buf;
+    buf.init();
+    packHeadersUsingFastPacker(buf);
+    p.append(buf.content(), buf.contentSize());
+}
+
+void
+HttpReply::packInto(MemBuf &buf) const
+{
+    packHeadersUsingFastPacker(buf);
+    body.packInto(&buf);
 }
 
 /* create memBuf, create mem-based packer, pack, destroy packer, return MemBuf */
@@ -102,7 +111,7 @@
 {
     MemBuf *mb = new MemBuf;
     mb->init();
-    packInto(mb);
+    packInto(*mb);
     return mb;
 }
 
diff -u -r -N squid-4.1/src/HttpReply.h squid-4.2/src/HttpReply.h
--- squid-4.1/src/HttpReply.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/HttpReply.h	2018-08-06 02:13:41.000000000 +1200
@@ -101,7 +101,11 @@
 
     int validatorsMatch (HttpReply const *other) const;
 
-    void packHeadersInto(Packable * p) const;
+    /// adds status line and header to the given Packable
+    /// assumes that `p` can quickly process small additions
+    void packHeadersUsingFastPacker(Packable &p) const;
+    /// same as packHeadersUsingFastPacker() but assumes that `p` cannot quickly process small additions
+    void packHeadersUsingSlowPacker(Packable &p) const;
 
     /** Clone this reply.
      *  Could be done as a copy-contructor but we do not want to accidently copy a HttpReply..
@@ -125,7 +129,7 @@
 
     void hdrCacheClean();
 
-    void packInto(Packable * p) const;
+    void packInto(MemBuf &) const;
 
     /* ez-routines */
     /** \return construct 304 reply and pack it into a MemBuf */
diff -u -r -N squid-4.1/src/HttpRequest.cc squid-4.2/src/HttpRequest.cc
--- squid-4.1/src/HttpRequest.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/HttpRequest.cc	2018-08-06 02:13:41.000000000 +1200
@@ -79,7 +79,7 @@
 #if USE_AUTH
     auth_user_request = NULL;
 #endif
-    memset(&flags, '\0', sizeof(flags));
+    flags = RequestFlags();
     range = NULL;
     ims = -1;
     imslen = 0;
@@ -673,6 +673,12 @@
     return url.absolute();
 }
 
+char *
+HttpRequest::canonicalCleanUrl() const
+{
+    return urlCanonicalCleanWithoutRequest(effectiveRequestUri(), method, url.getScheme());
+}
+
 void
 HttpRequest::manager(const CbcPointer<ConnStateData> &aMgr, const AccessLogEntryPointer &al)
 {
diff -u -r -N squid-4.1/src/HttpRequest.h squid-4.2/src/HttpRequest.h
--- squid-4.1/src/HttpRequest.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/HttpRequest.h	2018-08-06 02:13:41.000000000 +1200
@@ -70,6 +70,10 @@
     /// whether the client is likely to be able to handle a 1xx reply
     bool canHandle1xx() const;
 
+    /// \returns a pointer to a local static buffer containing request URI
+    /// that honors strip_query_terms and %-encodes unsafe URI characters
+    char *canonicalCleanUrl() const;
+
 #if USE_ADAPTATION
     /// Returns possibly nil history, creating it if adapt. logging is enabled
     Adaptation::History::Pointer adaptLogHistory() const;
diff -u -r -N squid-4.1/src/icmp/Icmp.h squid-4.2/src/icmp/Icmp.h
--- squid-4.1/src/icmp/Icmp.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/icmp/Icmp.h	2018-08-06 02:13:41.000000000 +1200
@@ -22,20 +22,23 @@
 #if USE_ICMP
 
 /* This is a line-data format struct. DO NOT alter. */
-struct pingerEchoData {
+struct pingerEchoData
+{
+    pingerEchoData() { memset(&payload, 0, sizeof(payload)); }
     Ip::Address to;
-    unsigned char opcode;
-    int psize;
+    unsigned char opcode = '\0';
+    int psize = 0;
     char payload[PINGER_PAYLOAD_SZ];
 };
 
 /* This is a line-data format struct. DO NOT alter. */
 struct pingerReplyData {
+    pingerReplyData() { memset(&payload, 0, sizeof(payload)); }
     Ip::Address from;
-    unsigned char opcode;
-    int rtt;
-    int hops;
-    int psize;
+    unsigned char opcode = '\0';
+    int rtt = 0;
+    int hops = 0;
+    int psize = 0;
     char payload[PINGER_PAYLOAD_SZ];
 };
 
@@ -65,7 +68,7 @@
 {
 public:
     Icmp();
-    virtual ~Icmp() {};
+    virtual ~Icmp() {}
 
     /// Start pinger helper and initiate control channel
     virtual int Open() =0;
diff -u -r -N squid-4.1/src/icmp/IcmpPinger.cc squid-4.2/src/icmp/IcmpPinger.cc
--- squid-4.1/src/icmp/IcmpPinger.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/icmp/IcmpPinger.cc	2018-08-06 02:13:41.000000000 +1200
@@ -166,7 +166,7 @@
     int n;
     int guess_size;
 
-    memset(&pecho, '\0', sizeof(pecho));
+    pecho = pingerEchoData();
     n = recv(socket_from_squid, &pecho, sizeof(pecho), 0);
 
     if (n < 0) {
diff -u -r -N squid-4.1/src/icmp/IcmpSquid.cc squid-4.2/src/icmp/IcmpSquid.cc
--- squid-4.1/src/icmp/IcmpSquid.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/icmp/IcmpSquid.cc	2018-08-06 02:13:41.000000000 +1200
@@ -125,7 +125,6 @@
     static Ip::Address F;
 
     Comm::SetSelect(icmp_sock, COMM_SELECT_READ, icmpSquidRecv, NULL, 0);
-    memset(&preply, '\0', sizeof(pingerReplyData));
     n = comm_udp_recv(icmp_sock,
                       (char *) &preply,
                       sizeof(pingerReplyData),
diff -u -r -N squid-4.1/src/icmp/net_db.cc squid-4.2/src/icmp/net_db.cc
--- squid-4.1/src/icmp/net_db.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/icmp/net_db.cc	2018-08-06 02:13:41.000000000 +1200
@@ -590,7 +590,7 @@
         char *q;
         assert(s - buf < l);
         *s = '\0';
-        memset(&N, '\0', sizeof(netdbEntry));
+        N = netdbEntry();
         q = strtok(t, w_space);
         t = s + 1;
 
diff -u -r -N squid-4.1/src/icp_v2.cc squid-4.2/src/icp_v2.cc
--- squid-4.1/src/icp_v2.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/icp_v2.cc	2018-08-06 02:13:41.000000000 +1200
@@ -198,6 +198,8 @@
 
     al->url = url;
 
+    al->setVirginUrlForMissingRequest(al->url);
+
     al->cache.caddr = caddr;
 
     // XXX: move to use icp.clientReply instead
diff -u -r -N squid-4.1/src/ident/Ident.cc squid-4.2/src/ident/Ident.cc
--- squid-4.1/src/ident/Ident.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/ident/Ident.cc	2018-08-06 02:13:41.000000000 +1200
@@ -239,11 +239,13 @@
     IdentStateData *state;
     char key1[IDENT_KEY_SZ];
     char key2[IDENT_KEY_SZ];
-    char key[IDENT_KEY_SZ];
+    char key[IDENT_KEY_SZ*2+2]; // key1 + ',' + key2 + terminator
 
     conn->local.toUrl(key1, IDENT_KEY_SZ);
     conn->remote.toUrl(key2, IDENT_KEY_SZ);
-    snprintf(key, IDENT_KEY_SZ, "%s,%s", key1, key2);
+    const auto res = snprintf(key, sizeof(key), "%s,%s", key1, key2);
+    assert(res > 0);
+    assert(static_cast<std::make_unsigned<decltype(res)>::type>(res) < sizeof(key));
 
     if (!ident_hash) {
         Init();
diff -u -r -N squid-4.1/src/ipc/StoreMap.cc squid-4.2/src/ipc/StoreMap.cc
--- squid-4.1/src/ipc/StoreMap.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/ipc/StoreMap.cc	2018-08-06 02:13:41.000000000 +1200
@@ -756,8 +756,6 @@
 
 Ipc::StoreMapAnchor::StoreMapAnchor(): start(0), splicingPoint(-1)
 {
-    memset(&key, 0, sizeof(key));
-    memset(&basics, 0, sizeof(basics));
     // keep in sync with rewind()
 }
 
@@ -815,7 +813,7 @@
     start = 0;
     splicingPoint = -1;
     memset(&key, 0, sizeof(key));
-    memset(&basics, 0, sizeof(basics));
+    basics.clear();
     waitingToBeFreed = false;
     writerHalted = false;
     // but keep the lock
diff -u -r -N squid-4.1/src/ipc/StoreMap.h squid-4.2/src/ipc/StoreMap.h
--- squid-4.1/src/ipc/StoreMap.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/ipc/StoreMap.h	2018-08-06 02:13:41.000000000 +1200
@@ -82,17 +82,26 @@
     // fields marked with [app] can be modified when appending-while-reading
     // fields marked with [update] can be modified when updating-while-reading
 
-    uint64_t key[2]; ///< StoreEntry key
+    uint64_t key[2] = {0, 0}; ///< StoreEntry key
 
     // STORE_META_STD TLV field from StoreEntry
     struct Basics {
-        time_t timestamp;
-        time_t lastref;
-        time_t expires;
-        time_t lastmod;
+        void clear() {
+            timestamp = 0;
+            lastref = 0;
+            expires = 0;
+            lastmod = 0;
+            swap_file_sz.store(0);
+            refcount = 0;
+            flags = 0;
+        }
+        time_t timestamp = 0;
+        time_t lastref = 0;
+        time_t expires = 0;
+        time_t lastmod = 0;
         std::atomic<uint64_t> swap_file_sz; // [app]
-        uint16_t refcount;
-        uint16_t flags;
+        uint16_t refcount = 0;
+        uint16_t flags = 0;
     } basics;
 
     /// where the chain of StoreEntry slices begins [app]
diff -u -r -N squid-4.1/src/ipc/TypedMsgHdr.cc squid-4.2/src/ipc/TypedMsgHdr.cc
--- squid-4.1/src/ipc/TypedMsgHdr.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/ipc/TypedMsgHdr.cc	2018-08-06 02:13:41.000000000 +1200
@@ -18,25 +18,42 @@
 
 Ipc::TypedMsgHdr::TypedMsgHdr()
 {
-    memset(this, 0, sizeof(*this));
+    clear();
     sync();
 }
 
 Ipc::TypedMsgHdr::TypedMsgHdr(const TypedMsgHdr &tmh)
 {
-    memcpy(this, &tmh, sizeof(*this));
-    sync();
+    clear();
+    operator =(tmh);
 }
 
 Ipc::TypedMsgHdr &Ipc::TypedMsgHdr::operator =(const TypedMsgHdr &tmh)
 {
     if (this != &tmh) { // skip assignment to self
-        memcpy(this, &tmh, sizeof(*this));
+        memcpy(static_cast<msghdr*>(this), static_cast<const msghdr*>(&tmh), sizeof(msghdr));
+        name = tmh.name;
+        memcpy(&ios, &tmh.ios, sizeof(ios));
+        data = tmh.data;
+        ctrl = tmh.ctrl;
+        offset = tmh.offset;
         sync();
     }
     return *this;
 }
 
+void
+Ipc::TypedMsgHdr::clear()
+{
+    // may be called from the constructor, with object fields uninitialized
+    memset(static_cast<msghdr*>(this), 0, sizeof(msghdr));
+    memset(&name, 0, sizeof(name));
+    memset(&ios, 0, sizeof(ios));
+    data = DataBuffer();
+    ctrl = CtrlBuffer();
+    offset = 0;
+}
+
 // update msghdr and ios pointers based on msghdr counters
 void Ipc::TypedMsgHdr::sync()
 {
@@ -223,7 +240,9 @@
 void
 Ipc::TypedMsgHdr::prepForReading()
 {
-    memset(this, 0, sizeof(*this));
+    clear();
+    // no sync() like other clear() calls because the
+    // alloc*() below "sync()" the parts they allocate.
     allocName();
     allocData();
     allocControl();
diff -u -r -N squid-4.1/src/ipc/TypedMsgHdr.h squid-4.2/src/ipc/TypedMsgHdr.h
--- squid-4.1/src/ipc/TypedMsgHdr.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/ipc/TypedMsgHdr.h	2018-08-06 02:13:41.000000000 +1200
@@ -74,6 +74,7 @@
     size_t size() const { return sizeof(*this); } ///< not true message size
 
 private:
+    void clear();
     void sync();
     void allocData();
     void allocName();
@@ -89,18 +90,22 @@
     struct iovec ios[1]; ///< same as .msg_iov[]
 
     struct DataBuffer {
-        int type_; ///< Message kind, uses MessageType values
-        size_t size; ///< actual raw data size (for sanity checks)
+        DataBuffer() { memset(raw, 0, sizeof(raw)); }
+
+        int type_ = 0; ///< Message kind, uses MessageType values
+        size_t size = 0; ///< actual raw data size (for sanity checks)
         char raw[maxSize]; ///< buffer with type-specific data
     } data; ///< same as .msg_iov[0].iov_base
 
     struct CtrlBuffer {
+        CtrlBuffer() { memset(raw, 0, sizeof(raw)); }
+
         /// control buffer space for one fd
         char raw[SQUID_CMSG_SPACE(sizeof(int))];
     } ctrl; ///< same as .msg_control
 
     /// data offset for the next get/put*() to start with
-    mutable unsigned int offset;
+    mutable unsigned int offset = 0;
 };
 
 } // namespace Ipc
diff -u -r -N squid-4.1/src/ipcache.cc squid-4.2/src/ipcache.cc
--- squid-4.1/src/ipcache.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/ipcache.cc	2018-08-06 02:13:41.000000000 +1200
@@ -575,8 +575,7 @@
     int n;
     debugs(14, DBG_IMPORTANT, "Initializing IP Cache...");
     memset(&IpcacheStats, '\0', sizeof(IpcacheStats));
-    memset(&lru_list, '\0', sizeof(lru_list));
-    memset(&static_addrs, '\0', sizeof(ipcache_addrs));
+    lru_list = dlink_list();
 
     static_addrs.in_addrs = static_cast<Ip::Address *>(xcalloc(1, sizeof(Ip::Address)));
     static_addrs.in_addrs->setEmpty(); // properly setup the Ip::Address!
diff -u -r -N squid-4.1/src/log/DB/log_db_daemon.8 squid-4.2/src/log/DB/log_db_daemon.8
--- squid-4.1/src/log/DB/log_db_daemon.8	2018-07-02 15:39:08.000000000 +1200
+++ squid-4.2/src/log/DB/log_db_daemon.8	2018-08-06 02:42:43.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "LOG_DB_DAEMON 8"
-.TH LOG_DB_DAEMON 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH LOG_DB_DAEMON 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/log/ModStdio.cc squid-4.2/src/log/ModStdio.cc
--- squid-4.1/src/log/ModStdio.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/log/ModStdio.cc	2018-08-06 02:13:41.000000000 +1200
@@ -106,8 +106,6 @@
     struct stat sb;
 #endif
 
-    char from[MAXPATHLEN];
-    char to[MAXPATHLEN];
     l_stdio_t *ll = (l_stdio_t *) lf->data;
     const char *realpath = lf->path+6; // skip 'stdio:' prefix.
     assert(realpath);
@@ -122,12 +120,17 @@
 
     debugs(0, DBG_IMPORTANT, "Rotate log file " << lf->path);
 
+    SBuf basePath(realpath);
+
     /* Rotate numbers 0 through N up one */
     for (int16_t i = nRotate; i > 1;) {
         --i;
-        snprintf(from, MAXPATHLEN, "%s.%d", realpath, i - 1);
-        snprintf(to, MAXPATHLEN, "%s.%d", realpath, i);
-        xrename(from, to);
+        SBuf from(basePath);
+        from.appendf(".%d", i-1);
+        SBuf to(basePath);
+        to.appendf(".%d", i);
+        FileRename(from, to);
+        // TODO handle rename errors
     }
 
     /* Rotate the current log to .0 */
@@ -136,8 +139,10 @@
     file_close(ll->fd);     /* always close */
 
     if (nRotate > 0) {
-        snprintf(to, MAXPATHLEN, "%s.%d", realpath, 0);
-        xrename(realpath, to);
+        SBuf to(basePath);
+        to.appendf(".0");
+        FileRename(basePath, to);
+        // TODO handle rename errors
     }
     /* Reopen the log.  It may have been renamed "manually" */
     ll->fd = file_open(realpath, O_WRONLY | O_CREAT | O_TEXT);
diff -u -r -N squid-4.1/src/Makefile.am squid-4.2/src/Makefile.am
--- squid-4.1/src/Makefile.am	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/Makefile.am	2018-08-06 02:13:41.000000000 +1200
@@ -1370,7 +1370,6 @@
 	tests/stub_SwapDir.cc \
 	MemStore.cc \
 	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
 	urn.h \
 	urn.cc \
 	wccp2.h \
@@ -1804,7 +1803,6 @@
 	tests/stub_tunnel.cc \
 	MemStore.cc \
 	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
 	urn.h \
 	urn.cc \
 	wccp2.h \
@@ -2040,7 +2038,6 @@
 	tests/stub_tunnel.cc \
 	MemStore.cc \
 	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
 	urn.h \
 	urn.cc \
 	wccp2.h \
@@ -2271,7 +2268,6 @@
 	tools.cc \
 	tests/stub_tunnel.cc \
 	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
 	urn.h \
 	urn.cc \
 	wccp2.h \
diff -u -r -N squid-4.1/src/Makefile.in squid-4.2/src/Makefile.in
--- squid-4.1/src/Makefile.in	2018-07-02 15:32:02.000000000 +1200
+++ squid-4.2/src/Makefile.in	2018-08-06 02:31:39.000000000 +1200
@@ -570,9 +570,9 @@
 	StoreIOState.cc tests/stub_StoreMeta.cc StoreMetaUnpacker.cc \
 	StoreSwapLogData.cc tools.h tools.cc Transients.cc \
 	tests/stub_tunnel.cc tests/stub_SwapDir.cc MemStore.cc \
-	unlinkd.h unlinkd.cc tests/stub_libanyp.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
+	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) \
@@ -627,9 +627,9 @@
 	StoreSwapLogData.$(OBJEXT) tools.$(OBJEXT) \
 	Transients.$(OBJEXT) tests/stub_tunnel.$(OBJEXT) \
 	tests/stub_SwapDir.$(OBJEXT) MemStore.$(OBJEXT) \
-	$(am__objects_12) tests/stub_libanyp.$(OBJEXT) urn.$(OBJEXT) \
-	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
-	FadingCounter.$(OBJEXT) $(am__objects_13) wordlist.$(OBJEXT)
+	$(am__objects_12) urn.$(OBJEXT) tests/stub_wccp2.$(OBJEXT) \
+	tests/stub_whois.$(OBJEXT) FadingCounter.$(OBJEXT) \
+	$(am__objects_13) wordlist.$(OBJEXT)
 nodist_tests_testCacheManager_OBJECTS = $(am__objects_17)
 tests_testCacheManager_OBJECTS = $(am_tests_testCacheManager_OBJECTS) \
 	$(nodist_tests_testCacheManager_OBJECTS)
@@ -874,9 +874,8 @@
 	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 tests/stub_libanyp.cc urn.h urn.cc \
-	wccp2.h tests/stub_wccp2.cc whois.h tests/stub_whois.cc \
-	win32.cc wordlist.h wordlist.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) \
 	BodyPipe.$(OBJEXT) tests/stub_CacheDigest.$(OBJEXT) \
 	cache_cf.$(OBJEXT) CachePeer.$(OBJEXT) cache_manager.$(OBJEXT) \
@@ -931,9 +930,9 @@
 	tests/stub_store_stats.$(OBJEXT) time.$(OBJEXT) \
 	tools.$(OBJEXT) Transients.$(OBJEXT) \
 	tests/stub_tunnel.$(OBJEXT) MemStore.$(OBJEXT) \
-	$(am__objects_12) tests/stub_libanyp.$(OBJEXT) urn.$(OBJEXT) \
-	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
-	$(am__objects_13) wordlist.$(OBJEXT)
+	$(am__objects_12) urn.$(OBJEXT) tests/stub_wccp2.$(OBJEXT) \
+	tests/stub_whois.$(OBJEXT) $(am__objects_13) \
+	wordlist.$(OBJEXT)
 nodist_tests_testEvent_OBJECTS = $(am__objects_17)
 tests_testEvent_OBJECTS = $(am_tests_testEvent_OBJECTS) \
 	$(nodist_tests_testEvent_OBJECTS)
@@ -1013,9 +1012,8 @@
 	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 tests/stub_libanyp.cc urn.h urn.cc wccp2.h \
-	tests/stub_wccp2.cc whois.h tests/stub_whois.cc win32.cc \
-	wordlist.h wordlist.cc
+	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) \
 	BodyPipe.$(OBJEXT) tests/stub_CacheDigest.$(OBJEXT) \
 	cache_manager.$(OBJEXT) cache_cf.$(OBJEXT) CachePeer.$(OBJEXT) \
@@ -1070,9 +1068,9 @@
 	tests/stub_store_stats.$(OBJEXT) time.$(OBJEXT) \
 	tools.$(OBJEXT) Transients.$(OBJEXT) \
 	tests/stub_tunnel.$(OBJEXT) MemStore.$(OBJEXT) \
-	$(am__objects_12) tests/stub_libanyp.$(OBJEXT) urn.$(OBJEXT) \
-	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
-	$(am__objects_13) wordlist.$(OBJEXT)
+	$(am__objects_12) urn.$(OBJEXT) tests/stub_wccp2.$(OBJEXT) \
+	tests/stub_whois.$(OBJEXT) $(am__objects_13) \
+	wordlist.$(OBJEXT)
 nodist_tests_testEventLoop_OBJECTS = $(am__objects_17)
 tests_testEventLoop_OBJECTS = $(am_tests_testEventLoop_OBJECTS) \
 	$(nodist_tests_testEventLoop_OBJECTS)
@@ -1963,9 +1961,9 @@
 	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 \
-	tests/stub_libanyp.cc urn.h urn.cc wccp2.h tests/stub_wccp2.cc \
-	whois.h tests/stub_whois.cc win32.cc wordlist.h wordlist.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) cache_cf.$(OBJEXT) CachePeer.$(OBJEXT) \
 	cache_manager.$(OBJEXT) tests/stub_CacheDigest.$(OBJEXT) \
@@ -2018,8 +2016,7 @@
 	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) \
-	tests/stub_libanyp.$(OBJEXT) urn.$(OBJEXT) \
+	tests/stub_tunnel.$(OBJEXT) $(am__objects_12) urn.$(OBJEXT) \
 	tests/stub_wccp2.$(OBJEXT) tests/stub_whois.$(OBJEXT) \
 	$(am__objects_13) wordlist.$(OBJEXT)
 nodist_tests_test_http_range_OBJECTS = $(am__objects_17)
@@ -3648,7 +3645,6 @@
 	tests/stub_SwapDir.cc \
 	MemStore.cc \
 	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
 	urn.h \
 	urn.cc \
 	wccp2.h \
@@ -4089,7 +4085,6 @@
 	tests/stub_tunnel.cc \
 	MemStore.cc \
 	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
 	urn.h \
 	urn.cc \
 	wccp2.h \
@@ -4326,7 +4321,6 @@
 	tests/stub_tunnel.cc \
 	MemStore.cc \
 	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
 	urn.h \
 	urn.cc \
 	wccp2.h \
@@ -4559,7 +4553,6 @@
 	tools.cc \
 	tests/stub_tunnel.cc \
 	$(UNLINKDSOURCE) \
-	tests/stub_libanyp.cc \
 	urn.h \
 	urn.cc \
 	wccp2.h \
diff -u -r -N squid-4.1/src/mem/old_api.cc squid-4.2/src/mem/old_api.cc
--- squid-4.1/src/mem/old_api.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/mem/old_api.cc	2018-08-06 02:13:41.000000000 +1200
@@ -113,23 +113,18 @@
     return *strPools[type];
 }
 
-/* Find the best fit string pool type */
-static mem_type
-memFindStringSizeType(size_t net_size, bool fuzzy)
+/// \returns the best-fit string pool or nil
+static MemAllocator *
+memFindStringPool(size_t net_size, bool fuzzy)
 {
-    mem_type type = MEM_NONE;
     for (unsigned int i = 0; i < mem_str_pool_count; ++i) {
         auto &pool = GetStrPool(i);
-        if (fuzzy && net_size < pool.objectSize()) {
-            type = static_cast<mem_type>(i);
-            break;
-        } else if (net_size == pool.objectSize()) {
-            type = static_cast<mem_type>(i);
-            break;
-        }
+        if (fuzzy && net_size < pool.objectSize())
+            return &pool;
+        if (net_size == pool.objectSize())
+            return &pool;
     }
-
-    return type;
+    return nullptr;
 }
 
 static void
@@ -236,14 +231,12 @@
 {
     assert(gross_size);
 
-    auto type = memFindStringSizeType(net_size, true);
-    if (type != MEM_NONE) {
-        auto &pool = GetStrPool(type);
-        *gross_size = pool.objectSize();
+    if (const auto pool = memFindStringPool(net_size, true)) {
+        *gross_size = pool->objectSize();
         assert(*gross_size >= net_size);
         ++StrCountMeter;
         StrVolumeMeter += *gross_size;
-        return pool.alloc();
+        return pool->alloc();
     }
 
     *gross_size = net_size;
@@ -269,9 +262,8 @@
 {
     assert(buf);
 
-    auto type = memFindStringSizeType(size, false);
-    if (type != MEM_NONE)
-        GetStrPool(type).freeOne(buf);
+    if (const auto pool = memFindStringPool(size, false))
+        pool->freeOne(buf);
     else
         xfree(buf);
 
diff -u -r -N squid-4.1/src/MemObject.cc squid-4.2/src/MemObject.cc
--- squid-4.1/src/MemObject.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/MemObject.cc	2018-08-06 02:13:41.000000000 +1200
@@ -96,30 +96,18 @@
 #endif
 }
 
-MemObject::MemObject() :
-    inmem_lo(0),
-    nclients(0),
-    request(nullptr),
-    ping_reply_callback(nullptr),
-    ircb_data(nullptr),
-    id(0),
-    object_sz(-1),
-    swap_hdr_sz(0),
-#if URL_CHECKSUM_DEBUG
-    chksum(0),
-#endif
-    vary_headers(nullptr)
+MemObject::MemObject()
 {
-    debugs(20, 3, "new MemObject " << this);
+    debugs(20, 3, "MemObject constructed, this=" << this);
+    ping_reply_callback = nullptr;
     memset(&start_ping, 0, sizeof(start_ping));
-    memset(&abort, 0, sizeof(abort));
     _reply = new HttpReply;
     HTTPMSGLOCK(_reply);
 }
 
 MemObject::~MemObject()
 {
-    debugs(20, 3, "del MemObject " << this);
+    debugs(20, 3, "MemObject destructed, this=" << this);
     const Ctx ctx = ctx_enter(hasUris() ? urlXXX() : "[unknown_ctx]");
 
 #if URL_CHECKSUM_DEBUG
diff -u -r -N squid-4.1/src/MemObject.h squid-4.2/src/MemObject.h
--- squid-4.1/src/MemObject.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/MemObject.h	2018-08-06 02:13:41.000000000 +1200
@@ -103,26 +103,24 @@
 
     HttpRequestMethod method;
     mem_hdr data_hdr;
-    int64_t inmem_lo;
+    int64_t inmem_lo = 0;
     dlink_list clients;
 
     size_t clientCount() const {return nclients;}
 
     bool clientIsFirst(void *sc) const {return (clients.head && sc == clients.head->data);}
 
-    int nclients;
+    int nclients = 0;
 
     class SwapOut
     {
     public:
-        SwapOut() : queue_offset(0), decision(swNeedsCheck) {}
-
-        int64_t queue_offset; ///< number of bytes sent to SwapDir for writing
+        int64_t queue_offset = 0; ///< number of bytes sent to SwapDir for writing
         StoreIOState::Pointer sio;
 
         /// Decision states for StoreEntry::swapoutPossible() and related code.
         typedef enum { swNeedsCheck = 0, swImpossible = -1, swPossible = +1, swStarted } Decision;
-        Decision decision; ///< current decision state
+        Decision decision = swNeedsCheck; ///< current decision state
     };
 
     SwapOut swapout;
@@ -138,10 +136,8 @@
     class XitTable
     {
     public:
-        XitTable(): index(-1), io(ioUndecided) {}
-
-        int32_t index; ///< entry position inside the in-transit table
-        Io io; ///< current I/O state
+        int32_t index = -1; ///< entry position inside the in-transit table
+        Io io = ioUndecided; ///< current I/O state
     };
     XitTable xitTable; ///< current [shared] memory caching state for the entry
 
@@ -149,34 +145,32 @@
     class MemCache
     {
     public:
-        MemCache(): index(-1), offset(0), io(ioUndecided) {}
+        int32_t index = -1; ///< entry position inside the memory cache
+        int64_t offset = 0; ///< bytes written/read to/from the memory cache so far
 
-        int32_t index; ///< entry position inside the memory cache
-        int64_t offset; ///< bytes written/read to/from the memory cache so far
-
-        Io io; ///< current I/O state
+        Io io = ioUndecided; ///< current I/O state
     };
     MemCache memCache; ///< current [shared] memory caching state for the entry
 
     /* Read only - this reply must be preserved by store clients */
     /* The original reply. possibly with updated metadata. */
-    HttpRequest *request;
+    HttpRequest *request = nullptr;
 
     struct timeval start_ping;
     IRCB *ping_reply_callback;
-    void *ircb_data;
+    void *ircb_data = nullptr;
 
-    struct {
+    struct abort_ {
+        abort_() { callback = nullptr; }
         STABH *callback;
-        void *data;
+        void *data = nullptr;
     } abort;
     RemovalPolicyNode repl;
-    int id;
-    int64_t object_sz;
-    size_t swap_hdr_sz;
+    int id = 0;
+    int64_t object_sz = -1;
+    size_t swap_hdr_sz = 0;
 #if URL_CHECKSUM_DEBUG
-
-    unsigned int chksum;
+    unsigned int chksum = 0;
 #endif
 
     SBuf vary_headers;
@@ -185,7 +179,7 @@
     void kickReads();
 
 private:
-    HttpReply *_reply;
+    HttpReply *_reply = nullptr;
 
     mutable String storeId_; ///< StoreId for our entry (usually request URI)
     mutable String logUri_;  ///< URI used for logging (usually request URI)
diff -u -r -N squid-4.1/src/MemStore.cc squid-4.2/src/MemStore.cc
--- squid-4.1/src/MemStore.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/MemStore.cc	2018-08-06 02:13:41.000000000 +1200
@@ -374,7 +374,7 @@
 
     Must(update.stale.anchor);
     ShmWriter writer(*this, update.entry, update.fresh.fileNo);
-    reply.packHeadersInto(&writer);
+    reply.packHeadersUsingSlowPacker(writer);
     const uint64_t freshHdrSz = writer.totalWritten;
     debugs(20, 7, "fresh hdr_sz: " << freshHdrSz << " diff: " << (freshHdrSz - staleHdrSz));
 
diff -u -r -N squid-4.1/src/neighbors.cc squid-4.2/src/neighbors.cc
--- squid-4.1/src/neighbors.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/neighbors.cc	2018-08-06 02:13:41.000000000 +1200
@@ -1150,14 +1150,6 @@
     return 1;
 }
 
-void
-peerNoteDigestGone(CachePeer * p)
-{
-#if USE_CACHE_DIGESTS
-    cbdataReferenceDone(p->digest);
-#endif
-}
-
 /// \returns the effective connect timeout for this peer
 time_t
 peerConnectTimeout(const CachePeer *peer)
diff -u -r -N squid-4.1/src/peer_digest.cc squid-4.2/src/peer_digest.cc
--- squid-4.1/src/peer_digest.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/peer_digest.cc	2018-08-06 02:13:41.000000000 +1200
@@ -66,23 +66,20 @@
 
 static time_t pd_last_req_time = 0; /* last call to Check */
 
-/* initialize peer digest */
-static void
-peerDigestInit(PeerDigest * pd, CachePeer * p)
+PeerDigest::PeerDigest(CachePeer * p)
 {
-    assert(pd && p);
+    assert(p);
 
-    memset(pd, 0, sizeof(*pd));
     /*
      * DPW 2007-04-12
      * Lock on to the peer here.  The corresponding cbdataReferenceDone()
      * is in peerDigestDestroy().
      */
-    pd->peer = cbdataReference(p);
+    peer = cbdataReference(p);
     /* if peer disappears, we will know it's name */
-    pd->host = p->host;
+    host = p->host;
 
-    pd->times.initialized = squid_curtime;
+    times.initialized = squid_curtime;
 }
 
 CBDATA_CLASS_INIT(PeerDigest);
@@ -129,17 +126,22 @@
 }
 
 /* allocate new peer digest, call Init, and lock everything */
-PeerDigest *
+void
 peerDigestCreate(CachePeer * p)
 {
-    PeerDigest *pd;
     assert(p);
 
-    pd = new PeerDigest;
-    peerDigestInit(pd, p);
+    PeerDigest *pd = new PeerDigest(p);
 
-    /* XXX This does not look right, and the same thing again in the caller */
-    return cbdataReference(pd);
+    // TODO: make CachePeer member a CbcPointer
+    p->digest = cbdataReference(pd);
+
+    // lock a reference to pd again to prevent the PeerDigest
+    // disappearing during peerDigestDestroy() when
+    // cbdataReferenceValidDone is called.
+    // TODO test if it can be moved into peerDigestDestroy() or
+    //      if things can break earlier (eg CachePeer death).
+    (void)cbdataReference(pd);
 }
 
 /* call Clean and free/unlock everything */
@@ -152,19 +154,24 @@
 
     /*
      * DPW 2007-04-12
-     * We locked the peer in peerDigestInit(), this is
-     * where we unlock it.  If the peer is still valid,
-     * tell it that the digest is gone.
+     * We locked the peer in PeerDigest constructor, this is
+     * where we unlock it.
      */
-    if (cbdataReferenceValidDone(peerTmp, &p))
-        peerNoteDigestGone((CachePeer *)p);
-
-    delete pd->cd;
-    pd->host.clean();
+    if (cbdataReferenceValidDone(peerTmp, &p)) {
+        // we locked the p->digest in peerDigestCreate()
+        // this is where we unlock that
+        cbdataReferenceDone(static_cast<CachePeer *>(p)->digest);
+    }
 
     delete pd;
 }
 
+PeerDigest::~PeerDigest()
+{
+    delete cd;
+    // req_result pointer is not owned by us
+}
+
 /* called by peer to indicate that somebody actually needs this digest */
 void
 peerDigestNeeded(PeerDigest * pd)
diff -u -r -N squid-4.1/src/PeerDigest.h squid-4.2/src/PeerDigest.h
--- squid-4.1/src/PeerDigest.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/PeerDigest.h	2018-08-06 02:13:41.000000000 +1200
@@ -76,35 +76,38 @@
     CBDATA_CLASS(PeerDigest);
 
 public:
-    CachePeer *peer;          /**< pointer back to peer structure, argh */
-    CacheDigest *cd;            /**< actual digest structure */
+    PeerDigest(CachePeer *);
+    ~PeerDigest();
+
+    CachePeer *peer = nullptr;          /**< pointer back to peer structure, argh */
+    CacheDigest *cd = nullptr;            /**< actual digest structure */
     String host;                /**< copy of peer->host */
-    const char *req_result;     /**< text status of the last request */
+    const char *req_result = nullptr;     /**< text status of the last request */
 
     struct {
-        bool needed;          /**< there were requests for this digest */
-        bool usable;          /**< can be used for lookups */
-        bool requested;       /**< in process of receiving [fresh] digest */
+        bool needed = false;          /**< there were requests for this digest */
+        bool usable = false;          /**< can be used for lookups */
+        bool requested = false;       /**< in process of receiving [fresh] digest */
     } flags;
 
     struct {
         /* all times are absolute unless augmented with _delay */
-        time_t initialized; /* creation */
-        time_t needed;      /* first lookup/use by a peer */
-        time_t next_check;  /* next scheduled check/refresh event */
-        time_t retry_delay; /* delay before re-checking _invalid_ digest */
-        time_t requested;   /* requested a fresh copy of a digest */
-        time_t req_delay;   /* last request response time */
-        time_t received;    /* received the current copy of a digest */
-        time_t disabled;    /* disabled for good */
+        time_t initialized = 0; /* creation */
+        time_t needed = 0;      /* first lookup/use by a peer */
+        time_t next_check = 0;  /* next scheduled check/refresh event */
+        time_t retry_delay = 0; /* delay before re-checking _invalid_ digest */
+        time_t requested = 0;   /* requested a fresh copy of a digest */
+        time_t req_delay = 0;   /* last request response time */
+        time_t received = 0;    /* received the current copy of a digest */
+        time_t disabled = 0;    /* disabled for good */
     } times;
 
     struct {
         CacheDigestGuessStats guess;
-        int used_count;
+        int used_count = 0;
 
         struct {
-            int msgs;
+            int msgs = 0;
             ByteCounter kbytes;
         } sent, recv;
     } stats;
@@ -112,7 +115,7 @@
 
 extern const Version CacheDigestVer;
 
-PeerDigest *peerDigestCreate(CachePeer * p);
+void peerDigestCreate(CachePeer * p);
 void peerDigestNeeded(PeerDigest * pd);
 void peerDigestNotePeerGone(PeerDigest * pd);
 void peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e);
diff -u -r -N squid-4.1/src/security/cert_validators/fake/security_fake_certverify.8 squid-4.2/src/security/cert_validators/fake/security_fake_certverify.8
--- squid-4.1/src/security/cert_validators/fake/security_fake_certverify.8	2018-07-02 15:39:08.000000000 +1200
+++ squid-4.2/src/security/cert_validators/fake/security_fake_certverify.8	2018-08-06 02:42:44.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "SECURITY_FAKE_CERTVERIFY 8"
-.TH SECURITY_FAKE_CERTVERIFY 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH SECURITY_FAKE_CERTVERIFY 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/security/ServerOptions.cc squid-4.2/src/security/ServerOptions.cc
--- squid-4.1/src/security/ServerOptions.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/security/ServerOptions.cc	2018-08-06 02:13:41.000000000 +1200
@@ -61,7 +61,9 @@
     }
 
     // parse the server-only options
-    if (strncmp(token, "dh=", 3) == 0) {
+    if (strncmp(token, "clientca=", 9) == 0) {
+        clientCaFile = SBuf(token + 9);
+    } else if (strncmp(token, "dh=", 3) == 0) {
         // clear any previous Diffi-Helman configuration
         dh.clear();
         dhParamsFile.clear();
@@ -264,13 +266,14 @@
         }
 #endif
 
+        if (!loadClientCaFile())
+            return false;
+
+        // by this point all config related files must be loaded
         if (!updateContextConfig(t)) {
             debugs(83, DBG_CRITICAL, "ERROR: Configuring static TLS context");
             return false;
         }
-
-        if (!loadClientCaFile())
-            return false;
     }
 
     staticContext = std::move(t);
diff -u -r -N squid-4.1/src/servers/FtpServer.cc squid-4.2/src/servers/FtpServer.cc
--- squid-4.1/src/servers/FtpServer.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/servers/FtpServer.cc	2018-08-06 02:13:41.000000000 +1200
@@ -749,10 +749,9 @@
     }
 
     ClientHttpRequest *const http = new ClientHttpRequest(this);
-    http->request = request;
-    HTTPMSGLOCK(http->request);
     http->req_sz = tok.parsedSize();
     http->uri = newUri;
+    http->initRequest(request);
 
     Http::Stream *const result =
         new Http::Stream(clientConnection, http);
@@ -1736,8 +1735,6 @@
 
     HttpReply *const reply = Ftp::HttpReplyWrapper(code, msg, Http::scNoContent, 0);
 
-    setLogUri(http, urlCanonicalClean(http->request));
-
     clientStreamNode *const node = context->getClientReplyContext();
     clientReplyContext *const repContext =
         dynamic_cast<clientReplyContext *>(node->data.getRaw());
diff -u -r -N squid-4.1/src/servers/Http1Server.cc squid-4.2/src/servers/Http1Server.cc
--- squid-4.1/src/servers/Http1Server.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/servers/Http1Server.cc	2018-08-06 02:13:41.000000000 +1200
@@ -118,8 +118,10 @@
             // else use default ERR_INVALID_REQ set above.
             break;
         }
-        // setLogUri should called before repContext->setReplyToError
-        setLogUri(http, http->uri, true);
+        // setReplyToError() requires log_uri
+        // must be already initialized via ConnStateData::abortRequestParsing()
+        assert(http->log_uri);
+
         const char * requestErrorBytes = inBuf.c_str();
         if (!clientTunnelOnError(this, context, request, parser_->method(), errPage)) {
             setReplyError(context, request, parser_->method(), errPage, parser_->parseStatusCode, requestErrorBytes);
@@ -135,8 +137,8 @@
     mx->tcpClient = clientConnection;
     if ((request = HttpRequest::FromUrl(http->uri, mx, parser_->method())) == NULL) {
         debugs(33, 5, "Invalid URL: " << http->uri);
-        // setLogUri should called before repContext->setReplyToError
-        setLogUri(http, http->uri, true);
+        // setReplyToError() requires log_uri
+        http->setLogUriToRawUri(http->uri, parser_->method());
 
         const char * requestErrorBytes = inBuf.c_str();
         if (!clientTunnelOnError(this, context, request, parser_->method(), ERR_INVALID_URL)) {
@@ -154,8 +156,8 @@
             (parser_->messageProtocol().major > 1) ) {
 
         debugs(33, 5, "Unsupported HTTP version discovered. :\n" << parser_->messageProtocol());
-        // setLogUri should called before repContext->setReplyToError
-        setLogUri(http, http->uri,  true);
+        // setReplyToError() requires log_uri
+        http->setLogUriToRawUri(http->uri, parser_->method());
 
         const char * requestErrorBytes = NULL; //HttpParserHdrBuf(parser_);
         if (!clientTunnelOnError(this, context, request, parser_->method(), ERR_UNSUP_HTTPVERSION)) {
@@ -168,8 +170,8 @@
     /* compile headers */
     if (parser_->messageProtocol().major >= 1 && !request->parseHeader(*parser_.getRaw())) {
         debugs(33, 5, "Failed to parse request headers:\n" << parser_->mimeHeader());
-        // setLogUri should called before repContext->setReplyToError
-        setLogUri(http, http->uri, true);
+        // setReplyToError() requires log_uri
+        http->setLogUriToRawUri(http->uri, parser_->method());
         const char * requestErrorBytes = NULL; //HttpParserHdrBuf(parser_);
         if (!clientTunnelOnError(this, context, request, parser_->method(), ERR_INVALID_REQ)) {
             setReplyError(context, request, parser_->method(), ERR_INVALID_REQ, Http::scBadRequest, requestErrorBytes);
@@ -188,8 +190,7 @@
         request->header.putStr(Http::HOST, tmp.c_str());
     }
 
-    http->request = request.getRaw();
-    HTTPMSGLOCK(http->request);
+    http->initRequest(request.getRaw());
 
     return true;
 }
@@ -235,8 +236,8 @@
         if (!supportedExpect) {
             clientStreamNode *node = context->getClientReplyContext();
             quitAfterError(request.getRaw());
-            // setLogUri should called before repContext->setReplyToError
-            setLogUri(http, urlCanonicalClean(request.getRaw()));
+            // setReplyToError() requires log_uri
+            assert(http->log_uri);
             clientReplyContext *repContext = dynamic_cast<clientReplyContext *>(node->data.getRaw());
             assert (repContext);
             repContext->setReplyToError(ERR_INVALID_REQ, Http::scExpectationFailed, request->method, http->uri,
diff -u -r -N squid-4.1/src/snmp/Pdu.cc squid-4.2/src/snmp/Pdu.cc
--- squid-4.1/src/snmp/Pdu.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/snmp/Pdu.cc	2018-08-06 02:13:41.000000000 +1200
@@ -45,7 +45,8 @@
 void
 Snmp::Pdu::init()
 {
-    memset(this, 0, sizeof(*this));
+    memset(static_cast<snmp_pdu *>(this), 0, sizeof(snmp_pdu));
+    aggrCount = 0;
     errstat = SNMP_DEFAULT_ERRSTAT;
     errindex = SNMP_DEFAULT_ERRINDEX;
 }
diff -u -r -N squid-4.1/src/snmp/Pdu.h squid-4.2/src/snmp/Pdu.h
--- squid-4.1/src/snmp/Pdu.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/snmp/Pdu.h	2018-08-06 02:13:41.000000000 +1200
@@ -43,7 +43,7 @@
 private:
     void init(); ///< initialize members
     void assign(const Pdu& pdu); ///< perform full assignment
-    unsigned int aggrCount;  ///< The number of other Pdus merged into
+    unsigned int aggrCount = 0;  ///< The number of other Pdus merged into
 };
 
 } // namespace Snmp
diff -u -r -N squid-4.1/src/snmp/Session.cc squid-4.2/src/snmp/Session.cc
--- squid-4.1/src/snmp/Session.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/snmp/Session.cc	2018-08-06 02:13:41.000000000 +1200
@@ -16,57 +16,41 @@
 
 Snmp::Session::Session()
 {
-    clear();
+    memset(static_cast<snmp_session *>(this), 0, sizeof(snmp_session));
 }
 
-Snmp::Session::Session(const Session& session)
+Snmp::Session::Session(const Snmp::Session& session) : Session()
 {
-    assign(session);
-}
-
-Snmp::Session::~Session()
-{
-    free();
+    operator =(session);
 }
 
 Snmp::Session&
 Snmp::Session::operator = (const Session& session)
 {
-    free();
-    assign(session);
-    return *this;
-}
+    if (&session == this)
+        return *this;
 
-void
-Snmp::Session::clear()
-{
-    memset(this, 0, sizeof(*this));
+    reset();
+    memcpy(static_cast<snmp_session *>(this), &session, sizeof(snmp_session));
+    // memcpy did a shallow copy, make sure we have our own allocations
+    if (session.community) {
+        community = (u_char*)xstrdup((char*)session.community);
+    }
+    if (session.peername) {
+        peername = xstrdup(session.peername);
+    }
+    return *this;
 }
 
 void
-Snmp::Session::free()
+Snmp::Session::reset()
 {
     if (community_len > 0) {
         Must(community != NULL);
         xfree(community);
     }
-    if (peername != NULL)
-        xfree(peername);
-    clear();
-}
-
-void
-Snmp::Session::assign(const Session& session)
-{
-    memcpy(this, &session, sizeof(*this));
-    if (session.community != NULL) {
-        community = (u_char*)xstrdup((char*)session.community);
-        Must(community != NULL);
-    }
-    if (session.peername != NULL) {
-        peername = xstrdup(session.peername);
-        Must(peername != NULL);
-    }
+    xfree(peername);
+    memset(static_cast<snmp_session *>(this), 0, sizeof(snmp_session));
 }
 
 void
@@ -91,7 +75,7 @@
 void
 Snmp::Session::unpack(const Ipc::TypedMsgHdr& msg)
 {
-    free();
+    reset();
     msg.getPod(Version);
     community_len = msg.getInt();
     if (community_len > 0) {
diff -u -r -N squid-4.1/src/snmp/Session.h squid-4.2/src/snmp/Session.h
--- squid-4.1/src/snmp/Session.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/snmp/Session.h	2018-08-06 02:13:41.000000000 +1200
@@ -25,15 +25,13 @@
     Session();
     Session(const Session& session);
     Session& operator = (const Session& session);
-    ~Session();
+    ~Session() { reset(); }
 
     void pack(Ipc::TypedMsgHdr& msg) const; ///< prepare for sendmsg()
     void unpack(const Ipc::TypedMsgHdr& msg); ///< restore struct from the message
-    void clear(); ///< clear internal members
 
 private:
-    void free();  ///< free internal members
-    void assign(const Session& session); ///< perform full assignment
+    void reset(); ///< free internal members
 };
 
 } // namespace Snmp
diff -u -r -N squid-4.1/src/snmp/Var.cc squid-4.2/src/snmp/Var.cc
--- squid-4.1/src/snmp/Var.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/snmp/Var.cc	2018-08-06 02:13:41.000000000 +1200
@@ -44,7 +44,7 @@
 void
 Snmp::Var::init()
 {
-    memset(this, 0, sizeof(*this));
+    memset(static_cast<variable_list *>(this), 0, sizeof(variable_list));
 }
 
 Snmp::Var&
@@ -156,10 +156,8 @@
 void
 Snmp::Var::clearName()
 {
-    if (name != NULL) {
-        xfree(name);
-        name = NULL;
-    }
+    xfree(name);
+    name = nullptr;
     name_length = 0;
 }
 
@@ -183,10 +181,8 @@
 void
 Snmp::Var::clearValue()
 {
-    if (val.string != NULL) {
-        xfree(val.string);
-        val.string = NULL;
-    }
+    xfree(val.string);
+    val.string = nullptr;
     val_len = 0;
     type = 0;
 }
diff -u -r -N squid-4.1/src/SquidConfig.h squid-4.2/src/SquidConfig.h
--- squid-4.1/src/SquidConfig.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/SquidConfig.h	2018-08-06 02:13:41.000000000 +1200
@@ -23,6 +23,7 @@
 #if USE_OPENSSL
 #include "ssl/support.h"
 #endif
+#include "store/Disk.h"
 #include "store/forward.h"
 
 #if USE_OPENSSL
@@ -50,11 +51,14 @@
 namespace Store {
 class DiskConfig {
 public:
-    RefCount<SwapDir> *swapDirs;
-    int n_allocated;
-    int n_configured;
+    DiskConfig() { assert(swapDirs == nullptr); }
+    ~DiskConfig() { delete[] swapDirs; }
+
+    RefCount<SwapDir> *swapDirs = nullptr;
+    int n_allocated = 0;
+    int n_configured = 0;
     /// number of disk processes required to support all cache_dirs
-    int n_strands;
+    int n_strands = 0;
 };
 #define INDEXSD(i) (Config.cacheSwap.swapDirs[i].getRaw())
 }
diff -u -r -N squid-4.1/src/ssl/PeekingPeerConnector.cc squid-4.2/src/ssl/PeekingPeerConnector.cc
--- squid-4.1/src/ssl/PeekingPeerConnector.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/ssl/PeekingPeerConnector.cc	2018-08-06 02:13:41.000000000 +1200
@@ -283,11 +283,11 @@
     //
     if (srvBio->bumpMode() == Ssl::bumpPeek && (resumingSession = srvBio->resumingSession())) {
         // we currently splice all resumed sessions unconditionally
-        if (const bool spliceResumed = true) {
-            bypassCertValidator();
-            checkForPeekAndSpliceMatched(Ssl::bumpSplice);
-            return;
-        } // else fall through to find a matching ssl_bump action (with limited info)
+        // if (const bool spliceResumed = true) {
+        bypassCertValidator();
+        checkForPeekAndSpliceMatched(Ssl::bumpSplice);
+        return;
+        // } // else fall through to find a matching ssl_bump action (with limited info)
     }
 
     // If we are in peek-and-splice mode and still we did not write to
diff -u -r -N squid-4.1/src/stat.cc squid-4.2/src/stat.cc
--- squid-4.1/src/stat.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/stat.cc	2018-08-06 02:13:41.000000000 +1200
@@ -84,10 +84,6 @@
 #if STAT_GRAPHS
 static void statGraphDump(StoreEntry *);
 #endif
-static void statCountersInit(StatCounters *);
-static void statCountersInitSpecial(StatCounters *);
-static void statCountersClean(StatCounters *);
-static void statCountersCopy(StatCounters * dest, const StatCounters * orig);
 static double statPctileSvc(double, int, int);
 static void statStoreEntry(MemBuf * mb, StoreEntry * e);
 static double statCPUUsage(int minutes);
@@ -1219,6 +1215,45 @@
 #endif
 }
 
+/* add special cases here as they arrive */
+static void
+statCountersInitSpecial(StatCounters * C)
+{
+    /*
+     * HTTP svc_time hist is kept in milli-seconds; max of 3 hours.
+     */
+    C->client_http.allSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
+    C->client_http.missSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
+    C->client_http.nearMissSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
+    C->client_http.nearHitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
+    C->client_http.hitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
+    /*
+     * ICP svc_time hist is kept in micro-seconds; max of 1 minute.
+     */
+    C->icp.querySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
+    C->icp.replySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
+    /*
+     * DNS svc_time hist is kept in milli-seconds; max of 10 minutes.
+     */
+    C->dns.svcTime.logInit(300, 0.0, 60000.0 * 10.0);
+    /*
+     * Cache Digest Stuff
+     */
+    C->cd.on_xition_count.enumInit(CacheDigestHashFuncCount);
+    C->comm_udp_incoming.enumInit(INCOMING_UDP_MAX);
+    C->comm_dns_incoming.enumInit(INCOMING_DNS_MAX);
+    C->comm_tcp_incoming.enumInit(INCOMING_TCP_MAX);
+    C->select_fds_hist.enumInit(256);   /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
+}
+
+static void
+statCountersInit(StatCounters * C)
+{
+    assert(C);
+    *C = StatCounters();
+    statCountersInitSpecial(C);
+}
+
 void
 statInit(void)
 {
@@ -1245,30 +1280,24 @@
 static void
 statAvgTick(void *)
 {
-    StatCounters *t = &CountHist[0];
-    StatCounters *p = &CountHist[1];
-    StatCounters *c = &statCounter;
-
     struct rusage rusage;
     eventAdd("statAvgTick", statAvgTick, NULL, (double) COUNT_INTERVAL, 1);
     squid_getrusage(&rusage);
-    c->page_faults = rusage_pagefaults(&rusage);
-    c->cputime = rusage_cputime(&rusage);
-    c->timestamp = current_time;
-    /* even if NCountHist is small, we already Init()ed the tail */
-    statCountersClean(CountHist + N_COUNT_HIST - 1);
-    memmove(p, t, (N_COUNT_HIST - 1) * sizeof(StatCounters));
-    statCountersCopy(t, c);
+    statCounter.page_faults = rusage_pagefaults(&rusage);
+    statCounter.cputime = rusage_cputime(&rusage);
+    statCounter.timestamp = current_time;
+    // shift all elements right and prepend statCounter
+    for(int i = N_COUNT_HIST-1; i > 0; --i)
+        CountHist[i] = CountHist[i-1];
+    CountHist[0] = statCounter;
     ++NCountHist;
 
     if ((NCountHist % COUNT_INTERVAL) == 0) {
         /* we have an hours worth of readings.  store previous hour */
-        StatCounters *t2 = &CountHourHist[0];
-        StatCounters *p2 = &CountHourHist[1];
-        StatCounters *c2 = &CountHist[N_COUNT_HIST - 1];
-        statCountersClean(CountHourHist + N_COUNT_HOUR_HIST - 1);
-        memmove(p2, t2, (N_COUNT_HOUR_HIST - 1) * sizeof(StatCounters));
-        statCountersCopy(t2, c2);
+        // shift all elements right and prepend final CountHist element
+        for(int i = N_COUNT_HOUR_HIST-1; i > 0; --i)
+            CountHourHist[i] = CountHourHist[i-1];
+        CountHourHist[0] = CountHist[N_COUNT_HIST - 1];
         ++NCountHourHist;
     }
 
@@ -1303,93 +1332,6 @@
 }
 
 static void
-statCountersInit(StatCounters * C)
-{
-    assert(C);
-    memset(C, 0, sizeof(*C));
-    C->timestamp = current_time;
-    statCountersInitSpecial(C);
-}
-
-/* add special cases here as they arrive */
-static void
-statCountersInitSpecial(StatCounters * C)
-{
-    /*
-     * HTTP svc_time hist is kept in milli-seconds; max of 3 hours.
-     */
-    C->client_http.allSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
-    C->client_http.missSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
-    C->client_http.nearMissSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
-    C->client_http.nearHitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
-    C->client_http.hitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
-    /*
-     * ICP svc_time hist is kept in micro-seconds; max of 1 minute.
-     */
-    C->icp.querySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
-    C->icp.replySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
-    /*
-     * DNS svc_time hist is kept in milli-seconds; max of 10 minutes.
-     */
-    C->dns.svcTime.logInit(300, 0.0, 60000.0 * 10.0);
-    /*
-     * Cache Digest Stuff
-     */
-    C->cd.on_xition_count.enumInit(CacheDigestHashFuncCount);
-    C->comm_udp_incoming.enumInit(INCOMING_UDP_MAX);
-    C->comm_dns_incoming.enumInit(INCOMING_DNS_MAX);
-    C->comm_tcp_incoming.enumInit(INCOMING_TCP_MAX);
-    C->select_fds_hist.enumInit(256);   /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
-}
-
-/* add special cases here as they arrive */
-static void
-statCountersClean(StatCounters * C)
-{
-    assert(C);
-    C->client_http.allSvcTime.clear();
-    C->client_http.missSvcTime.clear();
-    C->client_http.nearMissSvcTime.clear();
-    C->client_http.nearHitSvcTime.clear();
-    C->client_http.hitSvcTime.clear();
-    C->icp.querySvcTime.clear();
-    C->icp.replySvcTime.clear();
-    C->dns.svcTime.clear();
-    C->cd.on_xition_count.clear();
-    C->comm_udp_incoming.clear();
-    C->comm_dns_incoming.clear();
-    C->comm_tcp_incoming.clear();
-    C->select_fds_hist.clear();
-}
-
-/* add special cases here as they arrive */
-static void
-statCountersCopy(StatCounters * dest, const StatCounters * orig)
-{
-    assert(dest && orig);
-    /* this should take care of all the fields, but "special" ones */
-    memcpy(dest, orig, sizeof(*dest));
-    /* prepare space where to copy special entries */
-    statCountersInitSpecial(dest);
-    /* now handle special cases */
-    /* note: we assert that histogram capacities do not change */
-    dest->client_http.allSvcTime=orig->client_http.allSvcTime;
-    dest->client_http.missSvcTime=orig->client_http.missSvcTime;
-    dest->client_http.nearMissSvcTime=orig->client_http.nearMissSvcTime;
-    dest->client_http.nearHitSvcTime=orig->client_http.nearHitSvcTime;
-
-    dest->client_http.hitSvcTime=orig->client_http.hitSvcTime;
-    dest->icp.querySvcTime=orig->icp.querySvcTime;
-    dest->icp.replySvcTime=orig->icp.replySvcTime;
-    dest->dns.svcTime=orig->dns.svcTime;
-    dest->cd.on_xition_count=orig->cd.on_xition_count;
-    dest->comm_udp_incoming=orig->comm_udp_incoming;
-    dest->comm_dns_incoming=orig->comm_dns_incoming;
-    dest->comm_tcp_incoming=orig->comm_tcp_incoming;
-    dest->select_fds_hist=orig->select_fds_hist;
-}
-
-static void
 statCountersHistograms(StoreEntry * sentry)
 {
     storeAppendPrintf(sentry, "client_http.allSvcTime histogram:\n");
@@ -1624,13 +1566,12 @@
 void
 statFreeMemory(void)
 {
-    int i;
+    // TODO: replace with delete[]
+    for (int i = 0; i < N_COUNT_HIST; ++i)
+        CountHist[i] = StatCounters();
 
-    for (i = 0; i < N_COUNT_HIST; ++i)
-        statCountersClean(&CountHist[i]);
-
-    for (i = 0; i < N_COUNT_HOUR_HIST; ++i)
-        statCountersClean(&CountHourHist[i]);
+    for (int i = 0; i < N_COUNT_HOUR_HIST; ++i)
+        CountHourHist[i] = StatCounters();
 }
 
 static void
diff -u -r -N squid-4.1/src/StatCounters.h squid-4.2/src/StatCounters.h
--- squid-4.1/src/StatCounters.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/StatCounters.h	2018-08-06 02:13:41.000000000 +1200
@@ -17,29 +17,31 @@
 class CacheDigestGuessStats
 {
 public:
-    int trueHits;
-    int falseHits;
-    int trueMisses;
-    int falseMisses;
-    int closeHits;     /// \todo: temporary remove it later
+    int trueHits = 0;
+    int falseHits = 0;
+    int trueMisses = 0;
+    int falseMisses = 0;
+    int closeHits = 0;     /// \todo: temporary remove it later
 };
 #endif
 
 /** General collection of process-wide statistics.
  *
- * \note if you add a field to StatCounters,
- * you MUST sync statCountersInitSpecial, statCountersClean, and statCountersCopy
+ * \note if you add a field to StatCounters which requires any non-trivial
+ *  initialization or copy you MUST sync statCountersInitSpecial()
  */
 class StatCounters
 {
 public:
+    StatCounters() : timestamp(current_time) {}
+
     struct {
-        int clients;
-        int requests;
-        int hits;
-        int mem_hits;
-        int disk_hits;
-        int errors;
+        int clients = 0;
+        int requests = 0;
+        int hits = 0;
+        int mem_hits = 0;
+        int disk_hits = 0;
+        int errors = 0;
         ByteCounter kbytes_in;
         ByteCounter kbytes_out;
         ByteCounter hit_kbytes_out;
@@ -53,24 +55,24 @@
     struct {
 
         struct {
-            int requests;
-            int errors;
+            int requests = 0;
+            int errors = 0;
             ByteCounter kbytes_in;
             ByteCounter kbytes_out;
         } all , http, ftp, other;
     } server;
 
     struct {
-        int pkts_sent;
-        int queries_sent;
-        int replies_sent;
-        int pkts_recv;
-        int queries_recv;
-        int replies_recv;
-        int hits_sent;
-        int hits_recv;
-        int replies_queued;
-        int replies_dropped;
+        int pkts_sent = 0;
+        int queries_sent = 0;
+        int replies_sent = 0;
+        int pkts_recv = 0;
+        int queries_recv = 0;
+        int replies_recv = 0;
+        int hits_sent = 0;
+        int hits_recv = 0;
+        int replies_queued = 0;
+        int replies_dropped = 0;
         ByteCounter kbytes_sent;
         ByteCounter q_kbytes_sent;
         ByteCounter r_kbytes_sent;
@@ -79,17 +81,17 @@
         ByteCounter r_kbytes_recv;
         StatHist querySvcTime;
         StatHist replySvcTime;
-        int query_timeouts;
-        int times_used;
+        int query_timeouts = 0;
+        int times_used = 0;
     } icp;
 
     struct {
-        int pkts_sent;
-        int pkts_recv;
+        int pkts_sent = 0;
+        int pkts_recv = 0;
     } htcp;
 
     struct {
-        int requests;
+        int requests = 0;
     } unlink;
 
     struct {
@@ -97,28 +99,26 @@
     } dns;
 
     struct {
-        int times_used;
+        int times_used = 0;
         ByteCounter kbytes_sent;
         ByteCounter kbytes_recv;
         ByteCounter memory;
-        int msgs_sent;
-        int msgs_recv;
+        int msgs_sent = 0;
+        int msgs_recv = 0;
 #if USE_CACHE_DIGESTS
-
         CacheDigestGuessStats guess;
 #endif
-
         StatHist on_xition_count;
     } cd;
 
     struct {
-        int times_used;
+        int times_used = 0;
     } netdb;
-    int page_faults;
-    unsigned long int select_loops;
-    int select_fds;
-    double select_time;
-    double cputime;
+    int page_faults = 0;
+    unsigned long int select_loops = 0;
+    int select_fds = 0;
+    double select_time = 0.0;
+    double cputime = 0.0;
 
     struct timeval timestamp;
     StatHist comm_udp_incoming;
@@ -128,36 +128,34 @@
 
     struct {
         struct {
-            int opens;
-            int closes;
-            int reads;
-            int writes;
-            int seeks;
-            int unlinks;
+            int opens = 0;
+            int closes = 0;
+            int reads = 0;
+            int writes = 0;
+            int seeks = 0;
+            int unlinks = 0;
         } disk;
 
         struct {
-            int accepts;
-            int sockets;
-            int connects;
-            int binds;
-            int closes;
-            int reads;
-            int writes;
-            int recvfroms;
-            int sendtos;
+            int accepts = 0;
+            int sockets = 0;
+            int connects = 0;
+            int binds = 0;
+            int closes = 0;
+            int reads = 0;
+            int writes = 0;
+            int recvfroms = 0;
+            int sendtos = 0;
         } sock;
-        int selects;
+        int selects = 0;
     } syscalls;
-    int aborted_requests;
+    int aborted_requests = 0;
 
     struct {
-        int files_cleaned;
-        int outs;
-        int ins;
+        int files_cleaned = 0;
+        int outs = 0;
+        int ins = 0;
     } swap;
-
-private:
 };
 
 extern StatCounters statCounter;
diff -u -r -N squid-4.1/src/StatHist.h squid-4.2/src/StatHist.h
--- squid-4.1/src/StatHist.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/StatHist.h	2018-08-06 02:13:41.000000000 +1200
@@ -34,21 +34,17 @@
      * \todo specialize the class in a small hierarchy so that all
      *       relevant initializations are done at build-time
      */
-    StatHist();
-    StatHist(const StatHist&); //not needed
-    ~StatHist() { clear(); };
+    StatHist() = default;
+    StatHist(const StatHist &);
+    ~StatHist() {
+        xfree(bins); // can handle case of bins being nullptr
+        capacity_ = 0;  // mark as destructed, may be needed for troubleshooting
+    }
 
     typedef uint64_t bins_type;
 
     StatHist &operator=(const StatHist &);
 
-    /** clear the contents of the histograms
-     *
-     * \todo remove: this function has been replaced in its purpose
-     *       by the destructor
-     */
-    void clear();
-
     /** Calculate the percentile for value pctile for the difference between
      *  this and the supplied histogram.
      */
@@ -102,19 +98,19 @@
     unsigned int findBin(double v);
 
     /// the histogram counters
-    bins_type *bins;
-    unsigned int capacity_;
+    bins_type *bins = nullptr;
+    unsigned int capacity_ = 0;
 
     /// minimum value to be stored, corresponding to the first bin
-    double min_;
+    double min_ = 0.0;
 
     /// value of the maximum counter in the histogram
-    double max_;
+    double max_ = 0.0;
 
     /// scaling factor when looking for a bin
-    double scale_;
-    hbase_f *val_in;        /* e.g., log() for log-based histogram */
-    hbase_f *val_out;       /* e.g., exp() for log based histogram */
+    double scale_ = 1.0;
+    hbase_f *val_in = nullptr;        /* e.g., log() for log-based histogram */
+    hbase_f *val_out = nullptr;       /* e.g., exp() for log based histogram */
 };
 
 double statHistDeltaMedian(const StatHist & A, const StatHist & B);
@@ -137,24 +133,10 @@
     scale_=src.scale_;
     val_in=src.val_in;
     val_out=src.val_out;
-    if (bins != NULL)
+    if (bins)
         memcpy(bins,src.bins,capacity_*sizeof(*bins));
     return *this;
 }
 
-inline
-StatHist::StatHist() :
-    bins(NULL), capacity_(0), min_(0), max_(0),
-    scale_(1.0), val_in(NULL), val_out(NULL)
-{}
-
-inline void
-StatHist::clear()
-{
-    xfree(bins); // can handle case of bins being NULL
-    bins=NULL;
-    capacity_=0; // mark as destructed, may be needed for troubleshooting
-}
-
 #endif /* STATHIST_H_ */
 
diff -u -r -N squid-4.1/src/store/Disks.cc squid-4.2/src/store/Disks.cc
--- squid-4.1/src/store/Disks.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/store/Disks.cc	2018-08-06 02:13:41.000000000 +1200
@@ -680,16 +680,18 @@
 void
 allocate_new_swapdir(Store::DiskConfig *swap)
 {
-    if (swap->swapDirs == NULL) {
+    if (!swap->swapDirs) {
         swap->n_allocated = 4;
-        swap->swapDirs = static_cast<SwapDir::Pointer *>(xcalloc(swap->n_allocated, sizeof(SwapDir::Pointer)));
+        swap->swapDirs = new SwapDir::Pointer[swap->n_allocated];
     }
 
     if (swap->n_allocated == swap->n_configured) {
         swap->n_allocated <<= 1;
-        SwapDir::Pointer *const tmp = static_cast<SwapDir::Pointer *>(xcalloc(swap->n_allocated, sizeof(SwapDir::Pointer)));
-        memcpy(tmp, swap->swapDirs, swap->n_configured * sizeof(SwapDir *));
-        xfree(swap->swapDirs);
+        const auto tmp = new SwapDir::Pointer[swap->n_allocated];
+        for (int i = 0; i < swap->n_configured; ++i) {
+            tmp[i] = swap->swapDirs[i];
+        }
+        delete[] swap->swapDirs;
         swap->swapDirs = tmp;
     }
 }
@@ -697,23 +699,21 @@
 void
 free_cachedir(Store::DiskConfig *swap)
 {
-    int i;
     /* DON'T FREE THESE FOR RECONFIGURE */
 
     if (reconfiguring)
         return;
 
-    for (i = 0; i < swap->n_configured; ++i) {
-        /* TODO XXX this lets the swapdir free resources asynchronously
-        * swap->swapDirs[i]->deactivate();
-        * but there may be such a means already.
-        * RBC 20041225
-        */
-        swap->swapDirs[i] = NULL;
-    }
+    /* TODO XXX this lets the swapdir free resources asynchronously
+     * swap->swapDirs[i]->deactivate();
+     * but there may be such a means already.
+     * RBC 20041225
+     */
 
-    safe_free(swap->swapDirs);
-    swap->swapDirs = NULL;
+    // only free's the array memory itself
+    // the SwapDir objects may remain (ref-counted)
+    delete[] swap->swapDirs;
+    swap->swapDirs = nullptr;
     swap->n_allocated = 0;
     swap->n_configured = 0;
 }
diff -u -r -N squid-4.1/src/store/id_rewriters/file/storeid_file_rewrite.8 squid-4.2/src/store/id_rewriters/file/storeid_file_rewrite.8
--- squid-4.1/src/store/id_rewriters/file/storeid_file_rewrite.8	2018-07-02 15:39:07.000000000 +1200
+++ squid-4.2/src/store/id_rewriters/file/storeid_file_rewrite.8	2018-08-06 02:42:42.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "STOREID_FILE_REWRITE 8"
-.TH STOREID_FILE_REWRITE 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH STOREID_FILE_REWRITE 8 "2018-08-05" "perl v5.26.2" "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-4.1/src/store.cc squid-4.2/src/store.cc
--- squid-4.1/src/store.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/store.cc	2018-08-06 02:13:41.000000000 +1200
@@ -1831,7 +1831,7 @@
     assert(rep);
 
     buffer();
-    rep->packHeadersInto(this);
+    rep->packHeadersUsingSlowPacker(*this);
     mem_obj->markEndOfReplyHeaders();
 
     rep->body.packInto(this);
diff -u -r -N squid-4.1/src/store_digest.cc squid-4.2/src/store_digest.cc
--- squid-4.1/src/store_digest.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/store_digest.cc	2018-08-06 02:13:41.000000000 +1200
@@ -43,25 +43,26 @@
 
 class StoreDigestState
 {
-
 public:
     StoreDigestCBlock cblock;
-    int rebuild_lock;       /* bucket number */
-    StoreEntry * rewrite_lock;  /* points to store entry with the digest */
+    int rebuild_lock = 0;                 ///< bucket number
+    StoreEntry * rewrite_lock = nullptr;  ///< points to store entry with the digest
     StoreSearchPointer theSearch;
-    int rewrite_offset;
-    int rebuild_count;
-    int rewrite_count;
+    int rewrite_offset = 0;
+    int rebuild_count = 0;
+    int rewrite_count = 0;
 };
 
-typedef struct {
-    int del_count;      /* #store entries deleted from store_digest */
-    int del_lost_count;     /* #store entries not found in store_digest on delete */
-    int add_count;      /* #store entries accepted to store_digest */
-    int add_coll_count;     /* #accepted entries that collided with existing ones */
-    int rej_count;      /* #store entries not accepted to store_digest */
-    int rej_coll_count;     /* #not accepted entries that collided with existing ones */
-} StoreDigestStats;
+class StoreDigestStats
+{
+public:
+    int del_count = 0;          /* #store entries deleted from store_digest */
+    int del_lost_count = 0;     /* #store entries not found in store_digest on delete */
+    int add_count = 0;          /* #store entries accepted to store_digest */
+    int add_coll_count = 0;     /* #accepted entries that collided with existing ones */
+    int rej_count = 0;          /* #store entries not accepted to store_digest */
+    int rej_coll_count = 0;     /* #not accepted entries that collided with existing ones */
+};
 
 /* local vars */
 static StoreDigestState sd_state;
@@ -139,7 +140,7 @@
            (int) Config.digest.rebuild_period << "/" <<
            (int) Config.digest.rewrite_period << " sec");
 
-    memset(&sd_state, 0, sizeof(sd_state));
+    sd_state = StoreDigestState();
 #else
     store_digest = NULL;
     debugs(71, 3, "Local cache digest is 'off'");
@@ -355,7 +356,7 @@
     if (!storeDigestResize())
         store_digest->clear();     /* not clean()! */
 
-    memset(&sd_stats, 0, sizeof(sd_stats));
+    sd_stats = StoreDigestStats();
 
     eventAdd("storeDigestRebuildStep", storeDigestRebuildStep, NULL, 0.0, 1);
 }
diff -u -r -N squid-4.1/src/store_rebuild.cc squid-4.2/src/store_rebuild.cc
--- squid-4.1/src/store_rebuild.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/store_rebuild.cc	2018-08-06 02:13:41.000000000 +1200
@@ -172,7 +172,7 @@
 void
 storeRebuildStart(void)
 {
-    memset(&counts, '\0', sizeof(counts));
+    counts = StoreRebuildData(); // reset counters
     rebuild_start = current_time;
     /*
      * Note: store_dirs_rebuilding is initialized to 1.
diff -u -r -N squid-4.1/src/store_rebuild.h squid-4.2/src/store_rebuild.h
--- squid-4.1/src/store_rebuild.h	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/store_rebuild.h	2018-08-06 02:13:41.000000000 +1200
@@ -16,22 +16,16 @@
 class StoreRebuildData
 {
 public:
-    StoreRebuildData() :
-        objcount(0), expcount(0), scancount(0), clashcount(0),
-        dupcount(0), cancelcount(0), invalid(0), badflags(0),
-        bad_log_op(0), zero_object_sz(0)
-    {}
-
-    int objcount;       /* # objects successfully reloaded */
-    int expcount;       /* # objects expired */
-    int scancount;      /* # entries scanned or read from state file */
-    int clashcount;     /* # swapfile clashes avoided */
-    int dupcount;       /* # duplicates purged */
-    int cancelcount;        /* # SWAP_LOG_DEL objects purged */
-    int invalid;        /* # bad lines */
-    int badflags;       /* # bad e->flags */
-    int bad_log_op;
-    int zero_object_sz;
+    int objcount = 0;       /* # objects successfully reloaded */
+    int expcount = 0;       /* # objects expired */
+    int scancount = 0;      /* # entries scanned or read from state file */
+    int clashcount = 0;     /* # swapfile clashes avoided */
+    int dupcount = 0;       /* # duplicates purged */
+    int cancelcount = 0;    /* # SWAP_LOG_DEL objects purged */
+    int invalid = 0;        /* # bad lines */
+    int badflags = 0;       /* # bad e->flags */
+    int bad_log_op = 0;
+    int zero_object_sz = 0;
 };
 
 void storeRebuildStart(void);
diff -u -r -N squid-4.1/src/tests/stub_cache_manager.cc squid-4.2/src/tests/stub_cache_manager.cc
--- squid-4.1/src/tests/stub_cache_manager.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tests/stub_cache_manager.cc	2018-08-06 02:13:41.000000000 +1200
@@ -20,7 +20,7 @@
     std::cerr << HERE << "\n";
     STUB
 }
-CacheManager* CacheManager::instance=0;
+static CacheManager* instance = nullptr;
 CacheManager* CacheManager::GetInstance() STUB_RETVAL(instance)
 void Mgr::RegisterAction(char const*, char const*, OBJH, int, int) {}
 void Mgr::RegisterAction(char const *, char const *, Mgr::ClassActionCreationHandler *, int, int) {}
diff -u -r -N squid-4.1/src/tests/stub_client_side.cc squid-4.2/src/tests/stub_client_side.cc
--- squid-4.1/src/tests/stub_client_side.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tests/stub_client_side.cc	2018-08-06 02:13:41.000000000 +1200
@@ -51,7 +51,6 @@
 bool ConnStateData::serveDelayedError(Http::Stream *) STUB_RETVAL(false)
 #endif
 
-void setLogUri(ClientHttpRequest *, char const *, bool) STUB
 const char *findTrailingHTTPVersion(const char *, const char *) STUB_RETVAL(NULL)
 int varyEvaluateMatch(StoreEntry *, HttpRequest *) STUB_RETVAL(0)
 void clientOpenListenSockets(void) STUB
diff -u -r -N squid-4.1/src/tests/stub_HttpReply.cc squid-4.2/src/tests/stub_HttpReply.cc
--- squid-4.1/src/tests/stub_HttpReply.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tests/stub_HttpReply.cc	2018-08-06 02:13:41.000000000 +1200
@@ -15,20 +15,21 @@
 HttpReply::HttpReply() : HttpMsg(hoReply), date (0), last_modified (0),
     expires(0), surrogate_control(nullptr), keep_alive(0),
     protoPrefix("HTTP/"), do_clean(false), bodySizeMax(-2), content_range(nullptr)
-    STUB_NOP
-    HttpReply::~HttpReply() STUB
-    void HttpReply::setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires_) STUB
-    void HttpReply::packHeadersInto(Packable *) const STUB
-    void HttpReply::reset() STUB
-    void httpBodyPackInto(const HttpBody *, Packable *) STUB
-    bool HttpReply::sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) STUB_RETVAL(false)
-    int HttpReply::httpMsgParseError() STUB_RETVAL(0)
-    bool HttpReply::expectingBody(const HttpRequestMethod&, int64_t&) const STUB_RETVAL(false)
-    bool HttpReply::parseFirstLine(const char *start, const char *end) STUB_RETVAL(false)
-    void HttpReply::hdrCacheInit() STUB
-    HttpReply * HttpReply::clone() const STUB_RETVAL(NULL)
-    bool HttpReply::inheritProperties(const HttpMsg *aMsg) STUB_RETVAL(false)
-    bool HttpReply::updateOnNotModified(HttpReply const*) STUB_RETVAL(false)
-    int64_t HttpReply::bodySize(const HttpRequestMethod&) const STUB_RETVAL(0)
-    const HttpHdrContRange *HttpReply::contentRange() const STUB_RETVAL(nullptr)
+{STUB_NOP}
+HttpReply::~HttpReply() STUB
+void HttpReply::setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires_) STUB
+void HttpReply::packHeadersUsingFastPacker(Packable&) const STUB
+void HttpReply::packHeadersUsingSlowPacker(Packable&) const STUB
+void HttpReply::reset() STUB
+void httpBodyPackInto(const HttpBody *, Packable *) STUB
+bool HttpReply::sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) STUB_RETVAL(false)
+int HttpReply::httpMsgParseError() STUB_RETVAL(0)
+bool HttpReply::expectingBody(const HttpRequestMethod&, int64_t&) const STUB_RETVAL(false)
+bool HttpReply::parseFirstLine(const char *start, const char *end) STUB_RETVAL(false)
+void HttpReply::hdrCacheInit() STUB
+HttpReply * HttpReply::clone() const STUB_RETVAL(NULL)
+bool HttpReply::inheritProperties(const HttpMsg *aMsg) STUB_RETVAL(false)
+bool HttpReply::updateOnNotModified(HttpReply const*) STUB_RETVAL(false)
+int64_t HttpReply::bodySize(const HttpRequestMethod&) const STUB_RETVAL(0)
+const HttpHdrContRange *HttpReply::contentRange() const STUB_RETVAL(nullptr)
 
diff -u -r -N squid-4.1/src/tests/stub_libanyp.cc squid-4.2/src/tests/stub_libanyp.cc
--- squid-4.1/src/tests/stub_libanyp.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tests/stub_libanyp.cc	2018-08-06 02:13:41.000000000 +1200
@@ -31,7 +31,6 @@
 SBuf &AnyP::Uri::authority(bool) const STUB_RETVAL(nil)
 SBuf &AnyP::Uri::absolute() const STUB_RETVAL(nil)
 void urlInitialize() STUB
-char *urlCanonicalClean(const HttpRequest *) STUB_RETVAL(nullptr)
 const char *urlCanonicalFakeHttps(const HttpRequest *) STUB_RETVAL(nullptr)
 bool urlIsRelative(const char *) STUB_RETVAL(false)
 char *urlMakeAbsolute(const HttpRequest *, const char *)STUB_RETVAL(nullptr)
diff -u -r -N squid-4.1/src/tests/stub_libcomm.cc squid-4.2/src/tests/stub_libcomm.cc
--- squid-4.1/src/tests/stub_libcomm.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tests/stub_libcomm.cc	2018-08-06 02:13:41.000000000 +1200
@@ -52,7 +52,6 @@
 #include "comm/Loops.h"
 void Comm::SelectLoopInit(void) STUB
 void Comm::SetSelect(int, unsigned int, PF *, void *, time_t) STUB
-void Comm::ResetSelect(int) STUB
 Comm::Flag Comm::DoSelect(int) STUB_RETVAL(Comm::COMM_ERROR)
 void Comm::QuickPollRequired(void) STUB
 
diff -u -r -N squid-4.1/src/tests/stub_MemObject.cc squid-4.2/src/tests/stub_MemObject.cc
--- squid-4.1/src/tests/stub_MemObject.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tests/stub_MemObject.cc	2018-08-06 02:13:41.000000000 +1200
@@ -29,20 +29,9 @@
 void MemObject::trimSwappable() STUB
 void MemObject::trimUnSwappable() STUB
 int64_t MemObject::policyLowestOffsetToKeep(bool swap) const STUB_RETVAL(-1)
-MemObject::MemObject() :
-    inmem_lo(0),
-    nclients(0),
-    request(NULL),
-    ping_reply_callback(NULL),
-    ircb_data(NULL),
-    id(0),
-    object_sz(-1),
-    swap_hdr_sz(0),
-    _reply(NULL)
-{
-    memset(&clients, 0, sizeof(clients));
+MemObject::MemObject() {
+    ping_reply_callback = nullptr;
     memset(&start_ping, 0, sizeof(start_ping));
-    memset(&abort, 0, sizeof(abort));
 } // NOP instead of elided due to Store
 
 HttpReply const * MemObject::getReply() const
diff -u -r -N squid-4.1/src/tests/testRock.cc squid-4.2/src/tests/testRock.cc
--- squid-4.1/src/tests/testRock.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tests/testRock.cc	2018-08-06 02:13:41.000000000 +1200
@@ -203,7 +203,7 @@
     StoreEntry *const pe = createEntry(i);
 
     pe->buffer();
-    pe->getReply()->packHeadersInto(pe);
+    pe->getReply()->packHeadersUsingSlowPacker(*pe);
     pe->flush();
     pe->timestampsSet();
     pe->complete();
diff -u -r -N squid-4.1/src/tests/testUfs.cc squid-4.2/src/tests/testUfs.cc
--- squid-4.1/src/tests/testUfs.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tests/testUfs.cc	2018-08-06 02:13:41.000000000 +1200
@@ -152,7 +152,7 @@
         pe->setPublicKey();
 
         pe->buffer();
-        pe->getReply()->packHeadersInto(pe);
+        pe->getReply()->packHeadersUsingSlowPacker(*pe);
         pe->flush();
         pe->timestampsSet();
         pe->complete();
diff -u -r -N squid-4.1/src/tools.cc squid-4.2/src/tools.cc
--- squid-4.1/src/tools.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tools.cc	2018-08-06 02:13:41.000000000 +1200
@@ -319,7 +319,7 @@
 #endif /* _SQUID_SOLARIS_and HAVE_LIBOPCOM_STACK */
 #if HAVE_BACKTRACE_SYMBOLS_FD
     {
-        static void *(callarray[8192]);
+        static void *callarray[8192];
         int n;
         n = backtrace(callarray, 8192);
         backtrace_symbols_fd(callarray, n, fileno(debug_log));
diff -u -r -N squid-4.1/src/tunnel.cc squid-4.2/src/tunnel.cc
--- squid-4.1/src/tunnel.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/tunnel.cc	2018-08-06 02:13:41.000000000 +1200
@@ -1158,7 +1158,6 @@
     HttpHeader hdr_out(hoRequest);
     Http::StateFlags flags;
     debugs(26, 3, HERE << srv << ", tunnelState=" << tunnelState);
-    memset(&flags, '\0', sizeof(flags));
     flags.proxying = tunnelState->request->flags.proxying;
     MemBuf mb;
     mb.init();
diff -u -r -N squid-4.1/src/wccp2.cc squid-4.2/src/wccp2.cc
--- squid-4.1/src/wccp2.cc	2018-07-02 15:26:07.000000000 +1200
+++ squid-4.2/src/wccp2.cc	2018-08-06 02:13:41.000000000 +1200
@@ -1743,7 +1743,8 @@
 
         assignment_key = (struct assignment_key_t *) &wccp_packet[offset];
 
-        assignment_key->master_number = htonl(++service_list_ptr->change_num);
+        ++service_list_ptr->change_num;
+        assignment_key->master_number = htonl(service_list_ptr->change_num);
 
         offset += sizeof(struct assignment_key_t);
 
diff -u -r -N squid-4.1/tools/helper-mux/helper-mux.8 squid-4.2/tools/helper-mux/helper-mux.8
--- squid-4.1/tools/helper-mux/helper-mux.8	2018-07-02 15:39:09.000000000 +1200
+++ squid-4.2/tools/helper-mux/helper-mux.8	2018-08-06 02:42:44.000000000 +1200
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "HELPER-MUX 8"
-.TH HELPER-MUX 8 "2018-07-02" "perl v5.26.2" "User Contributed Perl Documentation"
+.TH HELPER-MUX 8 "2018-08-05" "perl v5.26.2" "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
