Merge ~ahasenack/ubuntu/+source/squid:cosmic-squid-4.2-merge into ubuntu/+source/squid:ubuntu/devel

Proposed by Andreas Hasenack
Status: Superseded
Proposed branch: ~ahasenack/ubuntu/+source/squid:cosmic-squid-4.2-merge
Merge into: ubuntu/+source/squid:ubuntu/devel
Diff against target: 11733 lines (+1722/-1627) (has conflicts)
214 files modified
ChangeLog (+30/-0)
RELEASENOTES.html (+3/-3)
configure (+10/-10)
configure.ac (+1/-1)
debian/changelog (+78/-0)
debian/control (+3/-3)
debian/patches/0003-installed-binary-for-debian-ci.patch (+19/-0)
debian/patches/0004-upstream-pr264.patch (+28/-0)
debian/patches/series (+7/-0)
debian/rules (+10/-0)
debian/tests/control (+1/-1)
dev/null (+0/-41)
doc/release-notes/release-4.html (+3/-3)
errors/af/ERR_AGENT_CONFIGURE (+3/-3)
errors/af/ERR_AGENT_WPAD (+3/-3)
errors/ar/ERR_AGENT_CONFIGURE (+3/-3)
errors/ar/ERR_AGENT_WPAD (+3/-3)
errors/az/ERR_AGENT_CONFIGURE (+3/-3)
errors/az/ERR_AGENT_WPAD (+3/-3)
errors/bg/ERR_AGENT_CONFIGURE (+3/-3)
errors/bg/ERR_AGENT_WPAD (+3/-3)
errors/ca/ERR_AGENT_CONFIGURE (+3/-3)
errors/ca/ERR_AGENT_WPAD (+3/-3)
errors/cs/ERR_AGENT_CONFIGURE (+3/-3)
errors/cs/ERR_AGENT_WPAD (+3/-3)
errors/da/ERR_AGENT_CONFIGURE (+3/-3)
errors/da/ERR_AGENT_WPAD (+3/-3)
errors/de/ERR_AGENT_CONFIGURE (+3/-3)
errors/de/ERR_AGENT_WPAD (+3/-3)
errors/el/ERR_AGENT_CONFIGURE (+3/-3)
errors/el/ERR_AGENT_WPAD (+3/-3)
errors/en/ERR_AGENT_CONFIGURE (+3/-3)
errors/en/ERR_AGENT_WPAD (+3/-3)
errors/es/ERR_AGENT_CONFIGURE (+3/-3)
errors/es/ERR_AGENT_WPAD (+3/-3)
errors/et/ERR_AGENT_CONFIGURE (+3/-3)
errors/et/ERR_AGENT_WPAD (+3/-3)
errors/fa/ERR_AGENT_CONFIGURE (+3/-3)
errors/fa/ERR_AGENT_WPAD (+3/-3)
errors/fi/ERR_AGENT_CONFIGURE (+3/-3)
errors/fi/ERR_AGENT_WPAD (+3/-3)
errors/fr/ERR_AGENT_CONFIGURE (+3/-3)
errors/fr/ERR_AGENT_WPAD (+3/-3)
errors/he/ERR_AGENT_CONFIGURE (+3/-3)
errors/he/ERR_AGENT_WPAD (+3/-3)
errors/hu/ERR_AGENT_CONFIGURE (+3/-3)
errors/hu/ERR_AGENT_WPAD (+3/-3)
errors/hy/ERR_AGENT_CONFIGURE (+3/-3)
errors/hy/ERR_AGENT_WPAD (+3/-3)
errors/id/ERR_AGENT_CONFIGURE (+3/-3)
errors/id/ERR_AGENT_WPAD (+3/-3)
errors/it/ERR_AGENT_CONFIGURE (+3/-3)
errors/it/ERR_AGENT_WPAD (+3/-3)
errors/ja/ERR_AGENT_CONFIGURE (+3/-3)
errors/ja/ERR_AGENT_WPAD (+3/-3)
errors/ka/ERR_AGENT_CONFIGURE (+3/-3)
errors/ka/ERR_AGENT_WPAD (+3/-3)
errors/ko/ERR_AGENT_CONFIGURE (+3/-3)
errors/ko/ERR_AGENT_WPAD (+3/-3)
errors/lt/ERR_AGENT_CONFIGURE (+3/-3)
errors/lt/ERR_AGENT_WPAD (+3/-3)
errors/lv/ERR_AGENT_CONFIGURE (+3/-3)
errors/lv/ERR_AGENT_WPAD (+3/-3)
errors/ms/ERR_AGENT_CONFIGURE (+3/-3)
errors/ms/ERR_AGENT_WPAD (+3/-3)
errors/nl/ERR_AGENT_CONFIGURE (+3/-3)
errors/nl/ERR_AGENT_WPAD (+3/-3)
errors/oc/ERR_AGENT_CONFIGURE (+3/-3)
errors/oc/ERR_AGENT_WPAD (+3/-3)
errors/pl/ERR_AGENT_CONFIGURE (+3/-3)
errors/pl/ERR_AGENT_WPAD (+3/-3)
errors/pt-br/ERR_AGENT_CONFIGURE (+3/-3)
errors/pt-br/ERR_AGENT_WPAD (+3/-3)
errors/pt/ERR_AGENT_CONFIGURE (+3/-3)
errors/pt/ERR_AGENT_WPAD (+3/-3)
errors/ro/ERR_AGENT_CONFIGURE (+3/-3)
errors/ro/ERR_AGENT_WPAD (+3/-3)
errors/ru/ERR_AGENT_CONFIGURE (+3/-3)
errors/ru/ERR_AGENT_WPAD (+3/-3)
errors/sk/ERR_AGENT_CONFIGURE (+3/-3)
errors/sk/ERR_AGENT_WPAD (+3/-3)
errors/sl/ERR_AGENT_CONFIGURE (+3/-3)
errors/sl/ERR_AGENT_WPAD (+3/-3)
errors/sr-cyrl/ERR_AGENT_CONFIGURE (+3/-3)
errors/sr-cyrl/ERR_AGENT_WPAD (+3/-3)
errors/sr-latn/ERR_AGENT_CONFIGURE (+3/-3)
errors/sr-latn/ERR_AGENT_WPAD (+3/-3)
errors/sv/ERR_AGENT_CONFIGURE (+3/-3)
errors/sv/ERR_AGENT_WPAD (+3/-3)
errors/th/ERR_AGENT_CONFIGURE (+3/-3)
errors/th/ERR_AGENT_WPAD (+3/-3)
errors/tr/ERR_AGENT_CONFIGURE (+3/-3)
errors/tr/ERR_AGENT_WPAD (+3/-3)
errors/uk/ERR_AGENT_CONFIGURE (+3/-3)
errors/uk/ERR_AGENT_WPAD (+3/-3)
errors/uz/ERR_AGENT_CONFIGURE (+3/-3)
errors/uz/ERR_AGENT_WPAD (+3/-3)
errors/vi/ERR_AGENT_CONFIGURE (+3/-3)
errors/vi/ERR_AGENT_WPAD (+3/-3)
errors/zh-hans/ERR_AGENT_CONFIGURE (+3/-3)
errors/zh-hans/ERR_AGENT_WPAD (+3/-3)
errors/zh-hant/ERR_AGENT_CONFIGURE (+3/-3)
errors/zh-hant/ERR_AGENT_WPAD (+3/-3)
include/version.h (+1/-1)
src/AccessLogEntry.cc (+12/-0)
src/AccessLogEntry.h (+18/-0)
src/CacheManager.h (+0/-3)
src/Downloader.cc (+1/-3)
src/HttpMsg.h (+1/-1)
src/HttpReply.cc (+17/-8)
src/HttpReply.h (+6/-2)
src/HttpRequest.cc (+7/-1)
src/HttpRequest.h (+4/-0)
src/Makefile.am (+0/-4)
src/Makefile.in (+20/-27)
src/MemObject.cc (+4/-16)
src/MemObject.h (+19/-25)
src/MemStore.cc (+1/-1)
src/PeerDigest.h (+20/-17)
src/SquidConfig.h (+8/-4)
src/StatCounters.h (+61/-63)
src/StatHist.h (+14/-32)
src/acl/BoolOps.cc (+2/-1)
src/acl/FilledChecklist.cc (+2/-2)
src/acl/external/SQL_session/ext_sql_session_acl.8 (+1/-1)
src/acl/external/delayer/ext_delayer_acl.8 (+1/-1)
src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8 (+1/-1)
src/anyp/TrafficMode.h (+5/-9)
src/anyp/Uri.cc (+62/-9)
src/anyp/Uri.h (+7/-1)
src/auth/basic/DB/basic_db_auth.8 (+1/-1)
src/auth/basic/POP3/basic_pop3_auth.8 (+1/-1)
src/cache_cf.cc (+11/-9)
src/cf.data.pre (+143/-61)
src/client_side.cc (+10/-79)
src/client_side.h (+0/-2)
src/client_side_reply.cc (+6/-8)
src/client_side_request.cc (+104/-38)
src/client_side_request.h (+45/-2)
src/clients/FtpGateway.cc (+66/-85)
src/comm/Loops.h (+6/-1)
src/comm/ModDevPoll.cc (+0/-11)
src/comm/ModEpoll.cc (+0/-8)
src/comm/ModKqueue.cc (+1/-13)
src/comm/ModPoll.cc (+1/-6)
src/comm/ModSelect.cc (+1/-6)
src/comm/ModSelectWin32.cc (+1/-6)
src/comm/TcpAcceptor.cc (+1/-0)
src/debug.cc (+11/-7)
src/dlink.h (+5/-9)
src/dns_internal.cc (+57/-87)
src/esi/Element.h (+18/-0)
src/esi/Esi.cc (+30/-77)
src/esi/Makefile.am (+0/-1)
src/esi/Makefile.in (+4/-5)
src/esi/Sequence.cc (+8/-6)
src/esi/Sequence.h (+1/-2)
src/eui/Eui64.h (+1/-3)
src/fd.cc (+1/-2)
src/format/Format.cc (+3/-4)
src/fqdncache.cc (+1/-2)
src/fs/rock/RockRebuild.cc (+0/-1)
src/fs/ufs/UFSSwapDir.cc (+76/-101)
src/fs/ufs/UFSSwapDir.h (+1/-1)
src/fs_io.cc (+14/-13)
src/fs_io.h (+11/-1)
src/htcp.cc (+15/-20)
src/http/one/ResponseParser.cc (+1/-10)
src/http/url_rewriters/LFS/url_lfs_rewrite.8 (+1/-1)
src/icmp/Icmp.h (+11/-8)
src/icmp/IcmpPinger.cc (+1/-1)
src/icmp/IcmpSquid.cc (+0/-1)
src/icmp/net_db.cc (+1/-1)
src/icp_v2.cc (+2/-0)
src/ident/Ident.cc (+4/-2)
src/ipc/StoreMap.cc (+1/-3)
src/ipc/StoreMap.h (+16/-7)
src/ipc/TypedMsgHdr.cc (+24/-5)
src/ipc/TypedMsgHdr.h (+8/-3)
src/ipcache.cc (+1/-2)
src/log/DB/log_db_daemon.8 (+1/-1)
src/log/ModStdio.cc (+12/-7)
src/mem/old_api.cc (+13/-21)
src/neighbors.cc (+0/-8)
src/peer_digest.cc (+29/-22)
src/security/ServerOptions.cc (+7/-4)
src/security/cert_validators/fake/security_fake_certverify.8 (+1/-1)
src/servers/FtpServer.cc (+1/-4)
src/servers/Http1Server.cc (+13/-12)
src/snmp/Pdu.cc (+2/-1)
src/snmp/Pdu.h (+1/-1)
src/snmp/Session.cc (+19/-35)
src/snmp/Session.h (+2/-4)
src/snmp/Var.cc (+5/-9)
src/ssl/PeekingPeerConnector.cc (+5/-5)
src/stat.cc (+55/-114)
src/store.cc (+1/-1)
src/store/Disks.cc (+16/-16)
src/store/id_rewriters/file/storeid_file_rewrite.8 (+1/-1)
src/store_digest.cc (+17/-16)
src/store_rebuild.cc (+1/-1)
src/store_rebuild.h (+10/-16)
src/tests/stub_HttpReply.cc (+17/-16)
src/tests/stub_MemObject.cc (+2/-13)
src/tests/stub_cache_manager.cc (+1/-1)
src/tests/stub_client_side.cc (+0/-1)
src/tests/stub_libanyp.cc (+0/-1)
src/tests/stub_libcomm.cc (+0/-1)
src/tests/testRock.cc (+1/-1)
src/tests/testUfs.cc (+1/-1)
src/tools.cc (+1/-1)
src/tunnel.cc (+0/-1)
src/wccp2.cc (+2/-1)
tools/helper-mux/helper-mux.8 (+1/-1)
Conflict in debian/changelog
Conflict in debian/patches/0003-installed-binary-for-debian-ci.patch
Conflict in debian/patches/series
Conflict in debian/rules
Reviewer Review Type Date Requested Status
Canonical Server Core Reviewers Pending
Canonical Server Pending
Review via email: mp+356099@code.launchpad.net

Description of the change

Merge from debian's 4.2-2 in an attempt to fix #1794553, where upstream commented that the crash might be due to incomplete gcc8 fixes that are in 4.1 and that were improved in 4.2.

There is no evidence yet that 4.2-2 fixes the reported crash, though. Also, upstream's 4.3 has further gcc8 fixes. I'm also using squid from cosmic in my home proxy and haven't seen it crash yet.

This MP is to have a review in place, and address any issues it raises, so that if the reporter of the crash bug can eventually confirm that the crash is gone, we can land this branch without further delays.

I had to introduce one small delta to correct the last debian change which was to add -latomic to certain architectures. The way it was done, it was being added to all arches, not just the listed ones. I pushed a PR to salsa to fix that.

I spent some time investigating this debian change: "Add upstream pr264 patch for systemd (Closes: #903165)". It claims to also resolve launchpad bug #1103362, but I'm not sure. I can confirm that squid fails to start if it cannot resolve a hostname in an acl, but I failed to reproduce that case in a normal boot of the system, even when bind9 was installed and configured (via netplan) to be the sole dns resolver of this system.

Also of note about that fix is the fact that what was eventually merged upstream did not include the "Wants=network-online.target" line that the debian patch has, just the "After=" change. Compare:

debian's patch: https://salsa.debian.org/squid-team/squid/blob/447e7b7587841230ab0829d47fb951c6f5d5ba0b/debian/patches/0004-upstream-pr264.patch

Upstream commit: https://github.com/squid-cache/squid/commit/c321737de30e69b0d31944b8962eccd4e88b7267

The debian patch is now removed in salsa for the upcoming 4.3 release, exactly because upstream adopted it, but sans the "Wants=" line.

I can adopt the exact same change that upstream did, or keep debian's from 4.2-2. Right now this MP has debian's patch. As I said, I couldn't reproduce the mentioned bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903165 or https://bugs.launchpad.net/ubuntu/+source/squid3/+bug/1103362)

About the remaining gcc8 fixes, upstream hasn't committed all of them yet, so I kept my two changes in that regard: d/p/fix-uninitialized-var.patch, and -Wno-format-truncation.

To post a comment you must log in.

Unmerged commits

40a925c... by Andreas Hasenack

update-maintainer

e683dec... by Andreas Hasenack

reconstruct-changelog

545b881... by Andreas Hasenack

merge-changelogs

1b9f272... by Andreas Hasenack

  * Added:
    - d/rules: only use -latomic with the intended architectures, instead
      of all of them
      (https://salsa.debian.org/squid-team/squid/merge_requests/6 and see also
      https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907106#5)

9e2270c... by Andreas Hasenack

    - d/t/upstream-test-suite: drop the sed line, since patch
      0003-installed-binary-for-debian-ci.patch is doing this work now.
      (https://salsa.debian.org/squid-team/squid/commit/ad4372b444ba8b1587839)
      [Fixed in 4.2-1]

75cd25d... by Andreas Hasenack

    - d/t/0003-installed-binary-for-debian-ci.patch: use the squid
      binary from the system, instead of the one from the source tree.
      [Included in 4.2-1]

5573dde... by Andreas Hasenack

    - d/t/upstream-test-suite: also make libmem.la, needed by the tests.
      [Fixed in 4.2-1]

de21835... by Andreas Hasenack

    - d/t/test-squid.py: fix the process name. The PID points at the parent.
      [Fixed in 4.2-1]

ec27139... by Andreas Hasenack

    - d/t/test-squid.py: fix apparmor profile filename
      [Fixed in 4.2-1]

85eb3cd... by Andreas Hasenack

  * Dropped changes:
    - d/rules: enable cdbs parallel build
      [Adopted in 4.2-1]

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/ChangeLog b/ChangeLog
index 2d758a6..558d26c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
1Changes to squid-4.2 (04 Aug 2018):
2
3 - Regression fix: support for https_port clientca= option
4 - Regression Bug 4870: milliseconds logformats prepend 0s instead of spaces
5 - Bug 4861: HTTPMSGLOCK missing pointer safety
6 - Bug 4843 pt3: GCC-8 fixes and refactoring
7 - HTTP: Do not update stored headers on 304 responses
8 - Fix segmentation fault on -k parse
9 - Fix %>ru logging of huge URLs
10 - ... and several performance optimizations
11 - ... and some documentation updates
12 - ... and all fixes from 3.5.28
13
1Changes to squid-4.1 (02 Jul 2018):14Changes to squid-4.1 (02 Jul 2018):
215
3 - Bug 4223: fixed retries of failed re-forwardable transactions16 - Bug 4223: fixed retries of failed re-forwardable transactions
@@ -396,6 +409,23 @@ Changes to squid-4.0.1 (14 Oct 2015):
396 - ... and many documentation changes409 - ... and many documentation changes
397 - ... and much code cleanup and polishing410 - ... and much code cleanup and polishing
398411
412Changes to squid-3.5.28 (15 Jul 2018):
413
414 - SQUID-2018:1: crash processing SSL-Bumped traffic containing ESI
415 - SQUID-2018:2: crash handling responses to internally generated requests
416 - SQUID-2018:3 / CVE-2018-1172: crash in ESI Response processing
417 - Bug 4861: HTTPMSGLOCK missing pointer safety
418 - Bug 4829: IPC shared memory leaks when disker queue overflows
419 - Bug 4767: SMP breaks IPv6 SNMP and cache manager queries
420 - Bug 2821: Ignore Content-Range in non-206 responses
421 - HTCP: Ignore HTCP packets with invalid URI
422 - SSL-Bump: fix authentication with schemes other than Basic
423 - TPROXY: Fix clientside_mark and client port logging
424 - Fix "Cannot assign requested address" for to-origin TPROXY FTP data
425 - Fix --with-netfilter-conntrack error message
426 - Validate mime icon URL before allocating store entries
427 - ... and many documentation changes
428
399Changes to squid-3.5.27 (20 Aug 2017):429Changes to squid-3.5.27 (20 Aug 2017):
400430
401 - Regression Bug #4112: ssl_engine does not accept cryptodev431 - Regression Bug #4112: ssl_engine does not accept cryptodev
diff --git a/RELEASENOTES.html b/RELEASENOTES.html
index 3d44a11..77a8bbc 100644
--- a/RELEASENOTES.html
+++ b/RELEASENOTES.html
@@ -2,10 +2,10 @@
2<HTML>2<HTML>
3<HEAD>3<HEAD>
4 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.72">4 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.72">
5 <TITLE>Squid 4.1 release notes</TITLE>5 <TITLE>Squid 4.2 release notes</TITLE>
6</HEAD>6</HEAD>
7<BODY>7<BODY>
8<H1>Squid 4.1 release notes</H1>8<H1>Squid 4.2 release notes</H1>
99
10<H2>Squid Developers</H2>10<H2>Squid Developers</H2>
11<HR>11<HR>
@@ -63,7 +63,7 @@ for Applied Network Research and members of the Web Caching community.</EM>
63<HR>63<HR>
64<H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>64<H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>
6565
66<P>The Squid Team are pleased to announce the release of Squid-4.1 for testing.</P>66<P>The Squid Team are pleased to announce the release of Squid-4.2 for testing.</P>
67<P>This new release is available for download from 67<P>This new release is available for download from
68<A HREF="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</A> or the68<A HREF="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</A> or the
69<A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>69<A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>
diff --git a/configure b/configure
index b9e4a85..abc441f 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
1#! /bin/sh1#! /bin/sh
2# From configure.ac Revision.2# From configure.ac Revision.
3# Guess values for system-dependent variables and create Makefiles.3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.69 for Squid Web Proxy 4.1.4# Generated by GNU Autoconf 2.69 for Squid Web Proxy 4.2.
5#5#
6# Report bugs to <http://bugs.squid-cache.org/>.6# Report bugs to <http://bugs.squid-cache.org/>.
7#7#
@@ -595,8 +595,8 @@ MAKEFLAGS=
595# Identity of this package.595# Identity of this package.
596PACKAGE_NAME='Squid Web Proxy'596PACKAGE_NAME='Squid Web Proxy'
597PACKAGE_TARNAME='squid'597PACKAGE_TARNAME='squid'
598PACKAGE_VERSION='4.1'598PACKAGE_VERSION='4.2'
599PACKAGE_STRING='Squid Web Proxy 4.1'599PACKAGE_STRING='Squid Web Proxy 4.2'
600PACKAGE_BUGREPORT='http://bugs.squid-cache.org/'600PACKAGE_BUGREPORT='http://bugs.squid-cache.org/'
601PACKAGE_URL=''601PACKAGE_URL=''
602602
@@ -1647,7 +1647,7 @@ if test "$ac_init_help" = "long"; then
1647 # Omit some internal or obsolete options to make the list less imposing.1647 # Omit some internal or obsolete options to make the list less imposing.
1648 # This message is too long to be a string in the A/UX 3.1 sh.1648 # This message is too long to be a string in the A/UX 3.1 sh.
1649 cat <<_ACEOF1649 cat <<_ACEOF
1650\`configure' configures Squid Web Proxy 4.1 to adapt to many kinds of systems.1650\`configure' configures Squid Web Proxy 4.2 to adapt to many kinds of systems.
16511651
1652Usage: $0 [OPTION]... [VAR=VALUE]...1652Usage: $0 [OPTION]... [VAR=VALUE]...
16531653
@@ -1718,7 +1718,7 @@ fi
17181718
1719if test -n "$ac_init_help"; then1719if test -n "$ac_init_help"; then
1720 case $ac_init_help in1720 case $ac_init_help in
1721 short | recursive ) echo "Configuration of Squid Web Proxy 4.1:";;1721 short | recursive ) echo "Configuration of Squid Web Proxy 4.2:";;
1722 esac1722 esac
1723 cat <<\_ACEOF1723 cat <<\_ACEOF
17241724
@@ -2147,7 +2147,7 @@ fi
2147test -n "$ac_init_help" && exit $ac_status2147test -n "$ac_init_help" && exit $ac_status
2148if $ac_init_version; then2148if $ac_init_version; then
2149 cat <<\_ACEOF2149 cat <<\_ACEOF
2150Squid Web Proxy configure 4.12150Squid Web Proxy configure 4.2
2151generated by GNU Autoconf 2.692151generated by GNU Autoconf 2.69
21522152
2153Copyright (C) 2012 Free Software Foundation, Inc.2153Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3251,7 +3251,7 @@ cat >config.log <<_ACEOF
3251This file contains any messages produced by compilers while3251This file contains any messages produced by compilers while
3252running configure, to aid debugging if configure makes a mistake.3252running configure, to aid debugging if configure makes a mistake.
32533253
3254It was created by Squid Web Proxy $as_me 4.1, which was3254It was created by Squid Web Proxy $as_me 4.2, which was
3255generated by GNU Autoconf 2.69. Invocation command line was3255generated by GNU Autoconf 2.69. Invocation command line was
32563256
3257 $ $0 $@3257 $ $0 $@
@@ -4118,7 +4118,7 @@ fi
41184118
4119# Define the identity of the package.4119# Define the identity of the package.
4120 PACKAGE='squid'4120 PACKAGE='squid'
4121 VERSION='4.1'4121 VERSION='4.2'
41224122
41234123
4124cat >>confdefs.h <<_ACEOF4124cat >>confdefs.h <<_ACEOF
@@ -43832,7 +43832,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
43832# report actual input values of CONFIG_FILES etc. instead of their43832# report actual input values of CONFIG_FILES etc. instead of their
43833# values after options handling.43833# values after options handling.
43834ac_log="43834ac_log="
43835This file was extended by Squid Web Proxy $as_me 4.1, which was43835This file was extended by Squid Web Proxy $as_me 4.2, which was
43836generated by GNU Autoconf 2.69. Invocation command line was43836generated by GNU Autoconf 2.69. Invocation command line was
4383743837
43838 CONFIG_FILES = $CONFIG_FILES43838 CONFIG_FILES = $CONFIG_FILES
@@ -43898,7 +43898,7 @@ _ACEOF
43898cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=143898cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
43899ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"43899ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
43900ac_cs_version="\\43900ac_cs_version="\\
43901Squid Web Proxy config.status 4.143901Squid Web Proxy config.status 4.2
43902configured by $0, generated by GNU Autoconf 2.69,43902configured by $0, generated by GNU Autoconf 2.69,
43903 with options \\"\$ac_cs_config\\"43903 with options \\"\$ac_cs_config\\"
4390443904
diff --git a/configure.ac b/configure.ac
index 9bdc7a6..23ab7c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@
5## Please see the COPYING and CONTRIBUTORS files for details.5## Please see the COPYING and CONTRIBUTORS files for details.
6##6##
77
8AC_INIT([Squid Web Proxy],[4.1],[http://bugs.squid-cache.org/],[squid])8AC_INIT([Squid Web Proxy],[4.2],[http://bugs.squid-cache.org/],[squid])
9AC_PREREQ(2.61)9AC_PREREQ(2.61)
10AC_CONFIG_HEADERS([include/autoconf.h])10AC_CONFIG_HEADERS([include/autoconf.h])
11AC_CONFIG_AUX_DIR(cfgaux)11AC_CONFIG_AUX_DIR(cfgaux)
diff --git a/debian/changelog b/debian/changelog
index 2b85ae0..a186caa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,81 @@
1<<<<<<< debian/changelog
2=======
3squid (4.2-2ubuntu1) cosmic; urgency=medium
4
5 * Merge with Debian unstable (LP: #1794553). Remaining changes:
6 - Use snakeoil certificates.
7 - Add an example refresh pattern for debs.
8 - Add disabled by default AppArmor profile.
9 - d/p/fix-uninitialized-var.patch: Workaround gcc's maybe-unitialized
10 error in parse_time_t, triggered on ppc64el due to the build using -O3
11 in that architecture.
12 - d/rules: Add -Wno-format-truncation to CXXFLAGS as a workaround if
13 building for ppc64el. On that arch, dpkg-buildflags sets -O3 instead of
14 -O2 and that triggers a format-truncation error on pcon.cc. See
15 See https://bugs.squid-cache.org/show_bug.cgi?id=4875
16 - Update apparmor profile to grant read access to squid binary
17 (LP #1792728)
18 * Dropped changes:
19 - d/rules: enable cdbs parallel build
20 [Adopted in 4.2-1]
21 - d/t/test-squid.py: fix apparmor profile filename
22 [Fixed in 4.2-1]
23 - d/t/test-squid.py: fix the process name. The PID points at the parent.
24 [Fixed in 4.2-1]
25 - d/t/upstream-test-suite: also make libmem.la, needed by the tests.
26 [Fixed in 4.2-1]
27 - d/t/0003-installed-binary-for-debian-ci.patch: use the squid
28 binary from the system, instead of the one from the source tree.
29 [Included in 4.2-1]
30 - d/t/upstream-test-suite: drop the sed line, since patch
31 0003-installed-binary-for-debian-ci.patch is doing this work now.
32 (https://salsa.debian.org/squid-team/squid/commit/ad4372b444ba8b1587839)
33 [Fixed in 4.2-1]
34 * Added:
35 - d/rules: only use -latomic with the intended architectures, instead
36 of all of them
37 (https://salsa.debian.org/squid-team/squid/merge_requests/6 and see also
38 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907106#5)
39
40 -- Andreas Hasenack <andreas@canonical.com> Wed, 03 Oct 2018 16:20:37 -0300
41
42squid (4.2-2) unstable; urgency=high
43
44 [ Adrian Bunk <bunk@debian.org> ]
45 * Add -latomic for rmel m68k mips mipsel powerpc powerpcspe sh4
46 (Closes: #907106)
47
48 -- Luigi Gangitano <luigi@debian.org> Fri, 24 Aug 2018 08:57:15 +0200
49
50squid (4.2-1) unstable; urgency=high
51
52 [ Amos Jeffries <amosjeffries@squid-cache.org> ]
53 * New Upstream Release
54
55 * debian/patches/
56 - Patch to use installed binary for upstream config tests
57 - Remove patches included upstream: 0011-upstream-pr172.patch
58 - Add upstream pr264 patch for systemd (Closes: #903165)
59
60 * debian/control
61 - Bumped Standards-Version to 4.2.0.0, no change needed
62
63 [ Andreas Hasenack ]
64 * Enable CDBS parallel build
65 * d/t/upstream-test-suite: also make libmem.la, needed by the tests.
66 * d/t/test-squid.py: fix apparmor profile filename
67 * debian/tests/control: add ssl-cert to the list of dependencies of the
68 squid test, as apache is configured to load
69 /etc/ssl/certs/ssl-cert-snakeoil.pem in that test.
70 * d/t/test-squid.py: fix the process name. The PID points at the parent.
71
72 [ Luigi Gangitano ]
73 * debian/control
74 - Fix Vcs-Git and Vcs-Browser URLs
75
76 -- Luigi Gangitano <luigi@debian.org> Wed, 22 Aug 2018 13:57:15 +0200
77
78>>>>>>> debian/changelog
1squid (4.1-1ubuntu2) cosmic; urgency=medium79squid (4.1-1ubuntu2) cosmic; urgency=medium
280
3 * d/usr.sbin.squid: Update apparmor profile to grant read access to squid81 * d/usr.sbin.squid: Update apparmor profile to grant read access to squid
diff --git a/debian/control b/debian/control
index bdd9c4f..d6f27cc 100644
--- a/debian/control
+++ b/debian/control
@@ -5,9 +5,9 @@ Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Luigi Gangitano <luigi@debian.org>5XSBC-Original-Maintainer: Luigi Gangitano <luigi@debian.org>
6Uploaders: Santiago Garcia Mantinan <manty@debian.org>6Uploaders: Santiago Garcia Mantinan <manty@debian.org>
7Homepage: http://www.squid-cache.org7Homepage: http://www.squid-cache.org
8Standards-Version: 4.1.48Standards-Version: 4.2.0.0
9Vcs-Git: git://salsa.debian.org/squid-team/squid.git9Vcs-Git: https://salsa.debian.org/squid-team/squid.git
10Vcs-Browser: https://salsa.debian.org/squid-team/squid.git10Vcs-Browser: https://salsa.debian.org/squid-team/squid
11Build-Depends: ed, libltdl-dev, pkg-config11Build-Depends: ed, libltdl-dev, pkg-config
12 , g++ (>= 4.9) | clang (>= 3.7)12 , g++ (>= 4.9) | clang (>= 3.7)
13 , gcc (>= 4.9) | clang (>= 3.7)13 , gcc (>= 4.9) | clang (>= 3.7)
diff --git a/debian/patches/0003-installed-binary-for-debian-ci.patch b/debian/patches/0003-installed-binary-for-debian-ci.patch
index abbe089..fe90e8c 100644
--- a/debian/patches/0003-installed-binary-for-debian-ci.patch
+++ b/debian/patches/0003-installed-binary-for-debian-ci.patch
@@ -1,3 +1,4 @@
1<<<<<<< debian/patches/0003-installed-binary-for-debian-ci.patch
1Description: Use installed squid binary for Debian CI testing2Description: Use installed squid binary for Debian CI testing
2 Upstream config tests are designed for use during builds. Debian CI uses a3 Upstream config tests are designed for use during builds. Debian CI uses a
3 pre-built binary installation.4 pre-built binary installation.
@@ -14,6 +15,17 @@ index c8ff455d..bb7aef46 100644
14--- a/test-suite/Makefile.am15--- a/test-suite/Makefile.am
15+++ b/test-suite/Makefile.am16+++ b/test-suite/Makefile.am
16@@ -150,7 +150,7 @@ VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc stub_libmem.cc $(DEBUG_17@@ -150,7 +150,7 @@ VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc stub_libmem.cc $(DEBUG_
18=======
19From: Amos Jeffries <amosjeffries@squid-cache.org>
20Date: Sat, 21 Jul 2018 21:07:00 +1300
21Subject: Use installed squid binary for Debian CI testing
22
23Index: pkg-squid/test-suite/Makefile.am
24===================================================================
25--- pkg-squid.orig/test-suite/Makefile.am
26+++ pkg-squid/test-suite/Makefile.am
27@@ -150,7 +150,7 @@ VirtualDeleteOperator_SOURCES = VirtualD
28>>>>>>> debian/patches/0003-installed-binary-for-debian-ci.patch
17 squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*29 squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
18 @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \30 @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
19 for cfg in $$cfglist ; do \31 for cfg in $$cfglist ; do \
@@ -22,10 +34,17 @@ index c8ff455d..bb7aef46 100644
22 { echo "FAIL: squid.conf test: $$cfg" | \34 { echo "FAIL: squid.conf test: $$cfg" | \
23 sed s%$(top_builddir)/src/%% | \35 sed s%$(top_builddir)/src/%% | \
24 sed s%$(srcdir)/squidconf/%% ; \36 sed s%$(srcdir)/squidconf/%% ; \
37<<<<<<< debian/patches/0003-installed-binary-for-debian-ci.patch
25diff --git a/test-suite/Makefile.in b/test-suite/Makefile.in38diff --git a/test-suite/Makefile.in b/test-suite/Makefile.in
26index 5e7cd5fa..15f78635 10064439index 5e7cd5fa..15f78635 100644
27--- a/test-suite/Makefile.in40--- a/test-suite/Makefile.in
28+++ b/test-suite/Makefile.in41+++ b/test-suite/Makefile.in
42=======
43Index: pkg-squid/test-suite/Makefile.in
44===================================================================
45--- pkg-squid.orig/test-suite/Makefile.in
46+++ pkg-squid/test-suite/Makefile.in
47>>>>>>> debian/patches/0003-installed-binary-for-debian-ci.patch
29@@ -1477,7 +1477,7 @@ STUB.h: $(top_srcdir)/src/tests/STUB.h48@@ -1477,7 +1477,7 @@ STUB.h: $(top_srcdir)/src/tests/STUB.h
30 squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*49 squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
31 @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \50 @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
diff --git a/debian/patches/0004-upstream-pr264.patch b/debian/patches/0004-upstream-pr264.patch
32new file mode 10064451new file mode 100644
index 0000000..ac24243
--- /dev/null
+++ b/debian/patches/0004-upstream-pr264.patch
@@ -0,0 +1,28 @@
1From 90218ea99bb5c79b9be594777963ca91667f5fa2 Mon Sep 17 00:00:00 2001
2From: Amos Jeffries <amosjeffries@squid-cache.org>
3Date: Sun, 29 Jul 2018 02:43:21 +1200
4Subject: [PATCH 1/2] Update systemd dependencies in squid.service
5
6The network.target is not sufficient to guarantee network interfces and IPs
7are assigned and available. Particularly when systemd is not in charge
8of the IP assignment itself.
9Use network-online.target as well, which should ensure network is
10properly configured and online before starting Squid.
11---
12 tools/systemd/squid.service | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/tools/systemd/squid.service b/tools/systemd/squid.service
16index badfb677..eca4fc5c 100644
17--- a/tools/systemd/squid.service
18+++ b/tools/systemd/squid.service
19@@ -8,7 +8,8 @@
20 [Unit]
21 Description=Squid Web Proxy Server
22 Documentation=man:squid(8)
23-After=network.target nss-lookup.target
24+After=network.target network-online.target nss-lookup.target
25+Wants=network-online.target
26
27 [Service]
28 Type=forking
diff --git a/debian/patches/0011-upstream-pr172.patch b/debian/patches/0011-upstream-pr172.patch
0deleted file mode 10064429deleted file mode 100644
index 4ea48b3..0000000
--- a/debian/patches/0011-upstream-pr172.patch
+++ /dev/null
@@ -1,3407 +0,0 @@
1Upstream patch from PR 172 resolves build issues with GCC-8
2
3diff --git a/src/CacheManager.h b/src/CacheManager.h
4index 9d2c5ce1..e0906479 100644
5--- a/src/CacheManager.h
6+++ b/src/CacheManager.h
7@@ -58,9 +58,6 @@ protected:
8 void registerProfile(const Mgr::ActionProfilePointer &profile);
9
10 Menu menu_;
11-
12-private:
13- static CacheManager* instance;
14 };
15
16 #endif /* SQUID_CACHEMANAGER_H */
17diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc
18index 7f8b1d10..1946ae48 100644
19--- a/src/HttpRequest.cc
20+++ b/src/HttpRequest.cc
21@@ -80,7 +80,7 @@ HttpRequest::init()
22 #if USE_AUTH
23 auth_user_request = NULL;
24 #endif
25- memset(&flags, '\0', sizeof(flags));
26+ flags = RequestFlags();
27 range = NULL;
28 ims = -1;
29 imslen = 0;
30diff --git a/src/MemObject.cc b/src/MemObject.cc
31index 204699a1..6974cfc8 100644
32--- a/src/MemObject.cc
33+++ b/src/MemObject.cc
34@@ -96,30 +96,18 @@ MemObject::setUris(char const *aStoreId, char const *aLogUri, const HttpRequestM
35 #endif
36 }
37
38-MemObject::MemObject() :
39- inmem_lo(0),
40- nclients(0),
41- request(nullptr),
42- ping_reply_callback(nullptr),
43- ircb_data(nullptr),
44- id(0),
45- object_sz(-1),
46- swap_hdr_sz(0),
47-#if URL_CHECKSUM_DEBUG
48- chksum(0),
49-#endif
50- vary_headers(nullptr)
51+MemObject::MemObject()
52 {
53- debugs(20, 3, "new MemObject " << this);
54+ debugs(20, 3, "MemObject constructed, this=" << this);
55+ ping_reply_callback = nullptr;
56 memset(&start_ping, 0, sizeof(start_ping));
57- memset(&abort, 0, sizeof(abort));
58 _reply = new HttpReply;
59 HTTPMSGLOCK(_reply);
60 }
61
62 MemObject::~MemObject()
63 {
64- debugs(20, 3, "del MemObject " << this);
65+ debugs(20, 3, "MemObject destructed, this=" << this);
66 const Ctx ctx = ctx_enter(hasUris() ? urlXXX() : "[unknown_ctx]");
67
68 #if URL_CHECKSUM_DEBUG
69diff --git a/src/MemObject.h b/src/MemObject.h
70index 508fb4e9..53c15029 100644
71--- a/src/MemObject.h
72+++ b/src/MemObject.h
73@@ -103,26 +103,24 @@ public:
74
75 HttpRequestMethod method;
76 mem_hdr data_hdr;
77- int64_t inmem_lo;
78+ int64_t inmem_lo = 0;
79 dlink_list clients;
80
81 size_t clientCount() const {return nclients;}
82
83 bool clientIsFirst(void *sc) const {return (clients.head && sc == clients.head->data);}
84
85- int nclients;
86+ int nclients = 0;
87
88 class SwapOut
89 {
90 public:
91- SwapOut() : queue_offset(0), decision(swNeedsCheck) {}
92-
93- int64_t queue_offset; ///< number of bytes sent to SwapDir for writing
94+ int64_t queue_offset = 0; ///< number of bytes sent to SwapDir for writing
95 StoreIOState::Pointer sio;
96
97 /// Decision states for StoreEntry::swapoutPossible() and related code.
98 typedef enum { swNeedsCheck = 0, swImpossible = -1, swPossible = +1, swStarted } Decision;
99- Decision decision; ///< current decision state
100+ Decision decision = swNeedsCheck; ///< current decision state
101 };
102
103 SwapOut swapout;
104@@ -138,10 +136,8 @@ public:
105 class XitTable
106 {
107 public:
108- XitTable(): index(-1), io(ioUndecided) {}
109-
110- int32_t index; ///< entry position inside the in-transit table
111- Io io; ///< current I/O state
112+ int32_t index = -1; ///< entry position inside the in-transit table
113+ Io io = ioUndecided; ///< current I/O state
114 };
115 XitTable xitTable; ///< current [shared] memory caching state for the entry
116
117@@ -149,34 +145,32 @@ public:
118 class MemCache
119 {
120 public:
121- MemCache(): index(-1), offset(0), io(ioUndecided) {}
122+ int32_t index = -1; ///< entry position inside the memory cache
123+ int64_t offset = 0; ///< bytes written/read to/from the memory cache so far
124
125- int32_t index; ///< entry position inside the memory cache
126- int64_t offset; ///< bytes written/read to/from the memory cache so far
127-
128- Io io; ///< current I/O state
129+ Io io = ioUndecided; ///< current I/O state
130 };
131 MemCache memCache; ///< current [shared] memory caching state for the entry
132
133 /* Read only - this reply must be preserved by store clients */
134 /* The original reply. possibly with updated metadata. */
135- HttpRequest *request;
136+ HttpRequest *request = nullptr;
137
138 struct timeval start_ping;
139 IRCB *ping_reply_callback;
140- void *ircb_data;
141+ void *ircb_data = nullptr;
142
143- struct {
144+ struct abort_ {
145+ abort_() { callback = nullptr; }
146 STABH *callback;
147- void *data;
148+ void *data = nullptr;
149 } abort;
150 RemovalPolicyNode repl;
151- int id;
152- int64_t object_sz;
153- size_t swap_hdr_sz;
154+ int id = 0;
155+ int64_t object_sz = -1;
156+ size_t swap_hdr_sz = 0;
157 #if URL_CHECKSUM_DEBUG
158-
159- unsigned int chksum;
160+ unsigned int chksum = 0;
161 #endif
162
163 SBuf vary_headers;
164@@ -185,7 +179,7 @@ public:
165 void kickReads();
166
167 private:
168- HttpReply *_reply;
169+ HttpReply *_reply = nullptr;
170
171 mutable String storeId_; ///< StoreId for our entry (usually request URI)
172 mutable String logUri_; ///< URI used for logging (usually request URI)
173diff --git a/src/PeerDigest.h b/src/PeerDigest.h
174index 442e9054..17a36601 100644
175--- a/src/PeerDigest.h
176+++ b/src/PeerDigest.h
177@@ -76,35 +76,38 @@ class PeerDigest
178 CBDATA_CLASS(PeerDigest);
179
180 public:
181- CachePeer *peer; /**< pointer back to peer structure, argh */
182- CacheDigest *cd; /**< actual digest structure */
183+ PeerDigest(CachePeer *);
184+ ~PeerDigest();
185+
186+ CachePeer *peer = nullptr; /**< pointer back to peer structure, argh */
187+ CacheDigest *cd = nullptr; /**< actual digest structure */
188 String host; /**< copy of peer->host */
189- const char *req_result; /**< text status of the last request */
190+ const char *req_result = nullptr; /**< text status of the last request */
191
192 struct {
193- bool needed; /**< there were requests for this digest */
194- bool usable; /**< can be used for lookups */
195- bool requested; /**< in process of receiving [fresh] digest */
196+ bool needed = false; /**< there were requests for this digest */
197+ bool usable = false; /**< can be used for lookups */
198+ bool requested = false; /**< in process of receiving [fresh] digest */
199 } flags;
200
201 struct {
202 /* all times are absolute unless augmented with _delay */
203- time_t initialized; /* creation */
204- time_t needed; /* first lookup/use by a peer */
205- time_t next_check; /* next scheduled check/refresh event */
206- time_t retry_delay; /* delay before re-checking _invalid_ digest */
207- time_t requested; /* requested a fresh copy of a digest */
208- time_t req_delay; /* last request response time */
209- time_t received; /* received the current copy of a digest */
210- time_t disabled; /* disabled for good */
211+ time_t initialized = 0; /* creation */
212+ time_t needed = 0; /* first lookup/use by a peer */
213+ time_t next_check = 0; /* next scheduled check/refresh event */
214+ time_t retry_delay = 0; /* delay before re-checking _invalid_ digest */
215+ time_t requested = 0; /* requested a fresh copy of a digest */
216+ time_t req_delay = 0; /* last request response time */
217+ time_t received = 0; /* received the current copy of a digest */
218+ time_t disabled = 0; /* disabled for good */
219 } times;
220
221 struct {
222 CacheDigestGuessStats guess;
223- int used_count;
224+ int used_count = 0;
225
226 struct {
227- int msgs;
228+ int msgs = 0;
229 ByteCounter kbytes;
230 } sent, recv;
231 } stats;
232@@ -112,7 +115,7 @@ public:
233
234 extern const Version CacheDigestVer;
235
236-PeerDigest *peerDigestCreate(CachePeer * p);
237+void peerDigestCreate(CachePeer * p);
238 void peerDigestNeeded(PeerDigest * pd);
239 void peerDigestNotePeerGone(PeerDigest * pd);
240 void peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e);
241diff --git a/src/SquidConfig.h b/src/SquidConfig.h
242index 1832d4cd..3bbc0a5a 100644
243--- a/src/SquidConfig.h
244+++ b/src/SquidConfig.h
245@@ -24,6 +24,7 @@
246 #include "ssl/support.h"
247 #endif
248 #include "store/forward.h"
249+#include "store/Disk.h"
250
251 #if USE_OPENSSL
252 class sslproxy_cert_sign;
253@@ -50,11 +51,14 @@ class PortCfg;
254 namespace Store {
255 class DiskConfig {
256 public:
257- RefCount<SwapDir> *swapDirs;
258- int n_allocated;
259- int n_configured;
260+ DiskConfig() { assert(swapDirs == nullptr); }
261+ ~DiskConfig() { delete[] swapDirs; }
262+
263+ RefCount<SwapDir> *swapDirs = nullptr;
264+ int n_allocated = 0;
265+ int n_configured = 0;
266 /// number of disk processes required to support all cache_dirs
267- int n_strands;
268+ int n_strands = 0;
269 };
270 #define INDEXSD(i) (Config.cacheSwap.swapDirs[i].getRaw())
271 }
272diff --git a/src/StatCounters.h b/src/StatCounters.h
273index e5578352..85bd86d6 100644
274--- a/src/StatCounters.h
275+++ b/src/StatCounters.h
276@@ -17,29 +17,31 @@
277 class CacheDigestGuessStats
278 {
279 public:
280- int trueHits;
281- int falseHits;
282- int trueMisses;
283- int falseMisses;
284- int closeHits; /// \todo: temporary remove it later
285+ int trueHits = 0;
286+ int falseHits = 0;
287+ int trueMisses = 0;
288+ int falseMisses = 0;
289+ int closeHits = 0; /// \todo: temporary remove it later
290 };
291 #endif
292
293 /** General collection of process-wide statistics.
294 *
295- * \note if you add a field to StatCounters,
296- * you MUST sync statCountersInitSpecial, statCountersClean, and statCountersCopy
297+ * \note if you add a field to StatCounters which requires any non-trivial
298+ * initialization or copy you MUST sync statCountersInitSpecial()
299 */
300 class StatCounters
301 {
302 public:
303+ StatCounters() : timestamp(current_time) {}
304+
305 struct {
306- int clients;
307- int requests;
308- int hits;
309- int mem_hits;
310- int disk_hits;
311- int errors;
312+ int clients = 0;
313+ int requests = 0;
314+ int hits = 0;
315+ int mem_hits = 0;
316+ int disk_hits = 0;
317+ int errors = 0;
318 ByteCounter kbytes_in;
319 ByteCounter kbytes_out;
320 ByteCounter hit_kbytes_out;
321@@ -53,24 +55,24 @@ public:
322 struct {
323
324 struct {
325- int requests;
326- int errors;
327+ int requests = 0;
328+ int errors = 0;
329 ByteCounter kbytes_in;
330 ByteCounter kbytes_out;
331 } all , http, ftp, other;
332 } server;
333
334 struct {
335- int pkts_sent;
336- int queries_sent;
337- int replies_sent;
338- int pkts_recv;
339- int queries_recv;
340- int replies_recv;
341- int hits_sent;
342- int hits_recv;
343- int replies_queued;
344- int replies_dropped;
345+ int pkts_sent = 0;
346+ int queries_sent = 0;
347+ int replies_sent = 0;
348+ int pkts_recv = 0;
349+ int queries_recv = 0;
350+ int replies_recv = 0;
351+ int hits_sent = 0;
352+ int hits_recv = 0;
353+ int replies_queued = 0;
354+ int replies_dropped = 0;
355 ByteCounter kbytes_sent;
356 ByteCounter q_kbytes_sent;
357 ByteCounter r_kbytes_sent;
358@@ -79,17 +81,17 @@ public:
359 ByteCounter r_kbytes_recv;
360 StatHist querySvcTime;
361 StatHist replySvcTime;
362- int query_timeouts;
363- int times_used;
364+ int query_timeouts = 0;
365+ int times_used = 0;
366 } icp;
367
368 struct {
369- int pkts_sent;
370- int pkts_recv;
371+ int pkts_sent = 0;
372+ int pkts_recv = 0;
373 } htcp;
374
375 struct {
376- int requests;
377+ int requests = 0;
378 } unlink;
379
380 struct {
381@@ -97,28 +99,26 @@ public:
382 } dns;
383
384 struct {
385- int times_used;
386+ int times_used = 0;
387 ByteCounter kbytes_sent;
388 ByteCounter kbytes_recv;
389 ByteCounter memory;
390- int msgs_sent;
391- int msgs_recv;
392+ int msgs_sent = 0;
393+ int msgs_recv = 0;
394 #if USE_CACHE_DIGESTS
395-
396 CacheDigestGuessStats guess;
397 #endif
398-
399 StatHist on_xition_count;
400 } cd;
401
402 struct {
403- int times_used;
404+ int times_used = 0;
405 } netdb;
406- int page_faults;
407- unsigned long int select_loops;
408- int select_fds;
409- double select_time;
410- double cputime;
411+ int page_faults = 0;
412+ unsigned long int select_loops = 0;
413+ int select_fds = 0;
414+ double select_time = 0.0;
415+ double cputime = 0.0;
416
417 struct timeval timestamp;
418 StatHist comm_udp_incoming;
419@@ -128,36 +128,34 @@ public:
420
421 struct {
422 struct {
423- int opens;
424- int closes;
425- int reads;
426- int writes;
427- int seeks;
428- int unlinks;
429+ int opens = 0;
430+ int closes = 0;
431+ int reads = 0;
432+ int writes = 0;
433+ int seeks = 0;
434+ int unlinks = 0;
435 } disk;
436
437 struct {
438- int accepts;
439- int sockets;
440- int connects;
441- int binds;
442- int closes;
443- int reads;
444- int writes;
445- int recvfroms;
446- int sendtos;
447+ int accepts = 0;
448+ int sockets = 0;
449+ int connects = 0;
450+ int binds = 0;
451+ int closes = 0;
452+ int reads = 0;
453+ int writes = 0;
454+ int recvfroms = 0;
455+ int sendtos = 0;
456 } sock;
457- int selects;
458+ int selects = 0;
459 } syscalls;
460- int aborted_requests;
461+ int aborted_requests = 0;
462
463 struct {
464- int files_cleaned;
465- int outs;
466- int ins;
467+ int files_cleaned = 0;
468+ int outs = 0;
469+ int ins = 0;
470 } swap;
471-
472-private:
473 };
474
475 extern StatCounters statCounter;
476diff --git a/src/StatHist.h b/src/StatHist.h
477index ef371b53..63bed853 100644
478--- a/src/StatHist.h
479+++ b/src/StatHist.h
480@@ -34,21 +34,17 @@ public:
481 * \todo specialize the class in a small hierarchy so that all
482 * relevant initializations are done at build-time
483 */
484- StatHist();
485- StatHist(const StatHist&); //not needed
486- ~StatHist() { clear(); };
487+ StatHist() = default;
488+ StatHist(const StatHist &);
489+ ~StatHist() {
490+ xfree(bins); // can handle case of bins being nullptr
491+ capacity_ = 0; // mark as destructed, may be needed for troubleshooting
492+ }
493
494 typedef uint64_t bins_type;
495
496 StatHist &operator=(const StatHist &);
497
498- /** clear the contents of the histograms
499- *
500- * \todo remove: this function has been replaced in its purpose
501- * by the destructor
502- */
503- void clear();
504-
505 /** Calculate the percentile for value pctile for the difference between
506 * this and the supplied histogram.
507 */
508@@ -102,19 +98,19 @@ protected:
509 unsigned int findBin(double v);
510
511 /// the histogram counters
512- bins_type *bins;
513- unsigned int capacity_;
514+ bins_type *bins = nullptr;
515+ unsigned int capacity_ = 0;
516
517 /// minimum value to be stored, corresponding to the first bin
518- double min_;
519+ double min_ = 0.0;
520
521 /// value of the maximum counter in the histogram
522- double max_;
523+ double max_ = 0.0;
524
525 /// scaling factor when looking for a bin
526- double scale_;
527- hbase_f *val_in; /* e.g., log() for log-based histogram */
528- hbase_f *val_out; /* e.g., exp() for log based histogram */
529+ double scale_ = 1.0;
530+ hbase_f *val_in = nullptr; /* e.g., log() for log-based histogram */
531+ hbase_f *val_out = nullptr; /* e.g., exp() for log based histogram */
532 };
533
534 double statHistDeltaMedian(const StatHist & A, const StatHist & B);
535@@ -137,24 +133,10 @@ StatHist::operator =(const StatHist & src)
536 scale_=src.scale_;
537 val_in=src.val_in;
538 val_out=src.val_out;
539- if (bins != NULL)
540+ if (bins)
541 memcpy(bins,src.bins,capacity_*sizeof(*bins));
542 return *this;
543 }
544
545-inline
546-StatHist::StatHist() :
547- bins(NULL), capacity_(0), min_(0), max_(0),
548- scale_(1.0), val_in(NULL), val_out(NULL)
549-{}
550-
551-inline void
552-StatHist::clear()
553-{
554- xfree(bins); // can handle case of bins being NULL
555- bins=NULL;
556- capacity_=0; // mark as destructed, may be needed for troubleshooting
557-}
558-
559 #endif /* STATHIST_H_ */
560
561diff --git a/src/acl/BoolOps.cc b/src/acl/BoolOps.cc
562index 294b0961..6a7e0d35 100644
563--- a/src/acl/BoolOps.cc
564+++ b/src/acl/BoolOps.cc
565@@ -17,9 +17,10 @@
566 Acl::NotNode::NotNode(ACL *acl)
567 {
568 assert(acl);
569+ Must(strlen(acl->name) <= sizeof(name)-2);
570 name[0] = '!';
571 name[1] = '\0';
572- strncat(&name[1], acl->name, sizeof(name)-1-1);
573+ xstrncpy(&name[1], acl->name, sizeof(name)-1); // -1 for '!'
574 add(acl);
575 }
576
577diff --git a/src/anyp/TrafficMode.h b/src/anyp/TrafficMode.h
578index c1bb4002..2e471c48 100644
579--- a/src/anyp/TrafficMode.h
580+++ b/src/anyp/TrafficMode.h
581@@ -21,17 +21,13 @@ namespace AnyP
582 class TrafficMode
583 {
584 public:
585- TrafficMode() : accelSurrogate(false), proxySurrogate(false), natIntercept(false), tproxyIntercept(false), tunnelSslBumping(false) {}
586- TrafficMode(const TrafficMode &rhs) { operator =(rhs); }
587- TrafficMode &operator =(const TrafficMode &rhs) { memcpy(this, &rhs, sizeof(TrafficMode)); return *this; }
588-
589 /** marks HTTP accelerator (reverse/surrogate proxy) traffic
590 *
591 * Indicating the following are required:
592 * - URL translation from relative to absolute form
593 * - restriction to origin peer relay recommended
594 */
595- bool accelSurrogate;
596+ bool accelSurrogate = false;
597
598 /** marks ports receiving PROXY protocol traffic
599 *
600@@ -41,7 +37,7 @@ public:
601 * - indirect client IP trust verification is mandatory
602 * - TLS is not supported
603 */
604- bool proxySurrogate;
605+ bool proxySurrogate = false;
606
607 /** marks NAT intercepted traffic
608 *
609@@ -52,7 +48,7 @@ public:
610 * - destination pinning is recommended
611 * - authentication prohibited
612 */
613- bool natIntercept;
614+ bool natIntercept = false;
615
616 /** marks TPROXY intercepted traffic
617 *
618@@ -64,7 +60,7 @@ public:
619 * - destination pinning is recommended
620 * - authentication prohibited
621 */
622- bool tproxyIntercept;
623+ bool tproxyIntercept = false;
624
625 /** marks intercept and decryption of CONNECT (tunnel) SSL traffic
626 *
627@@ -75,7 +71,7 @@ public:
628 * - encrypted outbound server connections
629 * - peer relay prohibited. TODO: re-encrypt and re-wrap with CONNECT
630 */
631- bool tunnelSslBumping;
632+ bool tunnelSslBumping = false;
633
634 /** true if the traffic is in any way intercepted
635 *
636diff --git a/src/cache_cf.cc b/src/cache_cf.cc
637index 006a42d3..7beb77f0 100644
638--- a/src/cache_cf.cc
639+++ b/src/cache_cf.cc
640@@ -2298,15 +2298,8 @@ parse_peer(CachePeer ** head)
641 p->connect_fail_limit = 10;
642
643 #if USE_CACHE_DIGESTS
644-
645- if (!p->options.no_digest) {
646- /* XXX This looks odd.. who has the original pointer
647- * then?
648- */
649- PeerDigest *pd = peerDigestCreate(p);
650- p->digest = cbdataReference(pd);
651- }
652-
653+ if (!p->options.no_digest)
654+ peerDigestCreate(p);
655 #endif
656
657 p->index = ++Config.npeers;
658diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc
659index b2f0ebd0..efe47194 100644
660--- a/src/client_side_reply.cc
661+++ b/src/client_side_reply.cc
662@@ -1444,13 +1444,8 @@ clientReplyContext::buildReplyHeader()
663 */
664 /* TODO: if maxage or s-maxage is present, don't do this */
665
666- if (squid_curtime - http->storeEntry()->timestamp >= 86400) {
667- char tbuf[512];
668- snprintf (tbuf, sizeof(tbuf), "%s %s %s",
669- "113", ThisCache,
670- "This cache hit is still fresh and more than 1 day old");
671- hdr->putStr(Http::HdrType::WARNING, tbuf);
672- }
673+ if (squid_curtime - http->storeEntry()->timestamp >= 86400)
674+ hdr->putWarning(113, "This cache hit is still fresh and more than 1 day old");
675 }
676 }
677
678diff --git a/src/clients/FtpGateway.cc b/src/clients/FtpGateway.cc
679index d0bfb801..bdd2854d 100644
680--- a/src/clients/FtpGateway.cc
681+++ b/src/clients/FtpGateway.cc
682@@ -10,6 +10,7 @@
683
684 #include "squid.h"
685 #include "acl/FilledChecklist.h"
686+#include "base/PackableStream.h"
687 #include "clients/forward.h"
688 #include "clients/FtpClient.h"
689 #include "comm.h"
690@@ -132,7 +133,7 @@ public:
691 void unhack();
692 void readStor();
693 void parseListing();
694- MemBuf *htmlifyListEntry(const char *line);
695+ bool htmlifyListEntry(const char *line, PackableStream &);
696 void completedListing(void);
697
698 /// create a data channel acceptor and start listening.
699@@ -764,53 +765,37 @@ found:
700 return p;
701 }
702
703-MemBuf *
704-Ftp::Gateway::htmlifyListEntry(const char *line)
705+bool
706+Ftp::Gateway::htmlifyListEntry(const char *line, PackableStream &html)
707 {
708- char icon[2048];
709- char href[2048 + 40];
710- char text[ 2048];
711- char size[ 2048];
712- char chdir[ 2048 + 40];
713- char view[ 2048 + 40];
714- char download[ 2048 + 40];
715- char link[ 2048 + 40];
716- MemBuf *html;
717- char prefix[2048];
718- ftpListParts *parts;
719- *icon = *href = *text = *size = *chdir = *view = *download = *link = '\0';
720-
721- debugs(9, 7, HERE << " line ={" << line << "}");
722+ debugs(9, 7, "line={" << line << "}");
723
724 if (strlen(line) > 1024) {
725- html = new MemBuf();
726- html->init();
727- html->appendf("<tr><td colspan=\"5\">%s</td></tr>\n", line);
728- return html;
729+ html << "<tr><td colspan=\"5\">" << line << "</td></tr>\n";
730+ return true;
731 }
732
733- if (flags.dir_slash && dirpath && typecode != 'D')
734- snprintf(prefix, 2048, "%s/", rfc1738_escape_part(dirpath));
735- else
736- prefix[0] = '\0';
737-
738- if ((parts = ftpListParseParts(line, flags)) == NULL) {
739- const char *p;
740+ SBuf prefix;
741+ if (flags.dir_slash && dirpath && typecode != 'D') {
742+ prefix.append(rfc1738_escape_part(dirpath));
743+ prefix.append("/", 1);
744+ }
745
746- html = new MemBuf();
747- html->init();
748- html->appendf("<tr class=\"entry\"><td colspan=\"5\">%s</td></tr>\n", line);
749+ ftpListParts *parts = ftpListParseParts(line, flags);
750+ if (!parts) {
751+ html << "<tr class=\"entry\"><td colspan=\"5\">" << line << "</td></tr>\n";
752
753+ const char *p;
754 for (p = line; *p && xisspace(*p); ++p);
755 if (*p && !xisspace(*p))
756 flags.listformat_unknown = 1;
757
758- return html;
759+ return true;
760 }
761
762 if (!strcmp(parts->name, ".") || !strcmp(parts->name, "..")) {
763 ftpListPartsFree(&parts);
764- return NULL;
765+ return false;
766 }
767
768 parts->size += 1023;
769@@ -818,87 +803,82 @@ Ftp::Gateway::htmlifyListEntry(const char *line)
770 parts->showname = xstrdup(parts->name);
771
772 /* {icon} {text} . . . {date}{size}{chdir}{view}{download}{link}\n */
773- xstrncpy(href, rfc1738_escape_part(parts->name), 2048);
774+ SBuf href(prefix);
775+ href.append(rfc1738_escape_part(parts->name));
776
777- xstrncpy(text, parts->showname, 2048);
778+ SBuf text(parts->showname);
779
780+ SBuf icon, size, chdir, link;
781 switch (parts->type) {
782
783 case 'd':
784- snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
785- mimeGetIconURL("internal-dir"),
786- "[DIR]");
787- strcat(href, "/"); /* margin is allocated above */
788+ icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
789+ mimeGetIconURL("internal-dir"),
790+ "[DIR]");
791+ href.append("/", 1); /* margin is allocated above */
792 break;
793
794 case 'l':
795- snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
796- mimeGetIconURL("internal-link"),
797- "[LINK]");
798+ icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
799+ mimeGetIconURL("internal-link"),
800+ "[LINK]");
801 /* sometimes there is an 'l' flag, but no "->" link */
802
803 if (parts->link) {
804- char *link2 = xstrdup(html_quote(rfc1738_escape(parts->link)));
805- snprintf(link, 2048, " -&gt; <a href=\"%s%s\">%s</a>",
806- *link2 != '/' ? prefix : "", link2,
807- html_quote(parts->link));
808- safe_free(link2);
809+ SBuf link2(html_quote(rfc1738_escape(parts->link)));
810+ link.appendf(" -&gt; <a href=\"%s" SQUIDSBUFPH "\">%s</a>",
811+ link2[0] != '/' ? prefix.c_str() : "", SQUIDSBUFPRINT(link2),
812+ html_quote(parts->link));
813 }
814
815 break;
816
817 case '\0':
818- snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
819- mimeGetIconURL(parts->name),
820- "[UNKNOWN]");
821- snprintf(chdir, 2048, "<a href=\"%s/;type=d\"><img border=\"0\" src=\"%s\" "
822- "alt=\"[DIR]\"></a>",
823- rfc1738_escape_part(parts->name),
824- mimeGetIconURL("internal-dir"));
825+ icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
826+ mimeGetIconURL(parts->name),
827+ "[UNKNOWN]");
828+ chdir.appendf("<a href=\"%s/;type=d\"><img border=\"0\" src=\"%s\" "
829+ "alt=\"[DIR]\"></a>",
830+ rfc1738_escape_part(parts->name),
831+ mimeGetIconURL("internal-dir"));
832 break;
833
834 case '-':
835
836 default:
837- snprintf(icon, 2048, "<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
838- mimeGetIconURL(parts->name),
839- "[FILE]");
840- snprintf(size, 2048, " %6" PRId64 "k", parts->size);
841+ icon.appendf("<img border=\"0\" src=\"%s\" alt=\"%-6s\">",
842+ mimeGetIconURL(parts->name),
843+ "[FILE]");
844+ size.appendf(" %6" PRId64 "k", parts->size);
845 break;
846 }
847
848+ SBuf view, download;
849 if (parts->type != 'd') {
850 if (mimeGetViewOption(parts->name)) {
851- snprintf(view, 2048, "<a href=\"%s%s;type=a\"><img border=\"0\" src=\"%s\" "
852- "alt=\"[VIEW]\"></a>",
853- prefix, href, mimeGetIconURL("internal-view"));
854+ view.appendf("<a href=\"" SQUIDSBUFPH ";type=a\"><img border=\"0\" src=\"%s\" "
855+ "alt=\"[VIEW]\"></a>",
856+ SQUIDSBUFPRINT(href), mimeGetIconURL("internal-view"));
857 }
858
859 if (mimeGetDownloadOption(parts->name)) {
860- snprintf(download, 2048, "<a href=\"%s%s;type=i\"><img border=\"0\" src=\"%s\" "
861- "alt=\"[DOWNLOAD]\"></a>",
862- prefix, href, mimeGetIconURL("internal-download"));
863+ download.appendf("<a href=\"" SQUIDSBUFPH ";type=i\"><img border=\"0\" src=\"%s\" "
864+ "alt=\"[DOWNLOAD]\"></a>",
865+ SQUIDSBUFPRINT(href), mimeGetIconURL("internal-download"));
866 }
867 }
868
869 /* construct the table row from parts. */
870- html = new MemBuf();
871- html->init();
872- html->appendf("<tr class=\"entry\">"
873- "<td class=\"icon\"><a href=\"%s%s\">%s</a></td>"
874- "<td class=\"filename\"><a href=\"%s%s\">%s</a></td>"
875- "<td class=\"date\">%s</td>"
876- "<td class=\"size\">%s</td>"
877- "<td class=\"actions\">%s%s%s%s</td>"
878- "</tr>\n",
879- prefix, href, icon,
880- prefix, href, html_quote(text),
881- parts->date,
882- size,
883- chdir, view, download, link);
884+ html << "<tr class=\"entry\">"
885+ "<td class=\"icon\"><a href=\"" << href << "\">" << icon << "</a></td>"
886+ "<td class=\"filename\"><a href=\"" << href << "\">" << html_quote(text.c_str()) << "</a></td>"
887+ "<td class=\"date\">" << parts->date << "</td>"
888+ "<td class=\"size\">" << size << "</td>"
889+ "<td class=\"actions\">" << chdir << view << download << link << "</td>"
890+ "</tr>\n";
891
892 ftpListPartsFree(&parts);
893- return html;
894+ return true;
895 }
896
897 void
898@@ -909,7 +889,6 @@ Ftp::Gateway::parseListing()
899 char *end;
900 char *line;
901 char *s;
902- MemBuf *t;
903 size_t linelen;
904 size_t usable;
905 size_t len = data.readBuf->contentSize();
906@@ -969,12 +948,14 @@ Ftp::Gateway::parseListing()
907 if (!strncmp(line, "total", 5))
908 continue;
909
910- t = htmlifyListEntry(line);
911+ MemBuf htmlPage;
912+ htmlPage.init();
913+ PackableStream html(htmlPage);
914
915- if ( t != NULL) {
916- debugs(9, 7, HERE << "listing append: t = {" << t->contentSize() << ", '" << t->content() << "'}");
917- listing.append(t->content(), t->contentSize());
918- delete t;
919+ if (htmlifyListEntry(line, html)) {
920+ html.flush();
921+ debugs(9, 7, "listing append: t = {" << htmlPage.contentSize() << ", '" << htmlPage.content() << "'}");
922+ listing.append(htmlPage.content(), htmlPage.contentSize());
923 }
924 }
925
926diff --git a/src/debug.cc b/src/debug.cc
927index 82ae6156..34bcf3fd 100644
928--- a/src/debug.cc
929+++ b/src/debug.cc
930@@ -572,23 +572,27 @@ debugLogTime(void)
931 time_t t = getCurrentTime();
932
933 struct tm *tm;
934- static char buf[128];
935+ static char buf[128]; // arbitrary size, big enough for the below timestamp strings.
936 static time_t last_t = 0;
937
938 if (Debug::Level() > 1) {
939- char buf2[128];
940+ // 4 bytes smaller than buf to ensure .NNN catenation by snprintf()
941+ // is safe and works even if strftime() fills its buffer.
942+ char buf2[sizeof(buf)-4];
943 tm = localtime(&t);
944- strftime(buf2, 127, "%Y/%m/%d %H:%M:%S", tm);
945- buf2[127] = '\0';
946- snprintf(buf, 127, "%s.%03d", buf2, (int) current_time.tv_usec / 1000);
947+ strftime(buf2, sizeof(buf2), "%Y/%m/%d %H:%M:%S", tm);
948+ buf2[sizeof(buf2)-1] = '\0';
949+ const int sz = snprintf(buf, sizeof(buf), "%s.%03d", buf2, static_cast<int>(current_time.tv_usec / 1000));
950+ assert(0 < sz && sz < static_cast<int>(sizeof(buf)));
951 last_t = t;
952 } else if (t != last_t) {
953 tm = localtime(&t);
954- strftime(buf, 127, "%Y/%m/%d %H:%M:%S", tm);
955+ const int sz = strftime(buf, sizeof(buf), "%Y/%m/%d %H:%M:%S", tm);
956+ assert(0 < sz && sz <= static_cast<int>(sizeof(buf)));
957 last_t = t;
958 }
959
960- buf[127] = '\0';
961+ buf[sizeof(buf)-1] = '\0';
962 return buf;
963 }
964
965diff --git a/src/dlink.h b/src/dlink.h
966index e242064d..c8e34fe7 100644
967--- a/src/dlink.h
968+++ b/src/dlink.h
969@@ -15,20 +15,16 @@ class dlink_node
970 {
971 MEMPROXY_CLASS(dlink_node);
972 public:
973- dlink_node() : data(nullptr), prev(nullptr), next(nullptr) {}
974-
975- void *data;
976- dlink_node *prev;
977- dlink_node *next;
978+ void *data = nullptr;
979+ dlink_node *prev = nullptr;
980+ dlink_node *next = nullptr;
981 };
982
983 class dlink_list
984 {
985 public:
986- dlink_list() : head(NULL), tail(NULL) {}
987-
988- dlink_node *head;
989- dlink_node *tail;
990+ dlink_node *head = nullptr;
991+ dlink_node *tail = nullptr;
992 };
993
994 extern dlink_list ClientActiveRequests;
995diff --git a/src/dns_internal.cc b/src/dns_internal.cc
996index 9ed20fdd..124c03c1 100644
997--- a/src/dns_internal.cc
998+++ b/src/dns_internal.cc
999@@ -96,8 +96,6 @@ static const char *Rcodes[] = {
1000 "Bad OPT Version or TSIG Signature Failure"
1001 };
1002
1003-typedef struct _ns ns;
1004-
1005 typedef struct _sp sp;
1006
1007 class idns_query
1008@@ -125,7 +123,6 @@ public:
1009 ancount(0),
1010 error(NULL)
1011 {
1012- memset(&hash, 0, sizeof(hash));
1013 memset(&query, 0, sizeof(query));
1014 *buf = 0;
1015 *name = 0;
1016@@ -185,29 +182,31 @@ class nsvc
1017 CBDATA_CLASS(nsvc);
1018
1019 public:
1020- explicit nsvc(int nsv) : ns(nsv), msglen(0), read_msglen(0), msg(new MemBuf()), queue(new MemBuf()), busy(true) {}
1021+ explicit nsvc(size_t nsv) : ns(nsv), msg(new MemBuf()), queue(new MemBuf()) {}
1022 ~nsvc();
1023
1024- int ns;
1025+ size_t ns = 0;
1026 Comm::ConnectionPointer conn;
1027- unsigned short msglen;
1028- int read_msglen;
1029- MemBuf *msg;
1030- MemBuf *queue;
1031- bool busy;
1032+ unsigned short msglen = 0;
1033+ int read_msglen = 0;
1034+ MemBuf *msg = nullptr;
1035+ MemBuf *queue = nullptr;
1036+ bool busy = true;
1037 };
1038
1039 CBDATA_CLASS_INIT(nsvc);
1040
1041-struct _ns {
1042+class ns
1043+{
1044+public:
1045 Ip::Address S;
1046- int nqueries;
1047- int nreplies;
1048+ int nqueries = 0;
1049+ int nreplies = 0;
1050 #if WHEN_EDNS_RESPONSES_ARE_PARSED
1051- int last_seen_edns;
1052+ int last_seen_edns = 0;
1053 #endif
1054- bool mDNSResolver;
1055- nsvc *vc;
1056+ bool mDNSResolver = false;
1057+ nsvc *vc = nullptr;
1058 };
1059
1060 namespace Dns
1061@@ -231,10 +230,8 @@ struct _sp {
1062 int queries;
1063 };
1064
1065-static ns *nameservers = NULL;
1066+static std::vector<ns> nameservers;
1067 static sp *searchpath = NULL;
1068-static int nns = 0;
1069-static int nns_alloc = 0;
1070 static int nns_mdns_count = 0;
1071 static int npc = 0;
1072 static int npc_alloc = 0;
1073@@ -275,7 +272,6 @@ static OBJH idnsStats;
1074 static void idnsAddNameserver(const char *buf);
1075 static void idnsAddMDNSNameservers();
1076 static void idnsAddPathComponent(const char *buf);
1077-static void idnsFreeNameservers(void);
1078 static void idnsFreeSearchpath(void);
1079 static bool idnsParseNameservers(void);
1080 static bool idnsParseResolvConf(void);
1081@@ -326,14 +322,14 @@ idnsAddMDNSNameservers()
1082 // mDNS resolver addresses are explicit multicast group IPs
1083 if (Ip::EnableIpv6) {
1084 idnsAddNameserver("FF02::FB");
1085- nameservers[nns-1].S.port(5353);
1086- nameservers[nns-1].mDNSResolver = true;
1087+ nameservers.back().S.port(5353);
1088+ nameservers.back().mDNSResolver = true;
1089 ++nns_mdns_count;
1090 }
1091
1092 idnsAddNameserver("224.0.0.251");
1093- nameservers[nns-1].S.port(5353);
1094- nameservers[nns-1].mDNSResolver = true;
1095+ nameservers.back().S.port(5353);
1096+ nameservers.back().mDNSResolver = true;
1097
1098 ++nns_mdns_count;
1099 }
1100@@ -359,33 +355,14 @@ idnsAddNameserver(const char *buf)
1101 return;
1102 }
1103
1104- if (nns == nns_alloc) {
1105- int oldalloc = nns_alloc;
1106- ns *oldptr = nameservers;
1107-
1108- if (nns_alloc == 0)
1109- nns_alloc = 2;
1110- else
1111- nns_alloc <<= 1;
1112-
1113- nameservers = (ns *)xcalloc(nns_alloc, sizeof(*nameservers));
1114-
1115- if (oldptr && oldalloc)
1116- memcpy(nameservers, oldptr, oldalloc * sizeof(*nameservers));
1117-
1118- if (oldptr)
1119- safe_free(oldptr);
1120- }
1121-
1122- assert(nns < nns_alloc);
1123+ nameservers.emplace_back(ns());
1124 A.port(NS_DEFAULTPORT);
1125- nameservers[nns].S = A;
1126+ nameservers.back().S = A;
1127 #if WHEN_EDNS_RESPONSES_ARE_PARSED
1128- nameservers[nns].last_seen_edns = RFC1035_DEFAULT_PACKET_SZ;
1129+ nameservers.back().last_seen_edns = RFC1035_DEFAULT_PACKET_SZ;
1130 // TODO generate a test packet to probe this NS from EDNS size and ability.
1131 #endif
1132- debugs(78, 3, "idnsAddNameserver: Added nameserver #" << nns << " (" << A << ")");
1133- ++nns;
1134+ debugs(78, 3, "Added nameserver #" << nameservers.size()-1 << " (" << A << ")");
1135 }
1136
1137 static void
1138@@ -417,13 +394,6 @@ idnsAddPathComponent(const char *buf)
1139 ++npc;
1140 }
1141
1142-static void
1143-idnsFreeNameservers(void)
1144-{
1145- safe_free(nameservers);
1146- nns = nns_alloc = 0;
1147-}
1148-
1149 static void
1150 idnsFreeSearchpath(void)
1151 {
1152@@ -778,12 +748,12 @@ idnsStats(StoreEntry * sentry)
1153 storeAppendPrintf(sentry, "IP ADDRESS # QUERIES # REPLIES Type\n");
1154 storeAppendPrintf(sentry, "---------------------------------------------- --------- --------- --------\n");
1155
1156- for (i = 0; i < nns; ++i) {
1157+ for (const auto &server : nameservers) {
1158 storeAppendPrintf(sentry, "%-45s %9d %9d %s\n", /* Let's take the maximum: (15 IPv4/45 IPv6) */
1159- nameservers[i].S.toStr(buf,MAX_IPSTRLEN),
1160- nameservers[i].nqueries,
1161- nameservers[i].nreplies,
1162- nameservers[i].mDNSResolver?"multicast":"recurse");
1163+ server.S.toStr(buf,MAX_IPSTRLEN),
1164+ server.nqueries,
1165+ server.nreplies,
1166+ server.mDNSResolver?"multicast":"recurse");
1167 }
1168
1169 storeAppendPrintf(sentry, "\nRcode Matrix:\n");
1170@@ -893,7 +863,7 @@ idnsInitVCConnected(const Comm::ConnectionPointer &conn, Comm::Flag status, int,
1171
1172 if (status != Comm::OK || !conn) {
1173 char buf[MAX_IPSTRLEN] = "";
1174- if (vc->ns < nns)
1175+ if (vc->ns < nameservers.size())
1176 nameservers[vc->ns].S.toStr(buf,MAX_IPSTRLEN);
1177 debugs(78, DBG_IMPORTANT, HERE << "Failed to connect to nameserver " << buf << " using TCP.");
1178 return;
1179@@ -920,15 +890,15 @@ nsvc::~nsvc()
1180 {
1181 delete queue;
1182 delete msg;
1183- if (ns < nns) // XXX: idnsShutdownAndFreeState may have freed nameservers[]
1184+ if (ns < nameservers.size()) // XXX: idnsShutdownAndFreeState may have freed nameservers[]
1185 nameservers[ns].vc = NULL;
1186 }
1187
1188 static void
1189-idnsInitVC(int nsv)
1190+idnsInitVC(size_t nsv)
1191 {
1192+ assert(nsv < nameservers.size());
1193 nsvc *vc = new nsvc(nsv);
1194- assert(nsv < nns);
1195 assert(vc->conn == NULL); // MUST be NULL from the construction process!
1196 nameservers[nsv].vc = vc;
1197
1198@@ -950,9 +920,9 @@ idnsInitVC(int nsv)
1199 }
1200
1201 static void
1202-idnsSendQueryVC(idns_query * q, int nsn)
1203+idnsSendQueryVC(idns_query * q, size_t nsn)
1204 {
1205- assert(nsn < nns);
1206+ assert(nsn < nameservers.size());
1207 if (nameservers[nsn].vc == NULL)
1208 idnsInitVC(nsn);
1209
1210@@ -991,7 +961,7 @@ idnsSendQuery(idns_query * q)
1211 return;
1212 }
1213
1214- if (nns <= 0) {
1215+ if (nameservers.empty()) {
1216 debugs(78, DBG_IMPORTANT, "WARNING: idnsSendQuery: Can't send query, no DNS nameservers known!");
1217 return;
1218 }
1219@@ -1001,14 +971,15 @@ idnsSendQuery(idns_query * q)
1220 assert(q->lru.prev == NULL);
1221
1222 int x = -1, y = -1;
1223- int nsn;
1224+ size_t nsn;
1225+ const auto nsCount = nameservers.size();
1226
1227 do {
1228 // only use mDNS resolvers for mDNS compatible queries
1229 if (!q->permit_mdns)
1230- nsn = nns_mdns_count + q->nsends % (nns-nns_mdns_count);
1231+ nsn = nns_mdns_count + q->nsends % (nsCount - nns_mdns_count);
1232 else
1233- nsn = q->nsends % nns;
1234+ nsn = q->nsends % nsCount;
1235
1236 if (q->need_vc) {
1237 idnsSendQueryVC(q, nsn);
1238@@ -1030,7 +1001,7 @@ idnsSendQuery(idns_query * q)
1239 if (x < 0 && nameservers[nsn].S.isIPv4())
1240 debugs(50, DBG_IMPORTANT, MYNAME << "FD " << DnsSocketA << ": sendto: " << xstrerr(xerrno));
1241
1242- } while ( (x<0 && y<0) && q->nsends % nns != 0);
1243+ } while ( (x<0 && y<0) && q->nsends % nsCount != 0);
1244
1245 if (y > 0) {
1246 fd_bytes(DnsSocketB, y, FD_WRITE);
1247@@ -1049,9 +1020,7 @@ idnsSendQuery(idns_query * q)
1248 static int
1249 idnsFromKnownNameserver(Ip::Address const &from)
1250 {
1251- int i;
1252-
1253- for (i = 0; i < nns; ++i) {
1254+ for (int i = 0; static_cast<size_t>(i) < nameservers.size(); ++i) {
1255 if (nameservers[i].S != from)
1256 continue;
1257
1258@@ -1232,8 +1201,8 @@ idnsGrokReply(const char *buf, size_t sz, int /*from_ns*/)
1259 // the altered NS was limiting the whole group.
1260 max_shared_edns = q->edns_seen;
1261 // may be limited by one of the others still
1262- for (int i = 0; i < nns; ++i)
1263- max_shared_edns = min(max_shared_edns, nameservers[i].last_seen_edns);
1264+ for (const auto &server : nameservers)
1265+ max_shared_edns = min(max_shared_edns, server.last_seen_edns);
1266 } else {
1267 nameservers[from_ns].last_seen_edns = q->edns_seen;
1268 // maybe reduce the global limit downwards to accomodate this NS
1269@@ -1435,10 +1404,11 @@ idnsCheckQueue(void *)
1270 idns_query *q;
1271 event_queued = 0;
1272
1273- if (0 == nns)
1274+ if (nameservers.empty())
1275 /* name servers went away; reconfiguring or shutting down */
1276 return;
1277
1278+ const auto nsCount = nameservers.size();
1279 for (n = lru_list.tail; n; n = p) {
1280
1281 p = n->prev;
1282@@ -1449,7 +1419,7 @@ idnsCheckQueue(void *)
1283 break;
1284
1285 /* Query timer still running? */
1286- if ((time_msec_t)tvSubMsec(q->sent_t, current_time) < (Config.Timeout.idns_retransmit * 1 << ((q->nsends - 1) / nns))) {
1287+ if ((time_msec_t)tvSubMsec(q->sent_t, current_time) < (Config.Timeout.idns_retransmit * 1 << ((q->nsends - 1) / nsCount))) {
1288 dlinkDelete(&q->lru, &lru_list);
1289 q->queue_t = current_time;
1290 dlinkAdd(q, &q->lru, &lru_list);
1291@@ -1504,7 +1474,7 @@ idnsReadVC(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Fla
1292 return;
1293 }
1294
1295- assert(vc->ns < nns);
1296+ assert(vc->ns < nameservers.size());
1297 debugs(78, 3, HERE << conn << ": received " << vc->msg->contentSize() << " bytes via TCP from " << nameservers[vc->ns].S << ".");
1298
1299 idnsGrokReply(vc->msg->buf, vc->msg->contentSize(), vc->ns);
1300@@ -1623,7 +1593,7 @@ Dns::Init(void)
1301 }
1302 }
1303
1304- assert(0 == nns);
1305+ assert(nameservers.empty());
1306 idnsAddMDNSNameservers();
1307 bool nsFound = idnsParseNameservers();
1308
1309@@ -1683,15 +1653,15 @@ idnsShutdownAndFreeState(const char *reason)
1310 DnsSocketB = -1;
1311 }
1312
1313- for (int i = 0; i < nns; ++i) {
1314- if (nsvc *vc = nameservers[i].vc) {
1315+ for (const auto &server : nameservers) {
1316+ if (const auto vc = server.vc) {
1317 if (Comm::IsConnOpen(vc->conn))
1318 vc->conn->close();
1319 }
1320 }
1321
1322 // XXX: vcs are not closed/freed yet and may try to access nameservers[]
1323- idnsFreeNameservers();
1324+ nameservers.clear();
1325 idnsFreeSearchpath();
1326 }
1327
1328@@ -1784,7 +1754,7 @@ idnsALookup(const char *name, IDNSCB * callback, void *data)
1329 q->query_id = idnsQueryID();
1330
1331 int nd = 0;
1332- for (unsigned int i = 0; i < nameLength; ++i)
1333+ for (size_t i = 0; i < nameLength; ++i)
1334 if (name[i] == '.')
1335 ++nd;
1336
1337@@ -1871,7 +1841,7 @@ idnsPTRLookup(const Ip::Address &addr, IDNSCB * callback, void *data)
1338 variable_list *
1339 snmp_netDnsFn(variable_list * Var, snint * ErrP)
1340 {
1341- int i, n = 0;
1342+ int n = 0;
1343 variable_list *Answer = NULL;
1344 MemBuf tmp;
1345 debugs(49, 5, "snmp_netDnsFn: Processing request: " << snmpDebugOid(Var->name, Var->name_length, tmp));
1346@@ -1881,8 +1851,8 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP)
1347
1348 case DNS_REQ:
1349
1350- for (i = 0; i < nns; ++i)
1351- n += nameservers[i].nqueries;
1352+ for (const auto &server : nameservers)
1353+ n += server.nqueries;
1354
1355 Answer = snmp_var_new_integer(Var->name, Var->name_length,
1356 n,
1357@@ -1891,8 +1861,8 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP)
1358 break;
1359
1360 case DNS_REP:
1361- for (i = 0; i < nns; ++i)
1362- n += nameservers[i].nreplies;
1363+ for (const auto &server : nameservers)
1364+ n += server.nreplies;
1365
1366 Answer = snmp_var_new_integer(Var->name, Var->name_length,
1367 n,
1368@@ -1902,7 +1872,7 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP)
1369
1370 case DNS_SERVERS:
1371 Answer = snmp_var_new_integer(Var->name, Var->name_length,
1372- nns,
1373+ nameservers.size(),
1374 SMI_COUNTER32);
1375
1376 break;
1377diff --git a/src/esi/Element.h b/src/esi/Element.h
1378index 60fb7348..9859f93a 100644
1379--- a/src/esi/Element.h
1380+++ b/src/esi/Element.h
1381@@ -13,6 +13,8 @@
1382 #include "Debug.h"
1383 #include "esi/Segment.h"
1384
1385+#include <vector>
1386+
1387 typedef enum {
1388 ESI_PROCESS_COMPLETE = 0,
1389 ESI_PROCESS_PENDING_WONTFAIL = 1,
1390@@ -83,5 +85,21 @@ public:
1391 virtual void finish() = 0;
1392 };
1393
1394+/// ESI protocol types and operators
1395+namespace Esi {
1396+
1397+/// an ordered set of ESI elements
1398+typedef std::vector<ESIElement::Pointer> Elements;
1399+
1400+} // namespace Esi
1401+
1402+/// Call finish() and set to nil the given element. Element may already be nil.
1403+/// When element is part of a set, use pos to indicate position/ID
1404+/// for debugging.
1405+extern void FinishAnElement(ESIElement::Pointer &, int pos = -1);
1406+
1407+// for all elements call finish() and set Pointer to nil
1408+extern void FinishAllElements(Esi::Elements &);
1409+
1410 #endif /* SQUID_ESIELEMENT_H */
1411
1412diff --git a/src/esi/ElementList.h b/src/esi/ElementList.h
1413deleted file mode 100644
1414index 278e7a64..00000000
1415--- a/src/esi/ElementList.h
1416+++ /dev/null
1417@@ -1,41 +0,0 @@
1418-/*
1419- * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
1420- *
1421- * Squid software is distributed under GPLv2+ license and includes
1422- * contributions from numerous individuals and organizations.
1423- * Please see the COPYING and CONTRIBUTORS files for details.
1424- */
1425-
1426-/* DEBUG: section 86 ESI processing */
1427-
1428-#ifndef SQUID_ELEMENTLIST_H
1429-#define SQUID_ELEMENTLIST_H
1430-
1431-#include "esi/Element.h"
1432-
1433-class ElementList
1434-{
1435-
1436-public:
1437- ElementList();
1438- ~ElementList();
1439-
1440- ESIElement::Pointer &operator[](int);
1441- ESIElement::Pointer const &operator[](int)const;
1442- ESIElement::Pointer * elements; /* unprocessed or rendered nodes */
1443- void pop_front (size_t const);
1444- void push_back(ESIElement::Pointer &);
1445- size_t size() const;
1446- void setNULL (int start, int end);
1447-
1448- int allocedcount;
1449- size_t allocedsize;
1450- int elementcount;
1451-
1452-private:
1453- ElementList(ElementList const &);
1454- ElementList &operator=(ElementList const&);
1455-};
1456-
1457-#endif /* SQUID_ELEMENTLIST_H */
1458-
1459diff --git a/src/esi/Esi.cc b/src/esi/Esi.cc
1460index 136b2528..36b51c2a 100644
1461--- a/src/esi/Esi.cc
1462+++ b/src/esi/Esi.cc
1463@@ -176,7 +176,7 @@ public:
1464 Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
1465 void NULLUnChosen();
1466
1467- ElementList elements;
1468+ Esi::Elements elements;
1469 int chosenelement;
1470 ESIElement::Pointer otherwise;
1471 void finish();
1472@@ -1884,6 +1884,7 @@ esiTry::finish()
1473 esiChoose::~esiChoose()
1474 {
1475 debugs(86, 5, "esiChoose::~esiChoose " << this);
1476+ FinishAllElements(elements); // finish if not already done
1477 }
1478
1479 esiChoose::esiChoose(esiTreeParentPtr aParent) :
1480@@ -1963,35 +1964,38 @@ esiChoose::selectElement()
1481 }
1482 }
1483
1484+// TODO: make ESIElement destructor call finish() instead so it is
1485+// a) only called when an element ref-count is 0, and
1486+// b) caller can elements.clear() instead of doing this
1487 void
1488-esiChoose::finish()
1489+FinishAnElement(ESIElement::Pointer &element, int pos)
1490 {
1491- elements.setNULL(0, elements.size());
1492-
1493- if (otherwise.getRaw())
1494- otherwise->finish();
1495-
1496- otherwise = NULL;
1497+ if (element)
1498+ element->finish();
1499
1500- parent = NULL;
1501+ debugs(86, 5, "setting index " << pos << ", pointer " << (void*)element.getRaw() << " to nil");
1502+ element = nullptr;
1503 }
1504
1505 void
1506-ElementList::setNULL (int start, int end)
1507+FinishAllElements(Esi::Elements &elements)
1508 {
1509- assert (start >= 0 && start <= elementcount);
1510- assert (end >= 0 && end <= elementcount);
1511+ int pos = 0;
1512+ for (auto &element : elements)
1513+ FinishAnElement(element, pos++);
1514+}
1515+
1516
1517- for (int loopPosition = start; loopPosition < end; ++loopPosition) {
1518- if (elements[loopPosition].getRaw())
1519- elements[loopPosition]->finish();
1520+void
1521+esiChoose::finish()
1522+{
1523+ FinishAllElements(elements);
1524
1525- debugs(86, 5, "esiSequence::NULLElements: Setting index " <<
1526- loopPosition << ", pointer " <<
1527- elements[loopPosition].getRaw() << " to NULL");
1528+ if (otherwise.getRaw())
1529+ otherwise->finish();
1530
1531- elements[loopPosition] = NULL;
1532- }
1533+ otherwise = nullptr;
1534+ parent = nullptr;
1535 }
1536
1537 void
1538@@ -2003,11 +2007,14 @@ esiChoose::NULLUnChosen()
1539
1540 otherwise = NULL;
1541
1542- elements.setNULL (0, chosenelement);
1543+ int pos = 0;
1544+ for (auto &element : elements) {
1545+ if (pos != chosenelement)
1546+ FinishAnElement(element, pos++);
1547+ }
1548
1549- elements.setNULL (chosenelement + 1, elements.size());
1550 } else if (otherwise.getRaw()) {
1551- elements.setNULL (0, elements.size());
1552+ FinishAllElements(elements);
1553 }
1554 }
1555
1556@@ -2059,7 +2066,7 @@ void
1557 esiChoose::fail(ESIElement * source, char const *anError)
1558 {
1559 checkValidSource (source);
1560- elements.setNULL (0, elements.size());
1561+ FinishAllElements(elements);
1562
1563 if (otherwise.getRaw())
1564 otherwise->finish();
1565@@ -2138,59 +2145,6 @@ esiChoose::makeUsable(esiTreeParentPtr newParent, ESIVarState &newVarState) cons
1566 return result;
1567 }
1568
1569-/* ElementList */
1570-ElementList::ElementList () : elements(NULL), allocedcount(0), allocedsize(0), elementcount (0)
1571-{}
1572-
1573-ElementList::~ElementList()
1574-{
1575- debugs(86, 5, "ElementList::~ElementList " << this);
1576- setNULL(0, elementcount);
1577-
1578- if (elements)
1579- memFreeBuf (allocedsize, elements);
1580-}
1581-
1582-ESIElement::Pointer &
1583-ElementList::operator [] (int index)
1584-{
1585- return elements[index];
1586-}
1587-
1588-ESIElement::Pointer const &
1589-ElementList::operator [] (int index) const
1590-{
1591- return elements[index];
1592-}
1593-
1594-void
1595-ElementList::pop_front (size_t const count)
1596-{
1597- if (!count)
1598- return;
1599-
1600- memmove(elements, &elements[count], (elementcount - count) * sizeof (ESIElement::Pointer));
1601-
1602- elementcount -= count;
1603-}
1604-
1605-void
1606-ElementList::push_back(ESIElement::Pointer &newElement)
1607-{
1608- elements = (ESIElement::Pointer *)memReallocBuf (elements, ++elementcount * sizeof (ESIElement::Pointer),
1609- &allocedsize);
1610- assert (elements);
1611- allocedcount = elementcount;
1612- memset(&elements[elementcount - 1], '\0', sizeof (ESIElement::Pointer));
1613- elements[elementcount - 1] = newElement;
1614-}
1615-
1616-size_t
1617-ElementList::size() const
1618-{
1619- return elementcount;
1620-}
1621-
1622 /* esiWhen */
1623 esiWhen::esiWhen(esiTreeParentPtr aParent, int attrcount, const char **attr,ESIVarState *aVar) :
1624 esiSequence(aParent),
1625diff --git a/src/esi/Makefile.am b/src/esi/Makefile.am
1626index 49c237f4..99d31761 100644
1627--- a/src/esi/Makefile.am
1628+++ b/src/esi/Makefile.am
1629@@ -32,7 +32,6 @@ libesi_la_SOURCES = \
1630 Context.h \
1631 $(ESI_PARSER_SOURCES) \
1632 Element.h \
1633- ElementList.h \
1634 Esi.cc \
1635 Esi.h \
1636 Except.h \
1637diff --git a/src/esi/Makefile.in b/src/esi/Makefile.in
1638index 75de069f..56628bf9 100644
1639--- a/src/esi/Makefile.in
1640+++ b/src/esi/Makefile.in
1641@@ -173,10 +173,10 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
1642 libesi_la_LIBADD =
1643 am__libesi_la_SOURCES_DIST = Assign.cc Assign.h Attempt.h Context.cc \
1644 Context.h ExpatParser.cc ExpatParser.h Libxml2Parser.cc \
1645- Libxml2Parser.h Element.h ElementList.h Esi.cc Esi.h Except.h \
1646- Expression.cc Expression.h Include.cc Include.h Literal.h \
1647- Module.cc Module.h Parser.cc Parser.h Segment.cc Segment.h \
1648- Sequence.cc Sequence.h Var.h VarState.cc VarState.h
1649+ Libxml2Parser.h Element.h Esi.cc Esi.h Except.h Expression.cc \
1650+ Expression.h Include.cc Include.h Literal.h Module.cc Module.h \
1651+ Parser.cc Parser.h Segment.cc Segment.h Sequence.cc Sequence.h \
1652+ Var.h VarState.cc VarState.h
1653 @ENABLE_LIBEXPAT_TRUE@am__objects_1 = ExpatParser.lo
1654 @ENABLE_LIBXML2_TRUE@am__objects_2 = Libxml2Parser.lo
1655 am__objects_3 = $(am__objects_1) $(am__objects_2)
1656@@ -744,7 +744,6 @@ libesi_la_SOURCES = \
1657 Context.h \
1658 $(ESI_PARSER_SOURCES) \
1659 Element.h \
1660- ElementList.h \
1661 Esi.cc \
1662 Esi.h \
1663 Except.h \
1664diff --git a/src/esi/Sequence.cc b/src/esi/Sequence.cc
1665index deb7295e..5e129197 100644
1666--- a/src/esi/Sequence.cc
1667+++ b/src/esi/Sequence.cc
1668@@ -27,6 +27,7 @@ class esiExcept;
1669 esiSequence::~esiSequence ()
1670 {
1671 debugs(86, 5, "esiSequence::~esiSequence " << this);
1672+ FinishAllElements(elements); // finish if not already done
1673 }
1674
1675 esiSequence::esiSequence(esiTreeParentPtr aParent, bool incrementalFlag) :
1676@@ -88,12 +89,13 @@ esiSequence::render(ESISegment::Pointer output)
1677
1678 for (size_t i = 0; i < processedcount; ++i) {
1679 elements[i]->render(output);
1680- elements.setNULL(i,i+1);
1681+ FinishAnElement(elements[i], i);
1682 /* FIXME: pass a ESISegment ** ? */
1683 output = output->tail();
1684 }
1685
1686- elements.pop_front (processedcount);
1687+ // prune completed elements
1688+ elements.erase(elements.begin(), elements.begin() + processedcount);
1689 processedcount = 0;
1690 assert (output->next == NULL);
1691 }
1692@@ -102,7 +104,7 @@ void
1693 esiSequence::finish()
1694 {
1695 debugs(86, 5, "esiSequence::finish: " << this << " is finished");
1696- elements.setNULL(0, elements.size());
1697+ FinishAllElements(elements);
1698 parent = NULL;
1699 }
1700
1701@@ -126,7 +128,7 @@ esiSequence::provideData (ESISegment::Pointer data, ESIElement *source)
1702 assert (index >= 0);
1703
1704 /* remove the current node */
1705- elements.setNULL(index, index+1);
1706+ FinishAnElement(elements[index], index);
1707
1708 /* create a literal */
1709 esiLiteral *temp = new esiLiteral (data);
1710@@ -267,7 +269,7 @@ esiSequence::process (int inheritedVarsFlag)
1711 return processingResult;
1712
1713 if (processingResult == ESI_PROCESS_FAILED) {
1714- elements.setNULL (0, elements.size());
1715+ FinishAllElements(elements);
1716 failed = true;
1717 parent = NULL;
1718 processing = false;
1719@@ -313,7 +315,7 @@ esiSequence::fail (ESIElement *source, char const *anError)
1720
1721 debugs(86, 5, "esiSequence::fail: " << this << " has failed.");
1722 parent->fail (this, anError);
1723- elements.setNULL(0, elements.size());
1724+ FinishAllElements(elements);
1725 parent = NULL;
1726 }
1727
1728diff --git a/src/esi/Sequence.h b/src/esi/Sequence.h
1729index 81120bed..10c1257a 100644
1730--- a/src/esi/Sequence.h
1731+++ b/src/esi/Sequence.h
1732@@ -12,7 +12,6 @@
1733 #define SQUID_ESISEQUENCE_H
1734
1735 #include "esi/Element.h"
1736-#include "esi/ElementList.h"
1737 #include "mem/forward.h"
1738
1739 /* esiSequence */
1740@@ -37,7 +36,7 @@ public:
1741 void makeUsableElements(esiSequence const &old, ESIVarState &);
1742 Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
1743
1744- ElementList elements; /* unprocessed or rendered nodes */
1745+ Esi::Elements elements; /* unprocessed or rendered nodes */
1746 size_t processedcount;
1747
1748 struct {
1749diff --git a/src/eui/Eui64.h b/src/eui/Eui64.h
1750index 7f59747b..1ce7c800 100644
1751--- a/src/eui/Eui64.h
1752+++ b/src/eui/Eui64.h
1753@@ -36,11 +36,9 @@ class Eui64
1754
1755 public:
1756 Eui64() { clear(); }
1757- Eui64(const Eui64 &t) { memcpy(this, &t, sizeof(Eui64)); }
1758- Eui64& operator= (const Eui64 &t) {memcpy(this, &t, sizeof(Eui64)); return *this;}
1759+
1760 bool operator== (const Eui64 &t) const { return (memcmp(eui,t.eui,SZ_EUI64_BUF) == 0); }
1761 bool operator< (const Eui64 &t) const { return (memcmp(eui,t.eui,SZ_EUI64_BUF) < 0); }
1762- ~Eui64() {}
1763
1764 const unsigned char *get(void);
1765
1766diff --git a/src/fqdncache.cc b/src/fqdncache.cc
1767index b750dbad..7b66dcda 100644
1768--- a/src/fqdncache.cc
1769+++ b/src/fqdncache.cc
1770@@ -708,8 +708,7 @@ fqdncache_init(void)
1771 debugs(35, 3, "Initializing FQDN Cache...");
1772
1773 memset(&FqdncacheStats, '\0', sizeof(FqdncacheStats));
1774-
1775- memset(&lru_list, '\0', sizeof(lru_list));
1776+ lru_list = dlink_list();
1777
1778 fqdncache_high = (long) (((float) Config.fqdncache.size *
1779 (float) FQDN_HIGH_WATER) / (float) 100);
1780diff --git a/src/fs/rock/RockRebuild.cc b/src/fs/rock/RockRebuild.cc
1781index 25fe4e71..4bb062ed 100644
1782--- a/src/fs/rock/RockRebuild.cc
1783+++ b/src/fs/rock/RockRebuild.cc
1784@@ -213,7 +213,6 @@ Rock::Rebuild::Rebuild(SwapDir *dir): AsyncJob("Rock::Rebuild"),
1785 validationPos(0)
1786 {
1787 assert(sd);
1788- memset(&counts, 0, sizeof(counts));
1789 dbSize = sd->diskOffsetLimit(); // we do not care about the trailer waste
1790 dbSlotSize = sd->slotSize;
1791 dbEntryLimit = sd->entryLimitActual();
1792diff --git a/src/fs/ufs/UFSSwapDir.cc b/src/fs/ufs/UFSSwapDir.cc
1793index 4d70377c..1b63d2f3 100644
1794--- a/src/fs/ufs/UFSSwapDir.cc
1795+++ b/src/fs/ufs/UFSSwapDir.cc
1796@@ -45,27 +45,23 @@ class UFSCleanLog : public SwapDir::CleanLog
1797 {
1798
1799 public:
1800- UFSCleanLog(SwapDir *);
1801- /** Get the next entry that is a candidate for clean log writing
1802- */
1803+ UFSCleanLog(SwapDir *aSwapDir) : sd(aSwapDir) {}
1804+
1805+ /// Get the next entry that is a candidate for clean log writing
1806 virtual const StoreEntry *nextEntry();
1807- /** "write" an entry to the clean log file.
1808- */
1809+
1810+ /// "write" an entry to the clean log file.
1811 virtual void write(StoreEntry const &);
1812- char *cur;
1813- char *newLog;
1814- char *cln;
1815- char *outbuf;
1816- off_t outbuf_offset;
1817- int fd;
1818- RemovalPolicyWalker *walker;
1819- SwapDir *sd;
1820-};
1821
1822-UFSCleanLog::UFSCleanLog(SwapDir *aSwapDir) :
1823- cur(NULL), newLog(NULL), cln(NULL), outbuf(NULL),
1824- outbuf_offset(0), fd(-1),walker(NULL), sd(aSwapDir)
1825-{}
1826+ SBuf cur;
1827+ SBuf newLog;
1828+ SBuf cln;
1829+ char *outbuf = nullptr;
1830+ off_t outbuf_offset = 0;
1831+ int fd = -1;
1832+ RemovalPolicyWalker *walker = nullptr;
1833+ SwapDir *sd = nullptr;
1834+};
1835
1836 const StoreEntry *
1837 UFSCleanLog::nextEntry()
1838@@ -106,7 +102,7 @@ UFSCleanLog::write(StoreEntry const &e)
1839 debugs(50, DBG_CRITICAL, MYNAME << "Current swap logfile not replaced.");
1840 file_close(fd);
1841 fd = -1;
1842- unlink(newLog);
1843+ unlink(newLog.c_str());
1844 sd->cleanLog = NULL;
1845 delete this;
1846 return;
1847@@ -686,39 +682,41 @@ Fs::Ufs::UFSSwapDir::createSwapSubDirs()
1848 }
1849 }
1850
1851-char *
1852+SBuf
1853 Fs::Ufs::UFSSwapDir::logFile(char const *ext) const
1854 {
1855- LOCAL_ARRAY(char, lpath, MAXPATHLEN);
1856- LOCAL_ARRAY(char, pathtmp, MAXPATHLEN);
1857- LOCAL_ARRAY(char, digit, 32);
1858- char *pathtmp2;
1859+ SBuf lpath;
1860
1861 if (Config.Log.swap) {
1862- xstrncpy(pathtmp, path, MAXPATHLEN - 64);
1863- pathtmp2 = pathtmp;
1864+ static char pathtmp[MAXPATHLEN];
1865+ char *pathtmp2 = xstrncpy(pathtmp, path, MAXPATHLEN - 64);
1866
1867- while ((pathtmp2 = strchr(pathtmp2, '/')) != NULL)
1868+ // replace all '/' with '.'
1869+ while ((pathtmp2 = strchr(pathtmp2, '/')))
1870 *pathtmp2 = '.';
1871
1872- while (strlen(pathtmp) && pathtmp[strlen(pathtmp) - 1] == '.')
1873- pathtmp[strlen(pathtmp) - 1] = '\0';
1874+ // remove any trailing '.' characters
1875+ int pos = strlen(pathtmp);
1876+ while (pos && pathtmp[pos-1] == '.')
1877+ pathtmp[--pos] = '\0';
1878
1879+ // remove any prefix '.' characters
1880 for (pathtmp2 = pathtmp; *pathtmp2 == '.'; ++pathtmp2);
1881- snprintf(lpath, MAXPATHLEN - 64, Config.Log.swap, pathtmp2);
1882-
1883- if (strncmp(lpath, Config.Log.swap, MAXPATHLEN - 64) == 0) {
1884- strcat(lpath, ".");
1885- snprintf(digit, 32, "%02d", index);
1886- strncat(lpath, digit, 3);
1887+ // replace a '%s' (if any) in the config string
1888+ // with the resulting pathtmp2 string
1889+ lpath.appendf(Config.Log.swap, pathtmp2);
1890+
1891+ // is pathtmp2 was NOT injected, append numeric file extension
1892+ if (lpath.cmp(Config.Log.swap) == 0) {
1893+ lpath.append(".", 1);
1894+ lpath.appendf("%02d", index);
1895 }
1896 } else {
1897- xstrncpy(lpath, path, MAXPATHLEN - 64);
1898- strcat(lpath, "/swap.state");
1899+ lpath.append(path);
1900+ lpath.append("/swap.state", 11);
1901 }
1902
1903- if (ext)
1904- strncat(lpath, ext, 16);
1905+ lpath.append(ext); // may be nil, that is okay.
1906
1907 return lpath;
1908 }
1909@@ -735,9 +733,8 @@ Fs::Ufs::UFSSwapDir::openLog()
1910 return;
1911 }
1912
1913- char *logPath;
1914- logPath = logFile();
1915- swaplog_fd = file_open(logPath, O_WRONLY | O_CREAT | O_BINARY);
1916+ SBuf logPath(logFile());
1917+ swaplog_fd = file_open(logPath.c_str(), O_WRONLY | O_CREAT | O_BINARY);
1918
1919 if (swaplog_fd < 0) {
1920 int xerrno = errno;
1921@@ -832,25 +829,23 @@ Fs::Ufs::UFSSwapDir::closeTmpSwapLog()
1922 assert(rebuilding_);
1923 rebuilding_ = false;
1924
1925- char *swaplog_path = xstrdup(logFile(NULL)); // where the swaplog should be
1926- char *tmp_path = xstrdup(logFile(".new")); // the temporary file we have generated
1927- int fd;
1928+ SBuf swaplog_path(logFile()); // where the swaplog should be
1929+ SBuf tmp_path(logFile(".new"));
1930+
1931 file_close(swaplog_fd);
1932
1933- if (xrename(tmp_path, swaplog_path) < 0) {
1934- fatalf("Failed to rename log file %s to %s", tmp_path, swaplog_path);
1935+ if (!FileRename(tmp_path, swaplog_path)) {
1936+ fatalf("Failed to rename log file " SQUIDSBUFPH " to " SQUIDSBUFPH, SQUIDSBUFPRINT(tmp_path), SQUIDSBUFPRINT(swaplog_path));
1937 }
1938
1939- fd = file_open(swaplog_path, O_WRONLY | O_CREAT | O_BINARY);
1940+ int fd = file_open(swaplog_path.c_str(), O_WRONLY | O_CREAT | O_BINARY);
1941
1942 if (fd < 0) {
1943 int xerrno = errno;
1944 debugs(50, DBG_IMPORTANT, "ERROR: " << swaplog_path << ": " << xstrerr(xerrno));
1945- fatalf("Failed to open swap log %s", swaplog_path);
1946+ fatalf("Failed to open swap log " SQUIDSBUFPH, SQUIDSBUFPRINT(swaplog_path));
1947 }
1948
1949- xfree(swaplog_path);
1950- xfree(tmp_path);
1951 swaplog_fd = fd;
1952 debugs(47, 3, "Cache Dir #" << index << " log opened on FD " << fd);
1953 }
1954@@ -860,21 +855,16 @@ Fs::Ufs::UFSSwapDir::openTmpSwapLog(int *clean_flag, int *zero_flag)
1955 {
1956 assert(!rebuilding_);
1957
1958- char *swaplog_path = xstrdup(logFile(NULL));
1959- char *clean_path = xstrdup(logFile(".last-clean"));
1960- char *new_path = xstrdup(logFile(".new"));
1961+ SBuf swaplog_path(logFile());
1962+ SBuf clean_path(logFile(".last-clean"));
1963+ SBuf new_path(logFile(".new"));
1964
1965 struct stat log_sb;
1966
1967 struct stat clean_sb;
1968- FILE *fp;
1969- int fd;
1970
1971- if (::stat(swaplog_path, &log_sb) < 0) {
1972+ if (::stat(swaplog_path.c_str(), &log_sb) < 0) {
1973 debugs(47, DBG_IMPORTANT, "Cache Dir #" << index << ": No log file");
1974- safe_free(swaplog_path);
1975- safe_free(clean_path);
1976- safe_free(new_path);
1977 return NULL;
1978 }
1979
1980@@ -885,12 +875,11 @@ Fs::Ufs::UFSSwapDir::openTmpSwapLog(int *clean_flag, int *zero_flag)
1981 file_close(swaplog_fd);
1982
1983 /* open a write-only FD for the new log */
1984- fd = file_open(new_path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
1985-
1986+ int fd = file_open(new_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
1987 if (fd < 0) {
1988 int xerrno = errno;
1989 debugs(50, DBG_IMPORTANT, "ERROR: while opening swap log" << new_path << ": " << xstrerr(xerrno));
1990- fatalf("Failed to open swap log %s", new_path);
1991+ fatalf("Failed to open swap log " SQUIDSBUFPH, SQUIDSBUFPRINT(new_path));
1992 }
1993
1994 swaplog_fd = fd;
1995@@ -909,30 +898,23 @@ Fs::Ufs::UFSSwapDir::openTmpSwapLog(int *clean_flag, int *zero_flag)
1996 }
1997
1998 /* open a read-only stream of the old log */
1999- fp = fopen(swaplog_path, "rb");
2000-
2001+ FILE *fp = fopen(swaplog_path.c_str(), "rb");
2002 if (!fp) {
2003 int xerrno = errno;
2004 debugs(50, DBG_CRITICAL, "ERROR: while opening " << swaplog_path << ": " << xstrerr(xerrno));
2005- fatalf("Failed to open swap log for reading %s", swaplog_path);
2006+ fatalf("Failed to open swap log for reading " SQUIDSBUFPH, SQUIDSBUFPRINT(swaplog_path));
2007 }
2008
2009 memset(&clean_sb, '\0', sizeof(struct stat));
2010
2011- if (::stat(clean_path, &clean_sb) < 0)
2012+ if (::stat(clean_path.c_str(), &clean_sb) < 0)
2013 *clean_flag = 0;
2014 else if (clean_sb.st_mtime < log_sb.st_mtime)
2015 *clean_flag = 0;
2016 else
2017 *clean_flag = 1;
2018
2019- safeunlink(clean_path, 1);
2020-
2021- safe_free(swaplog_path);
2022-
2023- safe_free(clean_path);
2024-
2025- safe_free(new_path);
2026+ safeunlink(clean_path.c_str(), 1);
2027
2028 return fp;
2029 }
2030@@ -953,17 +935,17 @@ Fs::Ufs::UFSSwapDir::writeCleanStart()
2031 #endif
2032
2033 cleanLog = NULL;
2034- state->newLog = xstrdup(logFile(".clean"));
2035- state->fd = file_open(state->newLog, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
2036+ state->cur = logFile();
2037+ state->newLog = logFile(".clean");
2038+ state->fd = file_open(state->newLog.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
2039
2040 if (state->fd < 0) {
2041- xfree(state->newLog);
2042 delete state;
2043 return -1;
2044 }
2045
2046- state->cur = xstrdup(logFile(NULL));
2047- state->cln = xstrdup(logFile(".last-clean"));
2048+ state->cln = state->cur;
2049+ state->cln.append(".last-clean");
2050 state->outbuf = (char *)xcalloc(CLEAN_BUF_SZ, 1);
2051 state->outbuf_offset = 0;
2052 /*copy the header */
2053@@ -973,11 +955,11 @@ Fs::Ufs::UFSSwapDir::writeCleanStart()
2054 state->outbuf_offset += header.record_size;
2055
2056 state->walker = repl->WalkInit(repl);
2057- ::unlink(state->cln);
2058+ ::unlink(state->cln.c_str());
2059 debugs(47, 3, HERE << "opened " << state->newLog << ", FD " << state->fd);
2060 #if HAVE_FCHMOD
2061
2062- if (::stat(state->cur, &sb) == 0)
2063+ if (::stat(state->cur.c_str(), &sb) == 0)
2064 fchmod(state->fd, sb.st_mode);
2065
2066 #endif
2067@@ -1006,7 +988,7 @@ Fs::Ufs::UFSSwapDir::writeCleanDone()
2068 debugs(50, DBG_CRITICAL, MYNAME << "Current swap logfile not replaced.");
2069 file_close(state->fd);
2070 state->fd = -1;
2071- ::unlink(state->newLog);
2072+ ::unlink(state->newLog.c_str());
2073 }
2074
2075 safe_free(state->outbuf);
2076@@ -1025,7 +1007,8 @@ Fs::Ufs::UFSSwapDir::writeCleanDone()
2077 state->fd = -1;
2078 #endif
2079
2080- xrename(state->newLog, state->cur);
2081+ FileRename(state->newLog, state->cur);
2082+ // TODO handle rename errors
2083 }
2084
2085 /* touch a timestamp file if we're not still validating */
2086@@ -1034,15 +1017,9 @@ Fs::Ufs::UFSSwapDir::writeCleanDone()
2087 else if (fd < 0)
2088 (void) 0;
2089 else
2090- file_close(file_open(state->cln, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY));
2091+ file_close(file_open(state->cln.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY));
2092
2093 /* close */
2094- safe_free(state->cur);
2095-
2096- safe_free(state->newLog);
2097-
2098- safe_free(state->cln);
2099-
2100 if (state->fd >= 0)
2101 file_close(state->fd);
2102
2103@@ -1330,10 +1307,6 @@ int
2104 Fs::Ufs::UFSSwapDir::DirClean(int swap_index)
2105 {
2106 DIR *dir_pointer = NULL;
2107-
2108- LOCAL_ARRAY(char, p1, MAXPATHLEN + 1);
2109- LOCAL_ARRAY(char, p2, MAXPATHLEN + 1);
2110-
2111 int files[20];
2112 int swapfileno;
2113 int fn; /* same as swapfileno, but with dirn bits set */
2114@@ -1350,21 +1323,22 @@ Fs::Ufs::UFSSwapDir::DirClean(int swap_index)
2115 D1 = (swap_index / N0) % N1;
2116 N2 = SD->l2;
2117 D2 = ((swap_index / N0) / N1) % N2;
2118- snprintf(p1, MAXPATHLEN, "%s/%02X/%02X",
2119- SD->path, D1, D2);
2120+
2121+ SBuf p1;
2122+ p1.appendf("%s/%02X/%02X", SD->path, D1, D2);
2123 debugs(36, 3, HERE << "Cleaning directory " << p1);
2124- dir_pointer = opendir(p1);
2125+ dir_pointer = opendir(p1.c_str());
2126
2127 if (!dir_pointer) {
2128 int xerrno = errno;
2129 if (xerrno == ENOENT) {
2130 debugs(36, DBG_CRITICAL, MYNAME << "WARNING: Creating " << p1);
2131- if (mkdir(p1, 0777) == 0)
2132+ if (mkdir(p1.c_str(), 0777) == 0)
2133 return 0;
2134 }
2135
2136 debugs(50, DBG_CRITICAL, MYNAME << p1 << ": " << xstrerr(xerrno));
2137- safeunlink(p1, 1);
2138+ safeunlink(p1.c_str(), 1);
2139 return 0;
2140 }
2141
2142@@ -1396,8 +1370,9 @@ Fs::Ufs::UFSSwapDir::DirClean(int swap_index)
2143
2144 for (n = 0; n < k; ++n) {
2145 debugs(36, 3, HERE << "Cleaning file "<< std::setfill('0') << std::hex << std::uppercase << std::setw(8) << files[n]);
2146- snprintf(p2, MAXPATHLEN + 1, "%s/%08X", p1, files[n]);
2147- safeunlink(p2, 0);
2148+ SBuf p2(p1);
2149+ p2.appendf("/%08X", files[n]);
2150+ safeunlink(p2.c_str(), 0);
2151 ++statCounter.swap.files_cleaned;
2152 }
2153
2154diff --git a/src/fs/ufs/UFSSwapDir.h b/src/fs/ufs/UFSSwapDir.h
2155index f129c447..164cf402 100644
2156--- a/src/fs/ufs/UFSSwapDir.h
2157+++ b/src/fs/ufs/UFSSwapDir.h
2158@@ -140,7 +140,7 @@ private:
2159 int createDirectory(const char *path, int);
2160 void createSwapSubDirs();
2161 void dumpEntry(StoreEntry &) const;
2162- char *logFile(char const *ext = NULL)const;
2163+ SBuf logFile(char const *ext = nullptr) const;
2164 void changeIO(DiskIOModule *);
2165 bool optionIOParse(char const *option, const char *value, int reconfiguring);
2166 void optionIODump(StoreEntry * e) const;
2167diff --git a/src/fs_io.cc b/src/fs_io.cc
2168index 96226c1f..899f2f2b 100644
2169--- a/src/fs_io.cc
2170+++ b/src/fs_io.cc
2171@@ -504,26 +504,27 @@ safeunlink(const char *s, int quiet)
2172 }
2173 }
2174
2175-/*
2176- * Same as rename(2) but complains if something goes wrong;
2177- * the caller is responsible for handing and explaining the
2178- * consequences of errors.
2179- */
2180-int
2181-xrename(const char *from, const char *to)
2182+bool
2183+FileRename(const SBuf &from, const SBuf &to)
2184 {
2185- debugs(21, 2, "xrename: renaming " << from << " to " << to);
2186+ debugs(21, 2, "renaming " << from << " to " << to);
2187+
2188+ // non-const copy for c_str()
2189+ SBuf from2(from);
2190+ // ensure c_str() lifetimes even if `to` and `from` share memory
2191+ SBuf to2(to.rawContent(), to.length());
2192+
2193 #if _SQUID_OS2_ || _SQUID_WINDOWS_
2194- remove(to);
2195+ remove(to2.c_str());
2196 #endif
2197
2198- if (0 == rename(from, to))
2199- return 0;
2200+ if (rename(from2.c_str(), to2.c_str()) == 0)
2201+ return true;
2202
2203 int xerrno = errno;
2204- debugs(21, errno == ENOENT ? 2 : 1, "xrename: Cannot rename " << from << " to " << to << ": " << xstrerr(xerrno));
2205+ debugs(21, (errno == ENOENT ? 2 : DBG_IMPORTANT), "Cannot rename " << from << " to " << to << ": " << xstrerr(xerrno));
2206
2207- return -1;
2208+ return false;
2209 }
2210
2211 int
2212diff --git a/src/fs_io.h b/src/fs_io.h
2213index bc051a6b..0abddb71 100644
2214--- a/src/fs_io.h
2215+++ b/src/fs_io.h
2216@@ -12,6 +12,7 @@
2217 #define SQUID_FS_IO_H_
2218
2219 #include "mem/forward.h"
2220+#include "sbuf/forward.h"
2221 #include "typedefs.h" //DRCB, DWCB
2222
2223 class MemBuf;
2224@@ -47,7 +48,16 @@ void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
2225 void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
2226 void file_read(int, char *, int, off_t, DRCB *, void *);
2227 void safeunlink(const char *path, int quiet);
2228-int xrename(const char *from, const char *to);
2229+
2230+/*
2231+ * Wrapper for rename(2) which complains if something goes wrong;
2232+ * the caller is responsible for handing and explaining the
2233+ * consequences of errors.
2234+ *
2235+ * \retval true successful rename
2236+ * \retval false an error occured
2237+ */
2238+bool FileRename(const SBuf &from, const SBuf &to);
2239
2240 int fsBlockSize(const char *path, int *blksize);
2241 int fsStats(const char *, int *, int *, int *, int *);
2242diff --git a/src/htcp.cc b/src/htcp.cc
2243index 3f16aec6..5358fae6 100644
2244--- a/src/htcp.cc
2245+++ b/src/htcp.cc
2246@@ -152,18 +152,18 @@ private:
2247 htcpDataHeader *dhdr = nullptr;
2248 };
2249
2250-class htcpDetail {
2251+class htcpDetail
2252+{
2253 MEMPROXY_CLASS(htcpDetail);
2254 public:
2255- htcpDetail() : resp_hdrs(nullptr), respHdrsSz(0), entity_hdrs(nullptr), entityHdrsSz(0), cache_hdrs(nullptr), cacheHdrsSz(0) {}
2256- char *resp_hdrs;
2257- size_t respHdrsSz;
2258+ char *resp_hdrs = nullptr;
2259+ size_t respHdrsSz = 0;
2260
2261- char *entity_hdrs;
2262- size_t entityHdrsSz;
2263+ char *entity_hdrs = nullptr;
2264+ size_t entityHdrsSz = 0;
2265
2266- char *cache_hdrs;
2267- size_t cacheHdrsSz;
2268+ char *cache_hdrs = nullptr;
2269+ size_t cacheHdrsSz = 0;
2270 };
2271
2272 class htcpStuff
2273@@ -173,18 +173,14 @@ public:
2274 op(o),
2275 rr(r),
2276 f1(f),
2277- response(0),
2278- reason(0),
2279 msg_id(id)
2280- {
2281- memset(&D, 0, sizeof(D));
2282- }
2283+ {}
2284
2285- int op;
2286- int rr;
2287- int f1;
2288- int response;
2289- int reason;
2290+ int op = 0;
2291+ int rr = 0;
2292+ int f1 = 0;
2293+ int response = 0;
2294+ int reason = 0;
2295 uint32_t msg_id;
2296 htcpSpecifier S;
2297 htcpDetail D;
2298@@ -1439,7 +1435,6 @@ htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p)
2299 return 0;
2300
2301 old_squid_format = p->options.htcp_oldsquid;
2302- memset(&flags, '\0', sizeof(flags));
2303 snprintf(vbuf, sizeof(vbuf), "%d/%d",
2304 req->http_ver.major, req->http_ver.minor);
2305
2306@@ -1489,7 +1484,6 @@ htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestM
2307 return;
2308
2309 old_squid_format = p->options.htcp_oldsquid;
2310- memset(&flags, '\0', sizeof(flags));
2311 snprintf(vbuf, sizeof(vbuf), "%d/%d",
2312 req->http_ver.major, req->http_ver.minor);
2313
2314diff --git a/src/icmp/Icmp.h b/src/icmp/Icmp.h
2315index 4ef77de0..cb33f9c0 100644
2316--- a/src/icmp/Icmp.h
2317+++ b/src/icmp/Icmp.h
2318@@ -22,20 +22,23 @@
2319 #if USE_ICMP
2320
2321 /* This is a line-data format struct. DO NOT alter. */
2322-struct pingerEchoData {
2323+struct pingerEchoData
2324+{
2325+ pingerEchoData() { memset(&payload, 0, sizeof(payload)); }
2326 Ip::Address to;
2327- unsigned char opcode;
2328- int psize;
2329+ unsigned char opcode = '\0';
2330+ int psize = 0;
2331 char payload[PINGER_PAYLOAD_SZ];
2332 };
2333
2334 /* This is a line-data format struct. DO NOT alter. */
2335 struct pingerReplyData {
2336+ pingerReplyData() { memset(&payload, 0, sizeof(payload)); }
2337 Ip::Address from;
2338- unsigned char opcode;
2339- int rtt;
2340- int hops;
2341- int psize;
2342+ unsigned char opcode = '\0';
2343+ int rtt = 0;
2344+ int hops = 0;
2345+ int psize = 0;
2346 char payload[PINGER_PAYLOAD_SZ];
2347 };
2348
2349@@ -65,7 +68,7 @@ class Icmp
2350 {
2351 public:
2352 Icmp();
2353- virtual ~Icmp() {};
2354+ virtual ~Icmp() {}
2355
2356 /// Start pinger helper and initiate control channel
2357 virtual int Open() =0;
2358diff --git a/src/icmp/IcmpPinger.cc b/src/icmp/IcmpPinger.cc
2359index 0be1798f..1a0347db 100644
2360--- a/src/icmp/IcmpPinger.cc
2361+++ b/src/icmp/IcmpPinger.cc
2362@@ -166,7 +166,7 @@ IcmpPinger::Recv(void)
2363 int n;
2364 int guess_size;
2365
2366- memset(&pecho, '\0', sizeof(pecho));
2367+ pecho = pingerEchoData();
2368 n = recv(socket_from_squid, &pecho, sizeof(pecho), 0);
2369
2370 if (n < 0) {
2371diff --git a/src/icmp/IcmpSquid.cc b/src/icmp/IcmpSquid.cc
2372index ec31a733..a4544706 100644
2373--- a/src/icmp/IcmpSquid.cc
2374+++ b/src/icmp/IcmpSquid.cc
2375@@ -125,7 +125,6 @@ IcmpSquid::Recv()
2376 static Ip::Address F;
2377
2378 Comm::SetSelect(icmp_sock, COMM_SELECT_READ, icmpSquidRecv, NULL, 0);
2379- memset(&preply, '\0', sizeof(pingerReplyData));
2380 n = comm_udp_recv(icmp_sock,
2381 (char *) &preply,
2382 sizeof(pingerReplyData),
2383diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc
2384index 2ef593cf..3b7dd909 100644
2385--- a/src/icmp/net_db.cc
2386+++ b/src/icmp/net_db.cc
2387@@ -591,7 +591,7 @@ netdbReloadState(void)
2388 char *q;
2389 assert(s - buf < l);
2390 *s = '\0';
2391- memset(&N, '\0', sizeof(netdbEntry));
2392+ N = netdbEntry();
2393 q = strtok(t, w_space);
2394 t = s + 1;
2395
2396diff --git a/src/ident/Ident.cc b/src/ident/Ident.cc
2397index aa514ba2..fbfd5d95 100644
2398--- a/src/ident/Ident.cc
2399+++ b/src/ident/Ident.cc
2400@@ -239,11 +239,13 @@ Ident::Start(const Comm::ConnectionPointer &conn, IDCB * callback, void *data)
2401 IdentStateData *state;
2402 char key1[IDENT_KEY_SZ];
2403 char key2[IDENT_KEY_SZ];
2404- char key[IDENT_KEY_SZ];
2405+ char key[IDENT_KEY_SZ*2+2]; // key1 + ',' + key2 + terminator
2406
2407 conn->local.toUrl(key1, IDENT_KEY_SZ);
2408 conn->remote.toUrl(key2, IDENT_KEY_SZ);
2409- snprintf(key, IDENT_KEY_SZ, "%s,%s", key1, key2);
2410+ const auto res = snprintf(key, sizeof(key), "%s,%s", key1, key2);
2411+ assert(res > 0);
2412+ assert(static_cast<std::make_unsigned<decltype(res)>::type>(res) < sizeof(key));
2413
2414 if (!ident_hash) {
2415 Init();
2416diff --git a/src/ipc/StoreMap.cc b/src/ipc/StoreMap.cc
2417index 66400105..ba1d4dfe 100644
2418--- a/src/ipc/StoreMap.cc
2419+++ b/src/ipc/StoreMap.cc
2420@@ -756,8 +756,6 @@ Ipc::StoreMap::sliceAt(const SliceId sliceId) const
2421
2422 Ipc::StoreMapAnchor::StoreMapAnchor(): start(0), splicingPoint(-1)
2423 {
2424- memset(&key, 0, sizeof(key));
2425- memset(&basics, 0, sizeof(basics));
2426 // keep in sync with rewind()
2427 }
2428
2429@@ -815,7 +813,7 @@ Ipc::StoreMapAnchor::rewind()
2430 start = 0;
2431 splicingPoint = -1;
2432 memset(&key, 0, sizeof(key));
2433- memset(&basics, 0, sizeof(basics));
2434+ basics.clear();
2435 waitingToBeFreed = false;
2436 writerHalted = false;
2437 // but keep the lock
2438diff --git a/src/ipc/StoreMap.h b/src/ipc/StoreMap.h
2439index ce3e9b2c..5d44379b 100644
2440--- a/src/ipc/StoreMap.h
2441+++ b/src/ipc/StoreMap.h
2442@@ -82,17 +82,26 @@ public:
2443 // fields marked with [app] can be modified when appending-while-reading
2444 // fields marked with [update] can be modified when updating-while-reading
2445
2446- uint64_t key[2]; ///< StoreEntry key
2447+ uint64_t key[2] = {0, 0}; ///< StoreEntry key
2448
2449 // STORE_META_STD TLV field from StoreEntry
2450 struct Basics {
2451- time_t timestamp;
2452- time_t lastref;
2453- time_t expires;
2454- time_t lastmod;
2455+ void clear() {
2456+ timestamp = 0;
2457+ lastref = 0;
2458+ expires = 0;
2459+ lastmod = 0;
2460+ swap_file_sz.store(0);
2461+ refcount = 0;
2462+ flags = 0;
2463+ }
2464+ time_t timestamp = 0;
2465+ time_t lastref = 0;
2466+ time_t expires = 0;
2467+ time_t lastmod = 0;
2468 std::atomic<uint64_t> swap_file_sz; // [app]
2469- uint16_t refcount;
2470- uint16_t flags;
2471+ uint16_t refcount = 0;
2472+ uint16_t flags = 0;
2473 } basics;
2474
2475 /// where the chain of StoreEntry slices begins [app]
2476diff --git a/src/ipc/TypedMsgHdr.cc b/src/ipc/TypedMsgHdr.cc
2477index f89a8da9..68bc2eed 100644
2478--- a/src/ipc/TypedMsgHdr.cc
2479+++ b/src/ipc/TypedMsgHdr.cc
2480@@ -18,25 +18,42 @@
2481
2482 Ipc::TypedMsgHdr::TypedMsgHdr()
2483 {
2484- memset(this, 0, sizeof(*this));
2485+ clear();
2486 sync();
2487 }
2488
2489 Ipc::TypedMsgHdr::TypedMsgHdr(const TypedMsgHdr &tmh)
2490 {
2491- memcpy(this, &tmh, sizeof(*this));
2492- sync();
2493+ clear();
2494+ operator =(tmh);
2495 }
2496
2497 Ipc::TypedMsgHdr &Ipc::TypedMsgHdr::operator =(const TypedMsgHdr &tmh)
2498 {
2499 if (this != &tmh) { // skip assignment to self
2500- memcpy(this, &tmh, sizeof(*this));
2501+ memcpy(static_cast<msghdr*>(this), static_cast<const msghdr*>(&tmh), sizeof(msghdr));
2502+ // struct name is handled in sync()
2503+ // struct ios[] is handled in sync()
2504+ data = tmh.data;
2505+ ctrl = tmh.ctrl;
2506+ offset = tmh.offset;
2507 sync();
2508 }
2509 return *this;
2510 }
2511
2512+void
2513+Ipc::TypedMsgHdr::clear()
2514+{
2515+ // may be called from the constructor, with object fields uninitialized
2516+ memset(static_cast<msghdr*>(this), 0, sizeof(msghdr));
2517+ memset(&name, 0, sizeof(name));
2518+ memset(&ios, 0, sizeof(ios));
2519+ data = DataBuffer();
2520+ ctrl = CtrlBuffer();
2521+ offset = 0;
2522+}
2523+
2524 // update msghdr and ios pointers based on msghdr counters
2525 void Ipc::TypedMsgHdr::sync()
2526 {
2527@@ -223,7 +240,9 @@ Ipc::TypedMsgHdr::getFd() const
2528 void
2529 Ipc::TypedMsgHdr::prepForReading()
2530 {
2531- memset(this, 0, sizeof(*this));
2532+ clear();
2533+ // no sync() like other clear() calls because the
2534+ // alloc*() below "sync()" the parts they allocate.
2535 allocName();
2536 allocData();
2537 allocControl();
2538diff --git a/src/ipc/TypedMsgHdr.h b/src/ipc/TypedMsgHdr.h
2539index 995262e1..40df5f22 100644
2540--- a/src/ipc/TypedMsgHdr.h
2541+++ b/src/ipc/TypedMsgHdr.h
2542@@ -74,6 +74,7 @@ public:
2543 size_t size() const { return sizeof(*this); } ///< not true message size
2544
2545 private:
2546+ void clear();
2547 void sync();
2548 void allocData();
2549 void allocName();
2550@@ -89,18 +90,22 @@ private:
2551 struct iovec ios[1]; ///< same as .msg_iov[]
2552
2553 struct DataBuffer {
2554- int type_; ///< Message kind, uses MessageType values
2555- size_t size; ///< actual raw data size (for sanity checks)
2556+ DataBuffer() { memset(raw, 0, sizeof(raw)); }
2557+
2558+ int type_ = 0; ///< Message kind, uses MessageType values
2559+ size_t size = 0; ///< actual raw data size (for sanity checks)
2560 char raw[maxSize]; ///< buffer with type-specific data
2561 } data; ///< same as .msg_iov[0].iov_base
2562
2563 struct CtrlBuffer {
2564+ CtrlBuffer() { memset(raw, 0, sizeof(raw)); }
2565+
2566 /// control buffer space for one fd
2567 char raw[SQUID_CMSG_SPACE(sizeof(int))];
2568 } ctrl; ///< same as .msg_control
2569
2570 /// data offset for the next get/put*() to start with
2571- mutable unsigned int offset;
2572+ mutable unsigned int offset = 0;
2573 };
2574
2575 } // namespace Ipc
2576diff --git a/src/ipcache.cc b/src/ipcache.cc
2577index b82fba24..95afb5eb 100644
2578--- a/src/ipcache.cc
2579+++ b/src/ipcache.cc
2580@@ -575,8 +575,8 @@ ipcache_init(void)
2581 int n;
2582 debugs(14, DBG_IMPORTANT, "Initializing IP Cache...");
2583 memset(&IpcacheStats, '\0', sizeof(IpcacheStats));
2584- memset(&lru_list, '\0', sizeof(lru_list));
2585- memset(&static_addrs, '\0', sizeof(ipcache_addrs));
2586+ lru_list = dlink_list();
2587+ static_addrs = ipcache_addrs();
2588
2589 static_addrs.in_addrs = static_cast<Ip::Address *>(xcalloc(1, sizeof(Ip::Address)));
2590 static_addrs.in_addrs->setEmpty(); // properly setup the Ip::Address!
2591diff --git a/src/log/ModStdio.cc b/src/log/ModStdio.cc
2592index 32a0af70..5e613ca4 100644
2593--- a/src/log/ModStdio.cc
2594+++ b/src/log/ModStdio.cc
2595@@ -106,8 +106,6 @@ logfile_mod_stdio_rotate(Logfile * lf, const int16_t nRotate)
2596 struct stat sb;
2597 #endif
2598
2599- char from[MAXPATHLEN];
2600- char to[MAXPATHLEN];
2601 l_stdio_t *ll = (l_stdio_t *) lf->data;
2602 const char *realpath = lf->path+6; // skip 'stdio:' prefix.
2603 assert(realpath);
2604@@ -122,12 +120,17 @@ logfile_mod_stdio_rotate(Logfile * lf, const int16_t nRotate)
2605
2606 debugs(0, DBG_IMPORTANT, "Rotate log file " << lf->path);
2607
2608+ SBuf basePath(realpath);
2609+
2610 /* Rotate numbers 0 through N up one */
2611 for (int16_t i = nRotate; i > 1;) {
2612 --i;
2613- snprintf(from, MAXPATHLEN, "%s.%d", realpath, i - 1);
2614- snprintf(to, MAXPATHLEN, "%s.%d", realpath, i);
2615- xrename(from, to);
2616+ SBuf from(basePath);
2617+ from.appendf(".%d", i-1);
2618+ SBuf to(basePath);
2619+ to.appendf(".%d", i);
2620+ FileRename(from, to);
2621+ // TODO handle rename errors
2622 }
2623
2624 /* Rotate the current log to .0 */
2625@@ -136,8 +139,10 @@ logfile_mod_stdio_rotate(Logfile * lf, const int16_t nRotate)
2626 file_close(ll->fd); /* always close */
2627
2628 if (nRotate > 0) {
2629- snprintf(to, MAXPATHLEN, "%s.%d", realpath, 0);
2630- xrename(realpath, to);
2631+ SBuf to(basePath);
2632+ to.appendf(".0");
2633+ FileRename(basePath, to);
2634+ // TODO handle rename errors
2635 }
2636 /* Reopen the log. It may have been renamed "manually" */
2637 ll->fd = file_open(realpath, O_WRONLY | O_CREAT | O_TEXT);
2638diff --git a/src/neighbors.cc b/src/neighbors.cc
2639index b943a24d..ce8feeb3 100644
2640--- a/src/neighbors.cc
2641+++ b/src/neighbors.cc
2642@@ -1151,14 +1151,6 @@ neighborUp(const CachePeer * p)
2643 return 1;
2644 }
2645
2646-void
2647-peerNoteDigestGone(CachePeer * p)
2648-{
2649-#if USE_CACHE_DIGESTS
2650- cbdataReferenceDone(p->digest);
2651-#endif
2652-}
2653-
2654 /// \returns the effective connect timeout for this peer
2655 time_t
2656 peerConnectTimeout(const CachePeer *peer)
2657diff --git a/src/peer_digest.cc b/src/peer_digest.cc
2658index 29aee823..36a8705e 100644
2659--- a/src/peer_digest.cc
2660+++ b/src/peer_digest.cc
2661@@ -66,23 +66,20 @@ static const time_t GlobDigestReqMinGap = 1 * 60; /* seconds */
2662
2663 static time_t pd_last_req_time = 0; /* last call to Check */
2664
2665-/* initialize peer digest */
2666-static void
2667-peerDigestInit(PeerDigest * pd, CachePeer * p)
2668+PeerDigest::PeerDigest(CachePeer * p)
2669 {
2670- assert(pd && p);
2671+ assert(p);
2672
2673- memset(pd, 0, sizeof(*pd));
2674 /*
2675 * DPW 2007-04-12
2676 * Lock on to the peer here. The corresponding cbdataReferenceDone()
2677 * is in peerDigestDestroy().
2678 */
2679- pd->peer = cbdataReference(p);
2680+ peer = cbdataReference(p);
2681 /* if peer disappears, we will know it's name */
2682- pd->host = p->host;
2683+ host = p->host;
2684
2685- pd->times.initialized = squid_curtime;
2686+ times.initialized = squid_curtime;
2687 }
2688
2689 CBDATA_CLASS_INIT(PeerDigest);
2690@@ -129,17 +126,22 @@ DigestFetchState::~DigestFetchState()
2691 }
2692
2693 /* allocate new peer digest, call Init, and lock everything */
2694-PeerDigest *
2695+void
2696 peerDigestCreate(CachePeer * p)
2697 {
2698- PeerDigest *pd;
2699 assert(p);
2700
2701- pd = new PeerDigest;
2702- peerDigestInit(pd, p);
2703+ PeerDigest *pd = new PeerDigest(p);
2704+
2705+ // TODO: make CachePeer member a CbcPointer
2706+ p->digest = cbdataReference(pd);
2707
2708- /* XXX This does not look right, and the same thing again in the caller */
2709- return cbdataReference(pd);
2710+ // lock a reference to pd again to prevent the PeerDigest
2711+ // disappearing during peerDigestDestroy() when
2712+ // cbdataReferenceValidDone is called.
2713+ // TODO test if it can be moved into peerDigestDestroy() or
2714+ // if things can break earlier (eg CachePeer death).
2715+ (void)cbdataReference(pd);
2716 }
2717
2718 /* call Clean and free/unlock everything */
2719@@ -152,19 +154,24 @@ peerDigestDestroy(PeerDigest * pd)
2720
2721 /*
2722 * DPW 2007-04-12
2723- * We locked the peer in peerDigestInit(), this is
2724- * where we unlock it. If the peer is still valid,
2725- * tell it that the digest is gone.
2726+ * We locked the peer in PeerDigest constructor, this is
2727+ * where we unlock it.
2728 */
2729- if (cbdataReferenceValidDone(peerTmp, &p))
2730- peerNoteDigestGone((CachePeer *)p);
2731-
2732- delete pd->cd;
2733- pd->host.clean();
2734+ if (cbdataReferenceValidDone(peerTmp, &p)) {
2735+ // we locked the p->digest in peerDigestCreate()
2736+ // this is where we unlock that
2737+ cbdataReferenceDone(static_cast<CachePeer *>(p)->digest);
2738+ }
2739
2740 delete pd;
2741 }
2742
2743+PeerDigest::~PeerDigest()
2744+{
2745+ delete cd;
2746+ // req_result pointer is not owned by us
2747+}
2748+
2749 /* called by peer to indicate that somebody actually needs this digest */
2750 void
2751 peerDigestNeeded(PeerDigest * pd)
2752diff --git a/src/snmp/Pdu.cc b/src/snmp/Pdu.cc
2753index c77811a7..d71f121d 100644
2754--- a/src/snmp/Pdu.cc
2755+++ b/src/snmp/Pdu.cc
2756@@ -45,7 +45,8 @@ Snmp::Pdu::operator = (const Pdu& pdu)
2757 void
2758 Snmp::Pdu::init()
2759 {
2760- memset(this, 0, sizeof(*this));
2761+ memset(static_cast<snmp_pdu *>(this), 0, sizeof(snmp_pdu));
2762+ aggrCount = 0;
2763 errstat = SNMP_DEFAULT_ERRSTAT;
2764 errindex = SNMP_DEFAULT_ERRINDEX;
2765 }
2766diff --git a/src/snmp/Pdu.h b/src/snmp/Pdu.h
2767index 24378462..a38ee8c7 100644
2768--- a/src/snmp/Pdu.h
2769+++ b/src/snmp/Pdu.h
2770@@ -43,7 +43,7 @@ public:
2771 private:
2772 void init(); ///< initialize members
2773 void assign(const Pdu& pdu); ///< perform full assignment
2774- unsigned int aggrCount; ///< The number of other Pdus merged into
2775+ unsigned int aggrCount = 0; ///< The number of other Pdus merged into
2776 };
2777
2778 } // namespace Snmp
2779diff --git a/src/snmp/Session.cc b/src/snmp/Session.cc
2780index 23438ec9..2690989b 100644
2781--- a/src/snmp/Session.cc
2782+++ b/src/snmp/Session.cc
2783@@ -14,59 +14,44 @@
2784 #include "snmp/Session.h"
2785 #include "tools.h"
2786
2787-Snmp::Session::Session()
2788-{
2789- clear();
2790-}
2791
2792-Snmp::Session::Session(const Session& session)
2793+Snmp::Session::Session()
2794 {
2795- assign(session);
2796+ memset(static_cast<snmp_session *>(this), 0, sizeof(snmp_session));
2797 }
2798
2799-Snmp::Session::~Session()
2800+Snmp::Session::Session(const Snmp::Session& session) : Session()
2801 {
2802- free();
2803+ operator =(session);
2804 }
2805
2806 Snmp::Session&
2807 Snmp::Session::operator = (const Session& session)
2808 {
2809- free();
2810- assign(session);
2811- return *this;
2812-}
2813+ if (&session == this)
2814+ return *this;
2815
2816-void
2817-Snmp::Session::clear()
2818-{
2819- memset(this, 0, sizeof(*this));
2820+ reset();
2821+ memcpy(static_cast<snmp_session *>(this), &session, sizeof(snmp_session));
2822+ // memcpy did a shallow copy, make sure we have our own allocations
2823+ if (session.community) {
2824+ community = (u_char*)xstrdup((char*)session.community);
2825+ }
2826+ if (session.peername) {
2827+ peername = xstrdup(session.peername);
2828+ }
2829+ return *this;
2830 }
2831
2832 void
2833-Snmp::Session::free()
2834+Snmp::Session::reset()
2835 {
2836 if (community_len > 0) {
2837 Must(community != NULL);
2838 xfree(community);
2839 }
2840- if (peername != NULL)
2841- xfree(peername);
2842- clear();
2843-}
2844-
2845-void
2846-Snmp::Session::assign(const Session& session)
2847-{
2848- memcpy(this, &session, sizeof(*this));
2849- if (session.community != NULL) {
2850- community = (u_char*)xstrdup((char*)session.community);
2851- Must(community != NULL);
2852- }
2853- if (session.peername != NULL) {
2854- peername = xstrdup(session.peername);
2855- Must(peername != NULL);
2856- }
2857+ xfree(peername);
2858+ memset(static_cast<snmp_session *>(this), 0, sizeof(snmp_session));
2859 }
2860
2861 void
2862@@ -91,7 +76,7 @@ Snmp::Session::pack(Ipc::TypedMsgHdr& msg) const
2863 void
2864 Snmp::Session::unpack(const Ipc::TypedMsgHdr& msg)
2865 {
2866- free();
2867+ reset();
2868 msg.getPod(Version);
2869 community_len = msg.getInt();
2870 if (community_len > 0) {
2871diff --git a/src/snmp/Session.h b/src/snmp/Session.h
2872index 647934aa..9a42234f 100644
2873--- a/src/snmp/Session.h
2874+++ b/src/snmp/Session.h
2875@@ -25,15 +25,13 @@ public:
2876 Session();
2877 Session(const Session& session);
2878 Session& operator = (const Session& session);
2879- ~Session();
2880+ ~Session() { reset(); }
2881
2882 void pack(Ipc::TypedMsgHdr& msg) const; ///< prepare for sendmsg()
2883 void unpack(const Ipc::TypedMsgHdr& msg); ///< restore struct from the message
2884- void clear(); ///< clear internal members
2885
2886 private:
2887- void free(); ///< free internal members
2888- void assign(const Session& session); ///< perform full assignment
2889+ void reset(); ///< free internal members
2890 };
2891
2892 } // namespace Snmp
2893diff --git a/src/snmp/Var.cc b/src/snmp/Var.cc
2894index 509bbfcb..b5e82b17 100644
2895--- a/src/snmp/Var.cc
2896+++ b/src/snmp/Var.cc
2897@@ -44,7 +44,7 @@ Snmp::Var::operator = (const Var& var)
2898 void
2899 Snmp::Var::init()
2900 {
2901- memset(this, 0, sizeof(*this));
2902+ memset(static_cast<variable_list *>(this), 0, sizeof(variable_list));
2903 }
2904
2905 Snmp::Var&
2906@@ -156,10 +156,8 @@ Snmp::Var::assign(const Var& var)
2907 void
2908 Snmp::Var::clearName()
2909 {
2910- if (name != NULL) {
2911- xfree(name);
2912- name = NULL;
2913- }
2914+ xfree(name);
2915+ name = nullptr;
2916 name_length = 0;
2917 }
2918
2919@@ -183,10 +181,8 @@ Snmp::Var::setName(const Range<const oid*>& aName)
2920 void
2921 Snmp::Var::clearValue()
2922 {
2923- if (val.string != NULL) {
2924- xfree(val.string);
2925- val.string = NULL;
2926- }
2927+ xfree(val.string);
2928+ val.string = nullptr;
2929 val_len = 0;
2930 type = 0;
2931 }
2932diff --git a/src/ssl/PeekingPeerConnector.cc b/src/ssl/PeekingPeerConnector.cc
2933index a79a2fff..e448c2dc 100644
2934--- a/src/ssl/PeekingPeerConnector.cc
2935+++ b/src/ssl/PeekingPeerConnector.cc
2936@@ -283,11 +283,11 @@ Ssl::PeekingPeerConnector::noteNegotiationError(const int result, const int ssl_
2937 //
2938 if (srvBio->bumpMode() == Ssl::bumpPeek && (resumingSession = srvBio->resumingSession())) {
2939 // we currently splice all resumed sessions unconditionally
2940- if (const bool spliceResumed = true) {
2941- bypassCertValidator();
2942- checkForPeekAndSpliceMatched(Ssl::bumpSplice);
2943- return;
2944- } // else fall through to find a matching ssl_bump action (with limited info)
2945+ // if (const bool spliceResumed = true) {
2946+ bypassCertValidator();
2947+ checkForPeekAndSpliceMatched(Ssl::bumpSplice);
2948+ return;
2949+ // } // else fall through to find a matching ssl_bump action (with limited info)
2950 }
2951
2952 // If we are in peek-and-splice mode and still we did not write to
2953diff --git a/src/stat.cc b/src/stat.cc
2954index d4e91b5f..e8b71536 100644
2955--- a/src/stat.cc
2956+++ b/src/stat.cc
2957@@ -84,10 +84,6 @@ static void statAvgDump(StoreEntry *, int minutes, int hours);
2958 #if STAT_GRAPHS
2959 static void statGraphDump(StoreEntry *);
2960 #endif
2961-static void statCountersInit(StatCounters *);
2962-static void statCountersInitSpecial(StatCounters *);
2963-static void statCountersClean(StatCounters *);
2964-static void statCountersCopy(StatCounters * dest, const StatCounters * orig);
2965 static double statPctileSvc(double, int, int);
2966 static void statStoreEntry(MemBuf * mb, StoreEntry * e);
2967 static double statCPUUsage(int minutes);
2968@@ -1219,6 +1215,45 @@ statRegisterWithCacheManager(void)
2969 #endif
2970 }
2971
2972+/* add special cases here as they arrive */
2973+static void
2974+statCountersInitSpecial(StatCounters * C)
2975+{
2976+ /*
2977+ * HTTP svc_time hist is kept in milli-seconds; max of 3 hours.
2978+ */
2979+ C->client_http.allSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
2980+ C->client_http.missSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
2981+ C->client_http.nearMissSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
2982+ C->client_http.nearHitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
2983+ C->client_http.hitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
2984+ /*
2985+ * ICP svc_time hist is kept in micro-seconds; max of 1 minute.
2986+ */
2987+ C->icp.querySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
2988+ C->icp.replySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
2989+ /*
2990+ * DNS svc_time hist is kept in milli-seconds; max of 10 minutes.
2991+ */
2992+ C->dns.svcTime.logInit(300, 0.0, 60000.0 * 10.0);
2993+ /*
2994+ * Cache Digest Stuff
2995+ */
2996+ C->cd.on_xition_count.enumInit(CacheDigestHashFuncCount);
2997+ C->comm_udp_incoming.enumInit(INCOMING_UDP_MAX);
2998+ C->comm_dns_incoming.enumInit(INCOMING_DNS_MAX);
2999+ C->comm_tcp_incoming.enumInit(INCOMING_TCP_MAX);
3000+ C->select_fds_hist.enumInit(256); /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
3001+}
3002+
3003+static void
3004+statCountersInit(StatCounters * C)
3005+{
3006+ assert(C);
3007+ *C = StatCounters();
3008+ statCountersInitSpecial(C);
3009+}
3010+
3011 void
3012 statInit(void)
3013 {
3014@@ -1245,30 +1280,24 @@ statInit(void)
3015 static void
3016 statAvgTick(void *)
3017 {
3018- StatCounters *t = &CountHist[0];
3019- StatCounters *p = &CountHist[1];
3020- StatCounters *c = &statCounter;
3021-
3022 struct rusage rusage;
3023 eventAdd("statAvgTick", statAvgTick, NULL, (double) COUNT_INTERVAL, 1);
3024 squid_getrusage(&rusage);
3025- c->page_faults = rusage_pagefaults(&rusage);
3026- c->cputime = rusage_cputime(&rusage);
3027- c->timestamp = current_time;
3028- /* even if NCountHist is small, we already Init()ed the tail */
3029- statCountersClean(CountHist + N_COUNT_HIST - 1);
3030- memmove(p, t, (N_COUNT_HIST - 1) * sizeof(StatCounters));
3031- statCountersCopy(t, c);
3032+ statCounter.page_faults = rusage_pagefaults(&rusage);
3033+ statCounter.cputime = rusage_cputime(&rusage);
3034+ statCounter.timestamp = current_time;
3035+ // shift all elements right and prepend statCounter
3036+ for(int i = N_COUNT_HIST-1; i > 0; --i)
3037+ CountHist[i] = CountHist[i-1];
3038+ CountHist[0] = statCounter;
3039 ++NCountHist;
3040
3041 if ((NCountHist % COUNT_INTERVAL) == 0) {
3042 /* we have an hours worth of readings. store previous hour */
3043- StatCounters *t2 = &CountHourHist[0];
3044- StatCounters *p2 = &CountHourHist[1];
3045- StatCounters *c2 = &CountHist[N_COUNT_HIST - 1];
3046- statCountersClean(CountHourHist + N_COUNT_HOUR_HIST - 1);
3047- memmove(p2, t2, (N_COUNT_HOUR_HIST - 1) * sizeof(StatCounters));
3048- statCountersCopy(t2, c2);
3049+ // shift all elements right and prepend final CountHist element
3050+ for(int i = N_COUNT_HOUR_HIST-1; i > 0; --i)
3051+ CountHourHist[i] = CountHourHist[i-1];
3052+ CountHourHist[0] = CountHist[N_COUNT_HIST - 1];
3053 ++NCountHourHist;
3054 }
3055
3056@@ -1302,93 +1331,6 @@ statAvgTick(void *)
3057 }
3058 }
3059
3060-static void
3061-statCountersInit(StatCounters * C)
3062-{
3063- assert(C);
3064- memset(C, 0, sizeof(*C));
3065- C->timestamp = current_time;
3066- statCountersInitSpecial(C);
3067-}
3068-
3069-/* add special cases here as they arrive */
3070-static void
3071-statCountersInitSpecial(StatCounters * C)
3072-{
3073- /*
3074- * HTTP svc_time hist is kept in milli-seconds; max of 3 hours.
3075- */
3076- C->client_http.allSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3077- C->client_http.missSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3078- C->client_http.nearMissSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3079- C->client_http.nearHitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3080- C->client_http.hitSvcTime.logInit(300, 0.0, 3600000.0 * 3.0);
3081- /*
3082- * ICP svc_time hist is kept in micro-seconds; max of 1 minute.
3083- */
3084- C->icp.querySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
3085- C->icp.replySvcTime.logInit(300, 0.0, 1000000.0 * 60.0);
3086- /*
3087- * DNS svc_time hist is kept in milli-seconds; max of 10 minutes.
3088- */
3089- C->dns.svcTime.logInit(300, 0.0, 60000.0 * 10.0);
3090- /*
3091- * Cache Digest Stuff
3092- */
3093- C->cd.on_xition_count.enumInit(CacheDigestHashFuncCount);
3094- C->comm_udp_incoming.enumInit(INCOMING_UDP_MAX);
3095- C->comm_dns_incoming.enumInit(INCOMING_DNS_MAX);
3096- C->comm_tcp_incoming.enumInit(INCOMING_TCP_MAX);
3097- C->select_fds_hist.enumInit(256); /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
3098-}
3099-
3100-/* add special cases here as they arrive */
3101-static void
3102-statCountersClean(StatCounters * C)
3103-{
3104- assert(C);
3105- C->client_http.allSvcTime.clear();
3106- C->client_http.missSvcTime.clear();
3107- C->client_http.nearMissSvcTime.clear();
3108- C->client_http.nearHitSvcTime.clear();
3109- C->client_http.hitSvcTime.clear();
3110- C->icp.querySvcTime.clear();
3111- C->icp.replySvcTime.clear();
3112- C->dns.svcTime.clear();
3113- C->cd.on_xition_count.clear();
3114- C->comm_udp_incoming.clear();
3115- C->comm_dns_incoming.clear();
3116- C->comm_tcp_incoming.clear();
3117- C->select_fds_hist.clear();
3118-}
3119-
3120-/* add special cases here as they arrive */
3121-static void
3122-statCountersCopy(StatCounters * dest, const StatCounters * orig)
3123-{
3124- assert(dest && orig);
3125- /* this should take care of all the fields, but "special" ones */
3126- memcpy(dest, orig, sizeof(*dest));
3127- /* prepare space where to copy special entries */
3128- statCountersInitSpecial(dest);
3129- /* now handle special cases */
3130- /* note: we assert that histogram capacities do not change */
3131- dest->client_http.allSvcTime=orig->client_http.allSvcTime;
3132- dest->client_http.missSvcTime=orig->client_http.missSvcTime;
3133- dest->client_http.nearMissSvcTime=orig->client_http.nearMissSvcTime;
3134- dest->client_http.nearHitSvcTime=orig->client_http.nearHitSvcTime;
3135-
3136- dest->client_http.hitSvcTime=orig->client_http.hitSvcTime;
3137- dest->icp.querySvcTime=orig->icp.querySvcTime;
3138- dest->icp.replySvcTime=orig->icp.replySvcTime;
3139- dest->dns.svcTime=orig->dns.svcTime;
3140- dest->cd.on_xition_count=orig->cd.on_xition_count;
3141- dest->comm_udp_incoming=orig->comm_udp_incoming;
3142- dest->comm_dns_incoming=orig->comm_dns_incoming;
3143- dest->comm_tcp_incoming=orig->comm_tcp_incoming;
3144- dest->select_fds_hist=orig->select_fds_hist;
3145-}
3146-
3147 static void
3148 statCountersHistograms(StoreEntry * sentry)
3149 {
3150@@ -1624,13 +1566,12 @@ DumpCountersStats(Mgr::CountersActionData& stats, StoreEntry* sentry)
3151 void
3152 statFreeMemory(void)
3153 {
3154- int i;
3155+ // TODO: replace with delete[]
3156+ for (int i = 0; i < N_COUNT_HIST; ++i)
3157+ CountHist[i] = StatCounters();
3158
3159- for (i = 0; i < N_COUNT_HIST; ++i)
3160- statCountersClean(&CountHist[i]);
3161-
3162- for (i = 0; i < N_COUNT_HOUR_HIST; ++i)
3163- statCountersClean(&CountHourHist[i]);
3164+ for (int i = 0; i < N_COUNT_HOUR_HIST; ++i)
3165+ CountHourHist[i] = StatCounters();
3166 }
3167
3168 static void
3169diff --git a/src/store/Disks.cc b/src/store/Disks.cc
3170index b543d844..dd97b3b4 100644
3171--- a/src/store/Disks.cc
3172+++ b/src/store/Disks.cc
3173@@ -680,16 +680,18 @@ storeDirWriteCleanLogs(int reopen)
3174 void
3175 allocate_new_swapdir(Store::DiskConfig *swap)
3176 {
3177- if (swap->swapDirs == NULL) {
3178+ if (!swap->swapDirs) {
3179 swap->n_allocated = 4;
3180- swap->swapDirs = static_cast<SwapDir::Pointer *>(xcalloc(swap->n_allocated, sizeof(SwapDir::Pointer)));
3181+ swap->swapDirs = new SwapDir::Pointer[swap->n_allocated];
3182 }
3183
3184 if (swap->n_allocated == swap->n_configured) {
3185 swap->n_allocated <<= 1;
3186- SwapDir::Pointer *const tmp = static_cast<SwapDir::Pointer *>(xcalloc(swap->n_allocated, sizeof(SwapDir::Pointer)));
3187- memcpy(tmp, swap->swapDirs, swap->n_configured * sizeof(SwapDir *));
3188- xfree(swap->swapDirs);
3189+ const auto tmp = new SwapDir::Pointer[swap->n_allocated];
3190+ for (int i = 0; i < swap->n_configured; ++i) {
3191+ tmp[i] = swap->swapDirs[i];
3192+ }
3193+ delete[] swap->swapDirs;
3194 swap->swapDirs = tmp;
3195 }
3196 }
3197@@ -697,23 +699,21 @@ allocate_new_swapdir(Store::DiskConfig *swap)
3198 void
3199 free_cachedir(Store::DiskConfig *swap)
3200 {
3201- int i;
3202 /* DON'T FREE THESE FOR RECONFIGURE */
3203
3204 if (reconfiguring)
3205 return;
3206
3207- for (i = 0; i < swap->n_configured; ++i) {
3208- /* TODO XXX this lets the swapdir free resources asynchronously
3209- * swap->swapDirs[i]->deactivate();
3210- * but there may be such a means already.
3211- * RBC 20041225
3212- */
3213- swap->swapDirs[i] = NULL;
3214- }
3215+ /* TODO XXX this lets the swapdir free resources asynchronously
3216+ * swap->swapDirs[i]->deactivate();
3217+ * but there may be such a means already.
3218+ * RBC 20041225
3219+ */
3220
3221- safe_free(swap->swapDirs);
3222- swap->swapDirs = NULL;
3223+ // only free's the array memory itself
3224+ // the SwapDir objects may remain (ref-counted)
3225+ delete[] swap->swapDirs;
3226+ swap->swapDirs = nullptr;
3227 swap->n_allocated = 0;
3228 swap->n_configured = 0;
3229 }
3230diff --git a/src/store_digest.cc b/src/store_digest.cc
3231index 4ed85215..3b5a31a9 100644
3232--- a/src/store_digest.cc
3233+++ b/src/store_digest.cc
3234@@ -43,25 +43,26 @@
3235
3236 class StoreDigestState
3237 {
3238-
3239 public:
3240 StoreDigestCBlock cblock;
3241- int rebuild_lock; /* bucket number */
3242- StoreEntry * rewrite_lock; /* points to store entry with the digest */
3243+ int rebuild_lock = 0; ///< bucket number
3244+ StoreEntry * rewrite_lock = nullptr; ///< points to store entry with the digest
3245 StoreSearchPointer theSearch;
3246- int rewrite_offset;
3247- int rebuild_count;
3248- int rewrite_count;
3249+ int rewrite_offset = 0;
3250+ int rebuild_count = 0;
3251+ int rewrite_count = 0;
3252 };
3253
3254-typedef struct {
3255- int del_count; /* #store entries deleted from store_digest */
3256- int del_lost_count; /* #store entries not found in store_digest on delete */
3257- int add_count; /* #store entries accepted to store_digest */
3258- int add_coll_count; /* #accepted entries that collided with existing ones */
3259- int rej_count; /* #store entries not accepted to store_digest */
3260- int rej_coll_count; /* #not accepted entries that collided with existing ones */
3261-} StoreDigestStats;
3262+class StoreDigestStats
3263+{
3264+public:
3265+ int del_count = 0; /* #store entries deleted from store_digest */
3266+ int del_lost_count = 0; /* #store entries not found in store_digest on delete */
3267+ int add_count = 0; /* #store entries accepted to store_digest */
3268+ int add_coll_count = 0; /* #accepted entries that collided with existing ones */
3269+ int rej_count = 0; /* #store entries not accepted to store_digest */
3270+ int rej_coll_count = 0; /* #not accepted entries that collided with existing ones */
3271+};
3272
3273 /* local vars */
3274 static StoreDigestState sd_state;
3275@@ -139,7 +140,7 @@ storeDigestInit(void)
3276 (int) Config.digest.rebuild_period << "/" <<
3277 (int) Config.digest.rewrite_period << " sec");
3278
3279- memset(&sd_state, 0, sizeof(sd_state));
3280+ sd_state = StoreDigestState();
3281 #else
3282 store_digest = NULL;
3283 debugs(71, 3, "Local cache digest is 'off'");
3284@@ -355,7 +356,7 @@ storeDigestRebuildResume(void)
3285 if (!storeDigestResize())
3286 store_digest->clear(); /* not clean()! */
3287
3288- memset(&sd_stats, 0, sizeof(sd_stats));
3289+ sd_stats = StoreDigestStats();
3290
3291 eventAdd("storeDigestRebuildStep", storeDigestRebuildStep, NULL, 0.0, 1);
3292 }
3293diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc
3294index d6d0bf94..f4ffadbc 100644
3295--- a/src/store_rebuild.cc
3296+++ b/src/store_rebuild.cc
3297@@ -172,7 +172,7 @@ storeRebuildComplete(StoreRebuildData *dc)
3298 void
3299 storeRebuildStart(void)
3300 {
3301- memset(&counts, '\0', sizeof(counts));
3302+ counts = StoreRebuildData(); // reset counters
3303 rebuild_start = current_time;
3304 /*
3305 * Note: store_dirs_rebuilding is initialized to 1.
3306diff --git a/src/store_rebuild.h b/src/store_rebuild.h
3307index de3056ed..483874f4 100644
3308--- a/src/store_rebuild.h
3309+++ b/src/store_rebuild.h
3310@@ -16,22 +16,16 @@
3311 class StoreRebuildData
3312 {
3313 public:
3314- StoreRebuildData() :
3315- objcount(0), expcount(0), scancount(0), clashcount(0),
3316- dupcount(0), cancelcount(0), invalid(0), badflags(0),
3317- bad_log_op(0), zero_object_sz(0)
3318- {}
3319-
3320- int objcount; /* # objects successfully reloaded */
3321- int expcount; /* # objects expired */
3322- int scancount; /* # entries scanned or read from state file */
3323- int clashcount; /* # swapfile clashes avoided */
3324- int dupcount; /* # duplicates purged */
3325- int cancelcount; /* # SWAP_LOG_DEL objects purged */
3326- int invalid; /* # bad lines */
3327- int badflags; /* # bad e->flags */
3328- int bad_log_op;
3329- int zero_object_sz;
3330+ int objcount = 0; /* # objects successfully reloaded */
3331+ int expcount = 0; /* # objects expired */
3332+ int scancount = 0; /* # entries scanned or read from state file */
3333+ int clashcount = 0; /* # swapfile clashes avoided */
3334+ int dupcount = 0; /* # duplicates purged */
3335+ int cancelcount = 0; /* # SWAP_LOG_DEL objects purged */
3336+ int invalid = 0; /* # bad lines */
3337+ int badflags = 0; /* # bad e->flags */
3338+ int bad_log_op = 0;
3339+ int zero_object_sz = 0;
3340 };
3341
3342 void storeRebuildStart(void);
3343diff --git a/src/tests/stub_MemObject.cc b/src/tests/stub_MemObject.cc
3344index f33c334c..d0d6de37 100644
3345--- a/src/tests/stub_MemObject.cc
3346+++ b/src/tests/stub_MemObject.cc
3347@@ -29,20 +29,9 @@ MemObject::endOffset() const
3348 void MemObject::trimSwappable() STUB
3349 void MemObject::trimUnSwappable() STUB
3350 int64_t MemObject::policyLowestOffsetToKeep(bool swap) const STUB_RETVAL(-1)
3351-MemObject::MemObject() :
3352- inmem_lo(0),
3353- nclients(0),
3354- request(NULL),
3355- ping_reply_callback(NULL),
3356- ircb_data(NULL),
3357- id(0),
3358- object_sz(-1),
3359- swap_hdr_sz(0),
3360- _reply(NULL)
3361-{
3362- memset(&clients, 0, sizeof(clients));
3363+MemObject::MemObject() {
3364+ ping_reply_callback = nullptr;
3365 memset(&start_ping, 0, sizeof(start_ping));
3366- memset(&abort, 0, sizeof(abort));
3367 } // NOP instead of elided due to Store
3368
3369 HttpReply const * MemObject::getReply() const
3370diff --git a/src/tests/stub_cache_manager.cc b/src/tests/stub_cache_manager.cc
3371index a544a05a..4dacfd32 100644
3372--- a/src/tests/stub_cache_manager.cc
3373+++ b/src/tests/stub_cache_manager.cc
3374@@ -20,7 +20,7 @@ void CacheManager::Start(const Comm::ConnectionPointer &conn, HttpRequest * requ
3375 std::cerr << HERE << "\n";
3376 STUB
3377 }
3378-CacheManager* CacheManager::instance=0;
3379+static CacheManager* instance = nullptr;
3380 CacheManager* CacheManager::GetInstance() STUB_RETVAL(instance)
3381 void Mgr::RegisterAction(char const*, char const*, OBJH, int, int) {}
3382 void Mgr::RegisterAction(char const *, char const *, Mgr::ClassActionCreationHandler *, int, int) {}
3383diff --git a/src/tools.cc b/src/tools.cc
3384index b7a0194b..954f58ce 100644
3385--- a/src/tools.cc
3386+++ b/src/tools.cc
3387@@ -319,7 +319,7 @@ death(int sig)
3388 #endif /* _SQUID_SOLARIS_and HAVE_LIBOPCOM_STACK */
3389 #if HAVE_BACKTRACE_SYMBOLS_FD
3390 {
3391- static void *(callarray[8192]);
3392+ static void *callarray[8192];
3393 int n;
3394 n = backtrace(callarray, 8192);
3395 backtrace_symbols_fd(callarray, n, fileno(debug_log));
3396diff --git a/src/tunnel.cc b/src/tunnel.cc
3397index 3197547a..4b4cf446 100644
3398--- a/src/tunnel.cc
3399+++ b/src/tunnel.cc
3400@@ -1158,7 +1158,6 @@ tunnelRelayConnectRequest(const Comm::ConnectionPointer &srv, void *data)
3401 HttpHeader hdr_out(hoRequest);
3402 Http::StateFlags flags;
3403 debugs(26, 3, HERE << srv << ", tunnelState=" << tunnelState);
3404- memset(&flags, '\0', sizeof(flags));
3405 flags.proxying = tunnelState->request->flags.proxying;
3406 MemBuf mb;
3407 mb.init();
diff --git a/debian/patches/series b/debian/patches/series
index 12952d3..b5b05d4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,14 @@
10001-Default-configuration-file-for-debian.patch10001-Default-configuration-file-for-debian.patch
20002-Change-default-file-locations-for-debian.patch20002-Change-default-file-locations-for-debian.patch
3<<<<<<< debian/patches/series
30011-upstream-pr172.patch40011-upstream-pr172.patch
490-cf.data.ubuntu.patch590-cf.data.ubuntu.patch
599-ubuntu-ssl-cert-snakeoil.patch699-ubuntu-ssl-cert-snakeoil.patch
60003-installed-binary-for-debian-ci.patch70003-installed-binary-for-debian-ci.patch
8=======
90003-installed-binary-for-debian-ci.patch
100004-upstream-pr264.patch
1190-cf.data.ubuntu.patch
1299-ubuntu-ssl-cert-snakeoil.patch
13>>>>>>> debian/patches/series
7fix-uninitialized-var.patch14fix-uninitialized-var.patch
diff --git a/debian/rules b/debian/rules
index 9b7b98c..ae8eaee 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,17 @@
22
3export DEB_BUILD_MAINT_OPTIONS = hardening=+all3export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4export DEB_CFLAGS_MAINT_APPEND = -Wall4export DEB_CFLAGS_MAINT_APPEND = -Wall
5<<<<<<< debian/rules
5export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed6export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
7=======
8
9DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
10ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc powerpcspe sh4))
11 DEB_LDFLAGS_MAINT_APPEND += -latomic
12endif
13export DEB_LDFLAGS_MAINT_APPEND
14
15>>>>>>> debian/rules
6# On ppc64el, dpkg-buildflags sets -O3 instead of the usual16# On ppc64el, dpkg-buildflags sets -O3 instead of the usual
7# -O2. This makes gcc emit a format-truncation error on17# -O2. This makes gcc emit a format-truncation error on
8# pconn.cc. See https://bugs.squid-cache.org/show_bug.cgi?id=487518# pconn.cc. See https://bugs.squid-cache.org/show_bug.cgi?id=4875
diff --git a/debian/tests/control b/debian/tests/control
index 46d4877..c6bad41 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -3,5 +3,5 @@ Depends: @builddeps@, fakeroot, squid
3Restrictions: allow-stderr3Restrictions: allow-stderr
44
5Tests: squid5Tests: squid
6Depends: squid, squidclient, elinks, netcat, pygopherd, apparmor-utils, vsftpd, apache26Depends: squid, squidclient, elinks, netcat, pygopherd, apparmor-utils, vsftpd, apache2, ssl-cert
7Restrictions: needs-root7Restrictions: needs-root
diff --git a/doc/release-notes/release-4.html b/doc/release-notes/release-4.html
index 3d44a11..77a8bbc 100644
--- a/doc/release-notes/release-4.html
+++ b/doc/release-notes/release-4.html
@@ -2,10 +2,10 @@
2<HTML>2<HTML>
3<HEAD>3<HEAD>
4 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.72">4 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.72">
5 <TITLE>Squid 4.1 release notes</TITLE>5 <TITLE>Squid 4.2 release notes</TITLE>
6</HEAD>6</HEAD>
7<BODY>7<BODY>
8<H1>Squid 4.1 release notes</H1>8<H1>Squid 4.2 release notes</H1>
99
10<H2>Squid Developers</H2>10<H2>Squid Developers</H2>
11<HR>11<HR>
@@ -63,7 +63,7 @@ for Applied Network Research and members of the Web Caching community.</EM>
63<HR>63<HR>
64<H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>64<H2><A NAME="s1">1.</A> <A HREF="#toc1">Notice</A></H2>
6565
66<P>The Squid Team are pleased to announce the release of Squid-4.1 for testing.</P>66<P>The Squid Team are pleased to announce the release of Squid-4.2 for testing.</P>
67<P>This new release is available for download from 67<P>This new release is available for download from
68<A HREF="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</A> or the68<A HREF="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</A> or the
69<A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>69<A HREF="http://www.squid-cache.org/Download/http-mirrors.html">mirrors</A>.</P>
diff --git a/errors/af/ERR_AGENT_CONFIGURE b/errors/af/ERR_AGENT_CONFIGURE
index e7a1eb6..d58a155 100644
--- a/errors/af/ERR_AGENT_CONFIGURE
+++ b/errors/af/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>Hoe om hierdie instellings in die blaaier te vind:</p>24<p>Hoe om hierdie instellings in die blaaier te vind:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Nutsgoed -&gt; Opsies -&gt; Gevorderd -&gt; Netwerk -&gt; Verbinding</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/af/ERR_AGENT_WPAD b/errors/af/ERR_AGENT_WPAD
index 644d392..e46e267 100644
--- a/errors/af/ERR_AGENT_WPAD
+++ b/errors/af/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>Hoe om hierdie instellings in die blaaier te vind:</p>24<p>Hoe om hierdie instellings in die blaaier te vind:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Nutsgoed -&gt; Opsies -&gt; Gevorderd -&gt; Netwerk -&gt; Verbinding</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Kies "Outospeur instaanopstelling vir hierdie netwerk"</li>28<li>Kies "Outospeur instaanopstelling vir hierdie netwerk"</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/ar/ERR_AGENT_CONFIGURE b/errors/ar/ERR_AGENT_CONFIGURE
index ccc25f1..8acb97c 100644
--- a/errors/ar/ERR_AGENT_CONFIGURE
+++ b/errors/ar/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/ar/ERR_AGENT_WPAD b/errors/ar/ERR_AGENT_WPAD
index 5970022..c456513 100644
--- a/errors/ar/ERR_AGENT_WPAD
+++ b/errors/ar/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/az/ERR_AGENT_CONFIGURE b/errors/az/ERR_AGENT_CONFIGURE
index 1615779..76b0066 100644
--- a/errors/az/ERR_AGENT_CONFIGURE
+++ b/errors/az/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/az/ERR_AGENT_WPAD b/errors/az/ERR_AGENT_WPAD
index abb3dcd..740ddb6 100644
--- a/errors/az/ERR_AGENT_WPAD
+++ b/errors/az/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/bg/ERR_AGENT_CONFIGURE b/errors/bg/ERR_AGENT_CONFIGURE
index eea67d5..c00d139 100644
--- a/errors/bg/ERR_AGENT_CONFIGURE
+++ b/errors/bg/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>Как да намерите тези настройки на Вашия браузер:</p>24<p>Как да намерите тези настройки на Вашия браузер:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Инструменти -&gt; Опции за интернет -&gt; Връзки -&gt; LAN настройки -&gt; Прокси сървър</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/bg/ERR_AGENT_WPAD b/errors/bg/ERR_AGENT_WPAD
index 1b36da7..aa85d8c 100644
--- a/errors/bg/ERR_AGENT_WPAD
+++ b/errors/bg/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>Как да намерите тези настройки на Вашия браузер:</p>24<p>Как да намерите тези настройки на Вашия браузер:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Инструменти -&gt; Опции за интернет -&gt; Връзки -&gt; LAN настройки -&gt; Прокси сървър</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Изберете Автоматично откриване на настройките.</li>34<li>Изберете Автоматично откриване на настройките.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Изберете Използване на Автоматично конфигуриране на прокси сървър.</li>40<li>Изберете Използване на Автоматично конфигуриране на прокси сървър.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/ca/ERR_AGENT_CONFIGURE b/errors/ca/ERR_AGENT_CONFIGURE
index a0809f1..0b7d722 100644
--- a/errors/ca/ERR_AGENT_CONFIGURE
+++ b/errors/ca/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/ca/ERR_AGENT_WPAD b/errors/ca/ERR_AGENT_WPAD
index 39121ce..23db622 100644
--- a/errors/ca/ERR_AGENT_WPAD
+++ b/errors/ca/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/cs/ERR_AGENT_CONFIGURE b/errors/cs/ERR_AGENT_CONFIGURE
index a0db5d0..32df978 100644
--- a/errors/cs/ERR_AGENT_CONFIGURE
+++ b/errors/cs/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/cs/ERR_AGENT_WPAD b/errors/cs/ERR_AGENT_WPAD
index fc10fba..639a156 100644
--- a/errors/cs/ERR_AGENT_WPAD
+++ b/errors/cs/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/da/ERR_AGENT_CONFIGURE b/errors/da/ERR_AGENT_CONFIGURE
index dadc146..7e47b9c 100644
--- a/errors/da/ERR_AGENT_CONFIGURE
+++ b/errors/da/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/da/ERR_AGENT_WPAD b/errors/da/ERR_AGENT_WPAD
index 495ba9c..d5ec9eb 100644
--- a/errors/da/ERR_AGENT_WPAD
+++ b/errors/da/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/de/ERR_AGENT_CONFIGURE b/errors/de/ERR_AGENT_CONFIGURE
index 43923fa..ffba266 100644
--- a/errors/de/ERR_AGENT_CONFIGURE
+++ b/errors/de/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>Wie sie diese Einstellung in ihrem Browser finden:</p>24<p>Wie sie diese Einstellung in ihrem Browser finden:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Extras -&gt; Optionen -&gt; Erweitert -&gt; Netzwerk -&gt; Verbindungseinstellungen</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>28<li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Extras -&gt; Internetoptionen -&gt; Verbindung -&gt; LAN Einstellungen -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>34<li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Extras -&gt; Einstellungen -&gt; Erweitert -&gt; Netzwerk -&gt; Proxyserver</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>40<li>Im HTTP Proxy Feld geben sie den Proxy Namen %h und Port %b ein.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/de/ERR_AGENT_WPAD b/errors/de/ERR_AGENT_WPAD
index c485321..7d6f5f9 100644
--- a/errors/de/ERR_AGENT_WPAD
+++ b/errors/de/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>Wie sie diese Einstellung in ihrem Browser finden:</p>24<p>Wie sie diese Einstellung in ihrem Browser finden:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Extras -&gt; Optionen -&gt; Erweitert -&gt; Netzwerk -&gt; Verbindungseinstellungen</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Wählen sie Automatische Suche von Einstellungen für dieses Netzwerk</li>28<li>Wählen sie Automatische Suche von Einstellungen für dieses Netzwerk</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Extras -&gt; Internetoptionen -&gt; Verbindung -&gt; LAN Einstellungen -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Automatische Suche von Einstellungen</li>34<li>Automatische Suche von Einstellungen</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Extras -&gt; Einstellungen -&gt; Erweitert -&gt; Netzwerk -&gt; Proxyserver</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Automatisches Konfigurationsskript verwenden</li>40<li>Automatisches Konfigurationsskript verwenden</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/el/ERR_AGENT_CONFIGURE b/errors/el/ERR_AGENT_CONFIGURE
index a98f80b..b618b4c 100644
--- a/errors/el/ERR_AGENT_CONFIGURE
+++ b/errors/el/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/el/ERR_AGENT_WPAD b/errors/el/ERR_AGENT_WPAD
index 7a58039..86a2a95 100644
--- a/errors/el/ERR_AGENT_WPAD
+++ b/errors/el/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/en/ERR_AGENT_CONFIGURE b/errors/en/ERR_AGENT_CONFIGURE
index 43746e3..abc5c12 100644
--- a/errors/en/ERR_AGENT_CONFIGURE
+++ b/errors/en/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/en/ERR_AGENT_WPAD b/errors/en/ERR_AGENT_WPAD
index a9e18bc..11377eb 100644
--- a/errors/en/ERR_AGENT_WPAD
+++ b/errors/en/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/es/ERR_AGENT_CONFIGURE b/errors/es/ERR_AGENT_CONFIGURE
index 0370d97..532679d 100644
--- a/errors/es/ERR_AGENT_CONFIGURE
+++ b/errors/es/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>Como encontrar estas preferencias en su navegador:</p>24<p>Como encontrar estas preferencias en su navegador:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Ajustes de conexión</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Herramientas -&gt; Opciones de Internet -&gt; Conexión -&gt; Preferencias de RED -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Servidores Proxy</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/es/ERR_AGENT_WPAD b/errors/es/ERR_AGENT_WPAD
index 72fdb4b..e281782 100644
--- a/errors/es/ERR_AGENT_WPAD
+++ b/errors/es/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>Como encontrar estas preferencias en su navegador:</p>24<p>Como encontrar estas preferencias en su navegador:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Ajustes de conexión</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Herramientas -&gt; Opciones de Internet -&gt; Conexión -&gt; Preferencias de RED -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Seleccione Detectar preferencias automáticamente</li>34<li>Seleccione Detectar preferencias automáticamente</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Herramientas -&gt; Opciones -&gt; Avanzado -&gt; Red -&gt; Servidores Proxy</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Seleccione Usar Configuración automática de Proxy</li>40<li>Seleccione Usar Configuración automática de Proxy</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/et/ERR_AGENT_CONFIGURE b/errors/et/ERR_AGENT_CONFIGURE
index 7997973..c69e054 100644
--- a/errors/et/ERR_AGENT_CONFIGURE
+++ b/errors/et/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/et/ERR_AGENT_WPAD b/errors/et/ERR_AGENT_WPAD
index f7641cd..381adbe 100644
--- a/errors/et/ERR_AGENT_WPAD
+++ b/errors/et/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/fa/ERR_AGENT_CONFIGURE b/errors/fa/ERR_AGENT_CONFIGURE
index 583abee..fa9d6fc 100644
--- a/errors/fa/ERR_AGENT_CONFIGURE
+++ b/errors/fa/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/fa/ERR_AGENT_WPAD b/errors/fa/ERR_AGENT_WPAD
index 518e7c5..8d0ad9e 100644
--- a/errors/fa/ERR_AGENT_WPAD
+++ b/errors/fa/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/fi/ERR_AGENT_CONFIGURE b/errors/fi/ERR_AGENT_CONFIGURE
index 992b801..6b97849 100644
--- a/errors/fi/ERR_AGENT_CONFIGURE
+++ b/errors/fi/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/fi/ERR_AGENT_WPAD b/errors/fi/ERR_AGENT_WPAD
index 4295501..f77cfa1 100644
--- a/errors/fi/ERR_AGENT_WPAD
+++ b/errors/fi/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Valitse Automaattisesti haetut asetukset</li>34<li>Valitse Automaattisesti haetut asetukset</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/fr/ERR_AGENT_CONFIGURE b/errors/fr/ERR_AGENT_CONFIGURE
index 8e82dd1..7023db3 100644
--- a/errors/fr/ERR_AGENT_CONFIGURE
+++ b/errors/fr/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>Comment trouver ces réglages dans votre navigateur :</p>24<p>Comment trouver ces réglages dans votre navigateur :</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Outils -&gt; Options -&gt; Avancé -&gt; Réseau -&gt; Paramètres de Connexion</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>28<li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Outils -&gt; Options Internet -&gt; Connexion -&gt; Paramètres LAN -&gt; Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>34<li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Outils -&gt; Préférences -&gt; Avancé -&gt; Réseau -&gt; Serveur Proxy</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>40<li>Vous devez indiquer dans la fenêtre du proxy HTTP, le nom du proxy %h et le port %b</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/fr/ERR_AGENT_WPAD b/errors/fr/ERR_AGENT_WPAD
index 12ab773..0dbf51f 100644
--- a/errors/fr/ERR_AGENT_WPAD
+++ b/errors/fr/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>Comment trouver ces réglages dans votre navigateur :</p>24<p>Comment trouver ces réglages dans votre navigateur :</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Outils -&gt; Options -&gt; Avancé -&gt; Réseau -&gt; Paramètres de Connexion</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Sélectionnez détection automatique dans les paramètres du proxy pour ce réseau</li>28<li>Sélectionnez détection automatique dans les paramètres du proxy pour ce réseau</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Outils -&gt; Options Internet -&gt; Connexion -&gt; Paramètres LAN -&gt; Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Sélectionnez le paramètre détection automatique</li>34<li>Sélectionnez le paramètre détection automatique</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Outils -&gt; Préférences -&gt; Avancé -&gt; Réseau -&gt; Serveur Proxy</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Utilisez la sélection automatique pour configurer le proxy</li>40<li>Utilisez la sélection automatique pour configurer le proxy</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/he/ERR_AGENT_CONFIGURE b/errors/he/ERR_AGENT_CONFIGURE
index cd8f9aa..fdc306e 100644
--- a/errors/he/ERR_AGENT_CONFIGURE
+++ b/errors/he/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>איך למצוא את ההגדרות האלה בדפדפן שלך:</p>24<p>איך למצוא את ההגדרות האלה בדפדפן שלך:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>כלים -&gt; אפשרויות -&gt; אפשרויות מתקדמות -&gt; רשת -&gt; הגדרות חיבור</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>28<li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>כלים -&gt; אפשרויות אינטרנט -&gt; חיבורים -&gt; הגדרות LAN -&gt; פרוקסי</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>34<li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>כלים -&gt; העדפות -&gt; הגדרות מתקדמות -&gt; רשת -&gt; שרתי פרוקסי</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>40<li>בתיבת הפרוקסי של HTTP, הקלד את שם שרת הפרוקסי %h ואת הפורט %b</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/he/ERR_AGENT_WPAD b/errors/he/ERR_AGENT_WPAD
index 612dff2..96fe246 100644
--- a/errors/he/ERR_AGENT_WPAD
+++ b/errors/he/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>איך למצוא את ההגדרות האלה בדפדפן שלך:</p>24<p>איך למצוא את ההגדרות האלה בדפדפן שלך:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>כלים -&gt; אפשרויות -&gt; אפשרויות מתקדמות -&gt; רשת -&gt; הגדרות חיבור</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>בחר "איתור הגדרות אוטומטי" עבר הרשת הזו</li>28<li>בחר "איתור הגדרות אוטומטי" עבר הרשת הזו</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>כלים -&gt; אפשרויות אינטרנט -&gt; חיבורים -&gt; הגדרות LAN -&gt; פרוקסי</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>בחר "איתור הגדרות אוטומטי"</li>34<li>בחר "איתור הגדרות אוטומטי"</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>כלים -&gt; העדפות -&gt; הגדרות מתקדמות -&gt; רשת -&gt; שרתי פרוקסי</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>בחר באיתור הגדרות אוטומטי עבור הגדרת הפרוקסי</li>40<li>בחר באיתור הגדרות אוטומטי עבור הגדרת הפרוקסי</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/hu/ERR_AGENT_CONFIGURE b/errors/hu/ERR_AGENT_CONFIGURE
index 8c6ab8d..4407791 100644
--- a/errors/hu/ERR_AGENT_CONFIGURE
+++ b/errors/hu/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>Ezeket a beállításokat az alábbi menüpontokon keresztül találhatja meg:</p>24<p>Ezeket a beállításokat az alábbi menüpontokon keresztül találhatja meg:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Kapcsolatbeállítások</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>28<li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Eszközök -&gt; Internetbeállítások -&gt; Kapcsolat -&gt; Helyi hálózat beállításai -&gt; Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>34<li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Proxyszerverek</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>40<li>A HTTP proxy mezőben adja meg a proxy nevét (%h) és portszámát (%b).</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/hu/ERR_AGENT_WPAD b/errors/hu/ERR_AGENT_WPAD
index 1923696..fb4904c 100644
--- a/errors/hu/ERR_AGENT_WPAD
+++ b/errors/hu/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>Ezeket a beállításokat az alábbi menüpontokon keresztül találhatja meg:</p>24<p>Ezeket a beállításokat az alábbi menüpontokon keresztül találhatja meg:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Kapcsolatbeállítások</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Válassza ki a „Proxybeállítások automatikus felismerése ehhez a hálózathoz” jelölőnégyzetet</li>28<li>Válassza ki a „Proxybeállítások automatikus felismerése ehhez a hálózathoz” jelölőnégyzetet</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Eszközök -&gt; Internetbeállítások -&gt; Kapcsolat -&gt; Helyi hálózat beállításai -&gt; Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Válassza ki az „Automatikus felismerés” opciót</li>34<li>Válassza ki az „Automatikus felismerés” opciót</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Eszközök -&gt; Beállítások -&gt; Fejlett -&gt; Hálózat -&gt; Proxyszerverek</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Válassza ki az "Automatikus proxybeállítás használata" opciót</li>40<li>Válassza ki az "Automatikus proxybeállítás használata" opciót</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/hy/ERR_AGENT_CONFIGURE b/errors/hy/ERR_AGENT_CONFIGURE
index 509224e..f79b80d 100644
--- a/errors/hy/ERR_AGENT_CONFIGURE
+++ b/errors/hy/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>Ինչպես փնտրել այս կարգաբերումները քո բրաուզերում:</p>24<p>Ինչպես փնտրել այս կարգաբերումները քո բրաուզերում:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Գործիքներ -&gt; Կարգաբերումներ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Կապի կարգաբերումներ</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>28<li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Գործիքներ -&gt; Ինտերնետ կարգաբերումներ -&gt; Կապ -&gt; LAN կարգաբերումներ -&gt;Պրոքսի</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>34<li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Գործիքներ -&gt; Նախընտրություններ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Պրոքսի սերվերներ</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>40<li>HTTP proxy դաշտում նշիր proxy name %h և port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/hy/ERR_AGENT_WPAD b/errors/hy/ERR_AGENT_WPAD
index 4fbec01..1ed2c43 100644
--- a/errors/hy/ERR_AGENT_WPAD
+++ b/errors/hy/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>Ինչպես փնտրել այս կարգաբերումները քո բրաուզերում:</p>24<p>Ինչպես փնտրել այս կարգաբերումները քո բրաուզերում:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Գործիքներ -&gt; Կարգաբերումներ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Կապի կարգաբերումներ</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Ընտրեք Auto-detect proxy settings for this network</li>28<li>Ընտրեք Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Գործիքներ -&gt; Ինտերնետ կարգաբերումներ -&gt; Կապ -&gt; LAN կարգաբերումներ -&gt;Պրոքսի</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Ընտրեք Automatically detect settings</li>34<li>Ընտրեք Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Գործիքներ -&gt; Նախընտրություններ -&gt; Լրացուցիչ -&gt; Ցանց -&gt; Պրոքսի սերվերներ</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Ընտրեք Use Automatic proxy configuration</li>40<li>Ընտրեք Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/id/ERR_AGENT_CONFIGURE b/errors/id/ERR_AGENT_CONFIGURE
index 43746e3..abc5c12 100644
--- a/errors/id/ERR_AGENT_CONFIGURE
+++ b/errors/id/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/id/ERR_AGENT_WPAD b/errors/id/ERR_AGENT_WPAD
index a9e18bc..11377eb 100644
--- a/errors/id/ERR_AGENT_WPAD
+++ b/errors/id/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Select Automatically detect settings</li>34<li>Select Automatically detect settings</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Select Use Automatic proxy configuration</li>40<li>Select Use Automatic proxy configuration</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/it/ERR_AGENT_CONFIGURE b/errors/it/ERR_AGENT_CONFIGURE
index 36a7977..efa6e92 100644
--- a/errors/it/ERR_AGENT_CONFIGURE
+++ b/errors/it/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>Indicazioni su come configurare il tuo browser sono disponibili a:</p>24<p>Indicazioni su come configurare il tuo browser sono disponibili a:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Strumenti -&gt; Opzioni -&gt; Avanzate -&gt; Rete -&gt; Impostazioni di connessione</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>28<li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Strumenti -&gt; Opzioni Internet -&gt; Connessioni -&gt; Impostazioni LAN -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>34<li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Strumenti -&gt; Preferenze -&gt; Avanzate -&gt; Rete -&gt; Server proxy</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>40<li>Nel box "Proxy HTTP" inserisci l'indirizzo del proxy (%h) e la porta %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/it/ERR_AGENT_WPAD b/errors/it/ERR_AGENT_WPAD
index 7f219db..e1c8a9d 100644
--- a/errors/it/ERR_AGENT_WPAD
+++ b/errors/it/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>Indicazioni su come configurare il tuo browser sono disponibili a:</p>24<p>Indicazioni su come configurare il tuo browser sono disponibili a:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Strumenti -&gt; Opzioni -&gt; Avanzate -&gt; Rete -&gt; Impostazioni di connessione</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Seleziona "Rileva automaticamente impostazioni proxy per questa rete"</li>28<li>Seleziona "Rileva automaticamente impostazioni proxy per questa rete"</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Strumenti -&gt; Opzioni Internet -&gt; Connessioni -&gt; Impostazioni LAN -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>Seleziona "Rileva automaticamente impostazioni"</li>34<li>Seleziona "Rileva automaticamente impostazioni"</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>Strumenti -&gt; Preferenze -&gt; Avanzate -&gt; Rete -&gt; Server proxy</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>Seleziona "Usa script di configurazione automatica"</li>40<li>Seleziona "Usa script di configurazione automatica"</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/ja/ERR_AGENT_CONFIGURE b/errors/ja/ERR_AGENT_CONFIGURE
index 5084a0a..a91bf1f 100644
--- a/errors/ja/ERR_AGENT_CONFIGURE
+++ b/errors/ja/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>ご利用のブラウザを設定する方法の探し方:</p>24<p>ご利用のブラウザを設定する方法の探し方:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>ツール -&gt; オプション -&gt; 詳細 -&gt; ネットワーク -&gt; 接続設定</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>ツール -&gt; インターネット オプション -&gt; 接続 -&gt; LAN の設定 -&gt; プロキシ サーバー</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>ツール -&gt; 設定 -&gt; 詳細 -&gt; ネットワーク -&gt; プロキシサーバー</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>40<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/ja/ERR_AGENT_WPAD b/errors/ja/ERR_AGENT_WPAD
index 7518de5..84fe8af 100644
--- a/errors/ja/ERR_AGENT_WPAD
+++ b/errors/ja/ERR_AGENT_WPAD
@@ -24,19 +24,19 @@ body
24<p>ご利用のブラウザを設定する方法の探し方:</p>24<p>ご利用のブラウザを設定する方法の探し方:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>ツール -&gt; オプション -&gt; 詳細 -&gt; ネットワーク -&gt; 接続設定</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>Select Auto-detect proxy settings for this network</li>28<li>Select Auto-detect proxy settings for this network</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>ツール -&gt; インターネット オプション -&gt; 接続 -&gt; LAN の設定 -&gt; プロキシ サーバー</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>自動検出の設定を選択してください。</li>34<li>自動検出の設定を選択してください。</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
39<li>ツール -&gt; 設定 -&gt; 詳細 -&gt; ネットワーク -&gt; プロキシサーバー</li>39<li>Tools -> Preferences -> Advanced -> Network -> Proxy Servers</li>
40<li>proxyの自動構成を選択してください。</li>40<li>proxyの自動構成を選択してください。</li>
41</ul>41</ul>
42</div>42</div>
diff --git a/errors/ka/ERR_AGENT_CONFIGURE b/errors/ka/ERR_AGENT_CONFIGURE
index 43746e3..abc5c12 100644
--- a/errors/ka/ERR_AGENT_CONFIGURE
+++ b/errors/ka/ERR_AGENT_CONFIGURE
@@ -24,19 +24,19 @@ body
24<p>How to find these settings in your browser:</p>24<p>How to find these settings in your browser:</p>
2525
26<div id="firefox"> For Firefox browsers go to: <ul>26<div id="firefox"> For Firefox browsers go to: <ul>
27<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>27<li>Tools -> Options -> Advanced -> Network -> Connection Settings</li>
28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>28<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
29</ul>29</ul>
30</div>30</div>
3131
32<div id="microsoft"> For Internet Explorer browsers go to: <ul>32<div id="microsoft"> For Internet Explorer browsers go to: <ul>
33<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>33<li>Tools -> Internet Options -> Connection -> LAN Settings ->Proxy</li>
34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>34<li>In the HTTP proxy box type the proxy name %h and port %b.</li>
35</ul>35</ul>
36</div>36</div>
3737
38<div id="opera"> For Opera browsers go to: <ul>38<div id="opera"> For Opera browsers go to: <ul>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches