]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
8 years agoSourceFormat Enforcement
Source Maintenance [Sat, 1 Jul 2017 12:16:15 +0000 (12:16 +0000)] 
SourceFormat Enforcement

8 years agoBug 4464: Reduce "!Comm::MonitorsRead(serverConnection->fd)" assertions.
Christos Tsantilas [Sat, 1 Jul 2017 12:08:48 +0000 (00:08 +1200)] 
Bug 4464: Reduce "!Comm::MonitorsRead(serverConnection->fd)" assertions.

* Protect Squid Client classes from new requests that compete with
  ongoing pinned connection use and
* resume dealing with new requests when those Client classes are done
  using the pinned connection.

Replaced primary ConnStateData::pinConnection() calls with a pair of
pinBusyConnection() and notePinnedConnectionBecameIdle() calls,
depending on the pinned connection state ("busy" or "idle").

Removed pinConnection() parameters that were not longer used or could be computed from the remaining parameters.

Removed ConnStateData::httpsPeeked() code "hiding" the originating
request and connection peer details while entering the first "idle"
state. The old (trunk r11880.1.6) bump-server-first code used a pair of
NULLs because "Intercepted connections do not have requests at the
connection pinning stage", but that limitation no longer applicable
because Squid always fakes (when intercepting) or parses (a CONNECT)
request now, even during SslBump step1.

The added XXX and TODOs are not directly related to this fix. They
were added to document problems discovered while working on this fix.

In v3.5 code, the same problems manifest as Read.cc
"fd_table[conn->fd].halfClosedReader != NULL" assertions.

This is a Measurement Factory project

8 years agoFix mgr query handoff from the original recipient to Coordinator.
Alex Rousskov [Sat, 1 Jul 2017 09:59:16 +0000 (21:59 +1200)] 
Fix mgr query handoff from the original recipient to Coordinator.

This bug has already been fixed once, in trunk r11164.1.61, but that fix
was accidentally undone shortly after, during significant cross-branch
merging activity combined with the Forwarder class split. The final
merge importing the associated code (trunk r11730) was buggy.

The bug (explained in r11164.1.61) leads to a race condition between

* Store notifying Server classes about the entry completion (which might
  trigger a bogus error message sent to the cache manager client while
  Coordinator sends its own valid response on the same connection!) and

* post-cleanup() connection closure handlers of Server classes silently
  closing everything (and leaving Coordinator the only responding
  process on that shared connection).

The bug probably was not noticed for so long because, evidently, the
latter actions tend to win in the current code.

8 years agoFix message packing error handling in mgr and snmp SMP Forwarders.
Alex Rousskov [Sat, 1 Jul 2017 08:11:16 +0000 (20:11 +1200)] 
Fix message packing error handling in mgr and snmp SMP Forwarders.

A missing "return" resulted in Forwarders sending garbage (or worse) to
Coordinator.

8 years agobasic_ncsa_auth: fix hash listing wrap in man(8) page
Amos Jeffries [Sat, 1 Jul 2017 07:37:54 +0000 (19:37 +1200)] 
basic_ncsa_auth: fix hash listing wrap in man(8) page

'*' list bullet points must be indented with whitespace.
If they are not the list is treated as a single wrapped paragraph.

8 years agoBug 4687: Wrong names of components in man page, section SEE ALSO
Lubos Uhliarik [Sat, 1 Jul 2017 07:35:14 +0000 (19:35 +1200)] 
Bug 4687: Wrong names of components in man page, section SEE ALSO

8 years agoBug 4112: ssl_engine does not accept cryptodev
Sven Eisenberg [Thu, 29 Jun 2017 12:56:27 +0000 (00:56 +1200)] 
Bug 4112: ssl_engine does not accept cryptodev

8 years agoBug 4671 pt3: various GCC 7 compile errors
Amos Jeffries [Thu, 22 Jun 2017 15:31:46 +0000 (03:31 +1200)] 
Bug 4671 pt3: various GCC 7 compile errors

Also, remove limit on FTP realm strings

Convert ftpRealm() from generating char* to SBuf. This fixes issues identified
by GCC 7 where the realm string may be longer than the available buffer and
gets truncated.
The size of the buffer was making the occurance rather rare, but it is still
possible.

8 years agoReplace new/delete operators using modern C++ rules.
Alex Rousskov [Wed, 21 Jun 2017 20:12:48 +0000 (08:12 +1200)] 
Replace new/delete operators using modern C++ rules.

This change was motivated by "Mismatched free()/delete/delete[]" errors
reported by valgrind and mused about in Squid source code.

I speculate that the old new/delete replacement code was the result of
slow accumulation of working hacks to accomodate various environments,
as compiler support for the feature evolved. The cumulative result does
not actually work well (see the above paragraph), and the replacement
functions had the following visible coding problems according to [1,2]:

a) Declared with non-standard profiles that included throw specifiers.
b) Declared inline. C++ says that the results of inline declarations
   have unspecified effects. In Squid, they probably necessitated
   complex compiler-specific "extern inline" workarounds.
c) Defined in the header file. C++ says that defining replacements "in
   any source file" is enough and that multiple replacements per
   program (which is what a header file definition produces) result in
   "undefined behavior".
d) Declared inconsistently (only 2 out of 4 flavors). Declaring one base
   flavor should be sufficient, but if we declare more, we should
   declare all of them.

[1] http://en.cppreference.com/w/cpp/memory/new/operator_new
[2] http://en.cppreference.com/w/cpp/memory/new/operator_delete

The replacements were not provided to clang (trunk r13219), but there
was no explanation why. This patch does not change that exclusion.

I have no idea whether any of the old hacks are still necessary in some
cases. However, I suspect that either we do not care much if the
replacements are not enabled on some poorly supported platforms OR we
can disable them (or make them work) using much simpler hacks for the
platforms we do care about.

8 years agoBug 4671 pt2: GCC 7: raise FTP Gateway CTRL channel buffer to 16KB
Amos Jeffries [Wed, 21 Jun 2017 19:54:39 +0000 (07:54 +1200)] 
Bug 4671 pt2: GCC 7: raise FTP Gateway CTRL channel buffer to 16KB

Fixes
 error: %s directive output may be truncated writing up to 8191 bytes
        into a region of size 1019
 note: snprintf output between 8 and 8199 bytes into a destination of
       size 1024

8 years agoSourceFormat Enforcement
Source Maintenance [Thu, 15 Jun 2017 00:16:33 +0000 (00:16 +0000)] 
SourceFormat Enforcement

8 years agoBug 2833 pt3: Do not respond with HTTP/304 to unconditional requests
Eduard Bagdasaryan [Wed, 14 Jun 2017 21:59:06 +0000 (09:59 +1200)] 
Bug 2833 pt3: Do not respond with HTTP/304 to unconditional requests

... after internal revalidation. The original unconditional HttpRequest
was still marked (and processed) as conditional after internal
revalidation because the original (clear) Last-Modified and ETag values
were not restored (cleared) after the internal revalidation abused them.

TODO: Isolate the code converting the request into conditional one _and_
the code that undoes that conversion, to keep both actions in sync.

8 years agoBug 2833 pt2: Collapse internal revalidation requests (SMP-unaware caches), again.
Eduard Bagdasaryan [Wed, 14 Jun 2017 21:37:20 +0000 (09:37 +1200)] 
Bug 2833 pt2: Collapse internal revalidation requests (SMP-unaware caches), again.

The security fix in v5 r14979 had a negative effect on collapsed
forwarding. All "private" entries were considered automatically
non-shareable among collapsed clients. However this is not true: there
are many situations when collapsed forwarding should work despite of
"private" entry status: 304/5xx responses are good examples of that.
This patch fixes that by means of a new StoreEntry::shareableWhenPrivate
flag.

The suggested fix is not complete: To cover all possible situations, we
need to decide whether StoreEntry::shareableWhenPrivate is true or not
for all contexts where StoreEntry::setPrivateKey() is used. This patch
fixes only few important cases inside http.cc, making CF (as well
collapsed revalidation) work for some [non-cacheable] response status
codes, including 3xx, 5xx and some others.

The original support for internal revalidation requests collapsing
was in trink r14755 and referred to Squid bugs 2833, 4311, and 4471.

8 years ago3.5.26 SQUID_3_5_26
Amos Jeffries [Thu, 1 Jun 2017 13:47:53 +0000 (01:47 +1200)] 
3.5.26

8 years agoBug 4653: %st lies about tunneled traffic volumes
Christos Tsantilas [Mon, 29 May 2017 13:15:55 +0000 (01:15 +1200)] 
Bug 4653: %st lies about tunneled traffic volumes

Squid-3.5 counts only the "CONNECT ..." header size for %>st and does not
count the "HTTP/1.1 200" response header for the %<st.

This is a Measurement Factory project

8 years agoRevert r14161
Amos Jeffries [Mon, 29 May 2017 12:57:48 +0000 (00:57 +1200)] 
Revert r14161

Wrong patch and commit message.

8 years agoBug 4682: ignoring http_access deny when client-first bumping mode is used
Christos Tsantilas [Mon, 29 May 2017 07:10:37 +0000 (19:10 +1200)] 
Bug 4682: ignoring http_access deny when client-first bumping mode is used

Squid fails to identify HTTP requests which are tunneled inside an already
established client-first bumped tunnel, and this is results in ignoring
http_access denied for these requests.

This is a Measurement Factory project

8 years agoFix xstrndup() documentation, callers. Disclosed implementation bugs.
Alex Rousskov [Mon, 29 May 2017 06:36:45 +0000 (18:36 +1200)] 
Fix xstrndup() documentation, callers. Disclosed implementation bugs.

xstrndup() does not work like strndup(3), and some callers got confused:

1. When n is the str length or less, standard strndup(str,n) copies all
   n bytes but our xstrndup(str,n) drops the last one. Thus, all callers
   must add one to the desired result length when calling xstrndup().
   Most already do, but it is often hard to see due to low code quality
   (e.g., one must remember that MAX_URL is not the maximum URL length).

2. xstrndup() also assumes that the source string is 0-terminated. This
   dangerous assumption does not contradict many official strndup(3)
   descriptions, but that lack of contradiction is actually a recently
   fixed POSIX documentation bug (i.e., correct implementations must not
   assume 0-termination): http://austingroupbugs.net/view.php?id=1019

The OutOfBoundsException bug led to truncated exception messages.

The ESI bug led to truncated 'literal strings', but I do not know what
that means in terms of user impact. That ESI fix is untested.

cachemgr.cc bug was masked by the fact that the buffer ends with \n
that is unused and stripped by the custom xstrtok() implementation.

TODO. Fix xstrndup() implementation (and rename the function so that
fixed callers do not misbehave if carelessly ported to older Squids).

8 years agoDocs: Improve formatting of several manual pages
Ingo Schwarze [Mon, 29 May 2017 06:29:45 +0000 (18:29 +1200)] 
Docs: Improve formatting of several manual pages

8 years agoBug 4711: SubjectAlternativeNames is missing in some generated certificates
Christos Tsantilas [Mon, 29 May 2017 05:52:34 +0000 (17:52 +1200)] 
Bug 4711: SubjectAlternativeNames is missing in some generated certificates

Squid may generate certificates which have a Common Name, but do not have
a subjectAltName extension. For example when squid generated certificates
do not mimic an origin certificate or when the certificate adaptation
algorithm sslproxy_cert_adapt/setCommonName is used.

This is causes problems to some browsers, which validates a certificate using
the SubjectAlternativeNames but ignore the CommonName field.

This patch fixes squid to always add a SubjectAlternativeNames extension in
generated certificates which do not mimic an origin certificate.

Squid still will not add a subjectAltName extension when mimicking an origin
server certificate, even if that origin server certificate does not include
the subjectAltName extension. Such origin server may have problems when
talking directly to browsers, and patched Squid is not trying to fix those
problems.

This is a Measurement Factory project

8 years agoBug 4682: ignoring http_access deny when client-first bumping mode is used
Christos Tsantilas [Mon, 29 May 2017 05:33:59 +0000 (17:33 +1200)] 
Bug 4682: ignoring http_access deny when client-first bumping mode is used

Squid fails to identify HTTP requests which are tunneled inside an already
established client-first bumped tunnel, and this is results in ignoring
http_access denied for these requests.

This is a Measurement Factory project

8 years agoAdd OpenSSL library details to -v output
Amos Jeffries [Mon, 29 May 2017 04:38:52 +0000 (16:38 +1200)] 
Add OpenSSL library details to -v output

This is partially to meet the OpenSSL copyright requirement that binaries
mention when they are using the library, and partially for admin to see
which library their Squid is using when multiple are present in the system.

8 years agoBug 3772: message from FTP server gets mangled
Rainer Tammer [Mon, 29 May 2017 04:37:41 +0000 (16:37 +1200)] 
Bug 3772: message from FTP server gets mangled

8 years agoBug 3102: FTP directory listing drops fist character of file names
Martin von Gagern [Mon, 29 May 2017 04:36:11 +0000 (16:36 +1200)] 
Bug 3102: FTP directory listing drops fist character of file names

8 years agoBug 4589: ssl_crtd: returning zero on failure
Amos Jeffries [Mon, 29 May 2017 04:21:16 +0000 (16:21 +1200)] 
Bug 4589: ssl_crtd: returning zero on failure

8 years agoBug 4695: squidpurge: GCC 7 build errors
Lubos Uhliarik [Mon, 8 May 2017 11:09:20 +0000 (23:09 +1200)] 
Bug 4695: squidpurge: GCC 7 build errors

8 years agoBug 4682: Fix ssl_bump "bump" action documentation
Christos Tsantilas [Thu, 4 May 2017 06:14:16 +0000 (18:14 +1200)] 
Bug 4682: Fix ssl_bump "bump" action documentation

Fixes squid documentation to correctly describe the squid behavior  when the
"bump" action is selected on step SslBump1. In this case squid selects
the client-first bumping mode.

This is a Measurement Factory project

8 years ago3.5.25 SQUID_3_5_25
Amos Jeffries [Sun, 2 Apr 2017 12:14:52 +0000 (00:14 +1200)] 
3.5.25

8 years agoBug 4688: various typo error(s) in man page(s)
Lubos Uhliarik [Fri, 31 Mar 2017 23:47:47 +0000 (12:47 +1300)] 
Bug 4688: various typo error(s) in man page(s)

8 years agolibtrie: Fix 'make check' when run before 'make all'
Amos Jeffries [Fri, 31 Mar 2017 23:39:21 +0000 (12:39 +1300)] 
libtrie: Fix 'make check' when run before 'make all'

8 years agoDocs: update refresh_pattern description regarding 'max' option
Garri Djavadyan [Fri, 31 Mar 2017 23:38:31 +0000 (12:38 +1300)] 
Docs: update refresh_pattern description regarding 'max' option

8 years agoFix variable shadowing after rev.14149
Amos Jeffries [Fri, 31 Mar 2017 00:51:52 +0000 (12:51 +1200)] 
Fix variable shadowing after rev.14149

8 years agoBug 4508: Host forgery stalls intercepted being-spliced connections.
Christos Tsantilas [Thu, 30 Mar 2017 13:31:22 +0000 (01:31 +1200)] 
Bug 4508: Host forgery stalls intercepted being-spliced connections.

Most SslBump splicing happens after getting SNI. SNI goes into the
second fake CONNECT request, where it may fail the host forgery check.
A failed check triggers an HTTP error response from Squid. When
attempting to send that response to the TLS client, Squid checks whether
all previously pipelined HTTP requests on the connection have finished.

Prior to this fix, Squid left the first fake CONNECT request in the
connection pipeline despite adding the second fake CONNECT. That first
CONNECT stalled the error response described above, with Squid waiting,
in vain, for that already handled [fake] transaction to finish.

Also call quitAfterError() to force Squid to close the connection (after
writing the discussed error response) instead of just logging a
[misleading] "kick abandoning [connection]" message in cache.log.

TODO: Always pop the first CONNECT when generating a second one.
Unifying CONNECT treatment is difficult because code like tunnel.cc
wants that CONNECT to be in the pipeline. Polishing that would probably
require disassociating ConnStateData from tunnel.cc (at least).

TODO: Apply the existing "delayed error" logic (that optionally bumps
TLS connections to deliver [some] errors to [some] SSL/TLS clients) to
host forgery errors. Otherwise, the plain HTTP error message cannot be
understood by the intercepted TLS client.

This is a Measurement Factory project

8 years agoNative FTP relay: NAT and TPROXY interception fixes
Alexander Gozman [Sun, 26 Feb 2017 11:09:42 +0000 (00:09 +1300)] 
Native FTP relay: NAT and TPROXY interception fixes

8 years agoext_kerberos_ldap_group_acl: fix unused value warnings
Amos Jeffries [Sun, 26 Feb 2017 08:56:17 +0000 (21:56 +1300)] 
ext_kerberos_ldap_group_acl: fix unused value warnings

 Detected by Coverity Scan. Issues 1364748 and 1364749.

8 years agoCheck that -k argument is provided before trying to use it.
Amos Jeffries [Sun, 26 Feb 2017 08:52:45 +0000 (21:52 +1300)] 
Check that -k argument is provided before trying to use it.

 Detected by Coverity Scan. Issue 1364726.

8 years agoFix missing CRLF on FTP timeout ABORT commands
Amos Jeffries [Sun, 26 Feb 2017 08:50:09 +0000 (21:50 +1300)] 
Fix missing CRLF on FTP timeout ABORT commands

8 years agoFix crash when configuring with invalid delay_parameters restore value.
Alex Rousskov [Sun, 26 Feb 2017 08:46:24 +0000 (21:46 +1300)] 
Fix crash when configuring with invalid delay_parameters restore value.

... like none/none. Introduced in rev which fixed another, much
bigger delay_parameters parsing bug.

TODO: Reject all invalid input, including restore/max of "-/100".

TODO: Fix misleading/wrong associated error messages. For example:
  ERROR: invalid delay rate 'none/none'. Expecting restore/max or 'none'
  ERROR: restore rate in '1/none' is not a number.

8 years agoFix regression in CONNECT authentication after rev.14142
Christos Tsantilas [Sat, 25 Feb 2017 05:50:14 +0000 (18:50 +1300)] 
Fix regression in CONNECT authentication after rev.14142

8 years agoBump SSL client on [more] errors encountered before ssl_bump evaluation
Christos Tsantilas [Wed, 8 Feb 2017 05:40:33 +0000 (18:40 +1300)] 
Bump SSL client on [more] errors encountered before ssl_bump evaluation

... such as ERR_ACCESS_DENIED with HTTP/403 Forbidden triggered by an
http_access deny rule match.

The old code allowed ssl_bump step1 rules to be evaluated in the
presence of an error. An ssl_bump splicing decision would then trigger
the useless "send the error to the client now" processing logic instead
of going down the "to serve an error, bump the client first" path.

Furthermore, the ssl_bump evaluation result itself could be surprising
to the admin because ssl_bump (and most other) rules are not meant to be
evaluated for a transaction in an error state. This complicated triage.

Also polished an important comment to clarify that we want to bump on
error if (and only if) the SslBump feature is applicable to the failed
transaction (i.e., if the ssl_bump rules would have been evaluated if
there were no prior errors). The old comment could have been
misinterpreted that ssl_bump rules must be evaluated to allow an
"ssl_bump splice" match to hide the error.

This is a Measurement Factory project.

8 years ago3.5.24 SQUID_3_5_24
Amos Jeffries [Sat, 28 Jan 2017 03:54:15 +0000 (16:54 +1300)] 
3.5.24

8 years agoSourceFormat Enforcement
Source Maintenance [Fri, 27 Jan 2017 18:16:32 +0000 (18:16 +0000)] 
SourceFormat Enforcement

8 years agoSSLv2 records force SslBump bumping despite a matching step2 peek rule.
Christos Tsantilas [Fri, 27 Jan 2017 17:02:52 +0000 (06:02 +1300)] 
SSLv2 records force SslBump bumping despite a matching step2 peek rule.

If Squid receives a valid TLS Hello encapsulated into ancient SSLv2
records (observed on Solaris 10), the old code ignored the step2 peek
decision and bumped the transaction instead.
Now Squid peeks (or stares) at the origin server as configured, even
after detecting (and parsing) SSLv2 records.

This is a Measurement Factory project.

8 years agoMitigate DoS attacks that use client-initiated SSL/TLS renegotiation.
Christos Tsantilas [Fri, 27 Jan 2017 16:14:19 +0000 (05:14 +1300)] 
Mitigate DoS attacks that use client-initiated SSL/TLS renegotiation.

There is a well-known DoS attack using client-initiated SSL/TLS
renegotiation. The severety or uniqueness of this attack method
is disputed, but many believe it is serious/real.
There is even a (disputed) CVE 2011-1473:
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1473

The old Squid code tried to disable client-initiated renegotiation, but
it did not work reliably (or at all), depending on Squid version, due
to OpenSSL API changes and conflicting SslBump callbacks. That
code is now removed and client-initiated renegotiations are allowed.

With this change, Squid aborts the TLS connection, with a level-1 ERROR
message if the rate of client-initiated renegotiate requests exceeds
5 requests in 10 seconds (approximately). This protection and the rate
limit are currently hard-coded but the rate is not expected to be
exceeded under normal circumstances.

This is a Measurement Factory project.

8 years agoDetect HTTP header ACL issues
Amos Jeffries [Fri, 27 Jan 2017 15:00:05 +0000 (04:00 +1300)] 
Detect HTTP header ACL issues

rep_header and req_header ACL types cannot match multiple different
headers in one test (unlike Squid-2 appears to have done). Produce
an ERROR and ignore the extra line(s) instead of silently changing
all the previous regex to match the second header name.

Also detect and ERROR when header name is missing entirely. Ignore
these lines instead of asserting.

8 years agoFix some spelling mistakes
Frederic Bourgeois [Fri, 27 Jan 2017 13:38:24 +0000 (02:38 +1300)] 
Fix some spelling mistakes

8 years agoSourceFormat Enforcement
Source Maintenance [Fri, 27 Jan 2017 06:16:44 +0000 (06:16 +0000)] 
SourceFormat Enforcement

8 years agoUpdate External ACL helpers error handling and caching
Christos Tsantilas [Fri, 27 Jan 2017 02:26:04 +0000 (15:26 +1300)] 
Update External ACL helpers error handling and caching

The helper protocol for external ACLs [1] defines three possible return values:
   OK - Success. ACL test matches.
   ERR - Success. ACL test fails to match.
   BH - Failure. The helper encountered a problem.

The external acl helpers distributed with squid currently do not follow this
definition. For example, upon connection error, ERR is returned:

   $ ext_ldap_group_acl ... -d
   ext_ldap_group_acl: WARNING: could not bind to binddn 'Can't contact LDAP server'
   ERR

This does not allow to distinguish "no match" and "error" either and
therefore negative caches "ERR", also in the case of an error.

Moreover there are multiple problems inside squid when trying to handle BH
responses:
  - Squid-5 and Squid-4 retry requests for BH responses but crashes after the
    maximum retry number (currently 2) is reached.
  - If an external acl helper return always BH (eg because the LDAP server is
    down) squid sends infinitely new request to the helper.

This is a Measurement Factory project

8 years agoFix "Source and destination overlap in memcpy" Valgrind errors
Eduard Bagdasaryan [Tue, 24 Jan 2017 20:14:32 +0000 (09:14 +1300)] 
Fix "Source and destination overlap in memcpy" Valgrind errors

Before this patch, source and destination arguments in
log_quoted_string() could point to the same static memory area, causing
multiple Valgrind-reported errors. Fixed by creating another buffer to
store quoted-processed output string.

8 years agoReduce crashes due to unexpected ClientHttpRequest termination.
Christos Tsantilas [Mon, 23 Jan 2017 02:05:46 +0000 (15:05 +1300)] 
Reduce crashes due to unexpected ClientHttpRequest termination.

The underlying problem has been known since r13480: If a
ClientHttpRequest job ends without Http::Stream (and ConnStateData)
knowledge, then Squid is likely to segfault or assert. This patch does
not resolve the underlying issue (a proper fix would require
architectural changes in a consensus-lacking area) but makes an
unexpected ClientHttpRequest job destruction less likely.

BodyPipe and Adaptation-related exceptions are the major causes of
unexpected ClientHttpRequest job destruction. This patch handles them by
closing the client connection. Connection closure should trigger an
orderly top-down cleanup, including Http::Stream, ConnStateData, and
ClientHttpRequest destruction.

If there is no connection to close, then the exception is essentially
ignored with a level-1 error message disclosing the problem. The side
effects of ignoring such exceptions are unknown, but without a client
connection, it is our hope that they would be relatively benign.

This is a Measurement Factory project.

8 years agoSourceFormat Enforcement
Source Maintenance [Sun, 1 Jan 2017 06:15:52 +0000 (06:15 +0000)] 
SourceFormat Enforcement

8 years agoSourceFormat Enforcement
Source Maintenance [Sun, 1 Jan 2017 00:16:45 +0000 (00:16 +0000)] 
SourceFormat Enforcement

8 years agoBug 3940 pt2: Make 'cache deny' do what is documented
Amos Jeffries [Mon, 26 Dec 2016 02:22:00 +0000 (15:22 +1300)] 
Bug 3940 pt2: Make 'cache deny' do what is documented

Instead of overriding whatever cacheability was previously set to
(including changing non-cacheables to be cacheable) actually
prevent both cache read and write.

8 years ago3.5.23 SQUID_3_5_23
Amos Jeffries [Fri, 16 Dec 2016 04:31:37 +0000 (17:31 +1300)] 
3.5.23

8 years agoDo not share private responses with collapsed client(s).
Eduard Bagdasaryan [Fri, 16 Dec 2016 04:27:10 +0000 (17:27 +1300)] 
Do not share private responses with collapsed client(s).

This excessive sharing problem with collapsed forwarding code has
several layers. In most cases, the core CF code does not share
uncachable or private response with collapsed clients because of the
refreshCheckHTTP() check. However, some responses might not be subject
to that (or equivalent) check. More importantly, collapsed revalidation
code does not check its responses at all and, hence, easily shares
private responses.

This short-term fix incorrectly assumes that an entry may become private
(KEY_PRIVATE) only when it cannot be shared among multiple clients
(e.g., because of a Cache-Control:private response header). However,
there are a few other cases when an entry becomes private. One of them
is a DISK_NO_SPACE_LEFT error inside storeSwapOutFileClosed() where
StoreEntry::releaseRequest() sets KEY_PRIVATE for a sharable entry [that
may still be perfectly preserved in the memory cache]. Consequently, the
short-term fix reduces CF effectiveness. The extent of this reduction is
probably environment-dependent.

Also: do not re-use SET_COOKIE headers for collapsed revalidation slaves,
i.e., adhere to the same requirement as for regular response HITs.

8 years agoBug 4169: HIT marked as MISS when If-None-Match does not match
Garri Djavadyan [Thu, 15 Dec 2016 10:33:57 +0000 (23:33 +1300)] 
Bug 4169: HIT marked as MISS when If-None-Match does not match

8 years agoBug 3940 (partial): hostHeaderVerify failures MISS when they should be HIT
Garri Djavadyan [Thu, 15 Dec 2016 09:36:34 +0000 (22:36 +1300)] 
Bug 3940 (partial): hostHeaderVerify failures MISS when they should be HIT

This fixes the critical condition leading to the HIT. However not all
code is correctly setting flags.noCache and flags.cacheable (see bugzilla).
So there may be other fixes needed after this.

8 years agoHTTP/1.1: Add registered codes entry for new 103 (Early Hints) status code
Amos Jeffries [Thu, 15 Dec 2016 09:22:10 +0000 (22:22 +1300)] 
HTTP/1.1: Add registered codes entry for new 103 (Early Hints) status code

8 years agoBug 2258: bypassing cache but not destroying cache entry
Garri Djavadyan [Thu, 15 Dec 2016 09:03:42 +0000 (22:03 +1300)] 
Bug 2258: bypassing cache but not destroying cache entry

8 years agoSourceFormat Enforcement
Source Maintenance [Fri, 9 Dec 2016 06:15:51 +0000 (06:15 +0000)] 
SourceFormat Enforcement

8 years agoBug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and...
Michael Buchau [Fri, 9 Dec 2016 04:33:04 +0000 (17:33 +1300)] 
Bug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and restart

8 years agoSupport IPv6 NAT with PF for NetBSD and FreeBSD
Egervary Gergely [Fri, 9 Dec 2016 03:46:36 +0000 (16:46 +1300)] 
Support IPv6 NAT with PF for NetBSD and FreeBSD

8 years agoBug 4174 partial: fix Write.cc:41 "!ccb->active()" assertion.
Christos Tsantilas [Fri, 9 Dec 2016 01:58:33 +0000 (14:58 +1300)] 
Bug 4174 partial: fix Write.cc:41 "!ccb->active()" assertion.

The following sequence of events triggers this assertion:
  - The server sends an 1xx control message.
  - http.cc schedules ConnStateData::sendControlMsg call.
  - Before sendControlMsg is fired, http.cc detects an error (e.g., I/O
    error or timeout) and starts writing the reply to the user.
  - The ConnStateData::sendControlMsg is fired, starts writing 1xx, and
    hits the "no concurrent writes" assertion.

We could only reproduce this sequence in the lab after changing Squid
code to trigger a timeout at the right moment, but the sequence looks
plausible. Other event sequences might result in the same outcome.

To avoid concurrent writes, Squid now drops the control message if
Http::One::Server detects that a reply is already being written. Also,
ConnStateData delays reply writing until a pending control message write
has been completed.

This is a Measurement Factory project.

8 years agoBug 3290: authenticate_ttl not working for digest authentication
Garri Djavadyan [Wed, 30 Nov 2016 23:33:04 +0000 (12:33 +1300)] 
Bug 3290: authenticate_ttl not working for digest authentication

8 years agoBug 4007: Hang on DNS query with dead-end CNAME
Stephen Baynes [Wed, 30 Nov 2016 23:20:39 +0000 (12:20 +1300)] 
Bug 4007: Hang on DNS query with dead-end CNAME

DNS lookup recursion no longer occurs. ipcacheParse() return values are no
longer useful.

Also, cleanup the debugging output.

8 years agoBug 3533: Cache still valid after HTTP/1.1 303 See Other
Garri Djavadyan [Wed, 30 Nov 2016 22:33:32 +0000 (11:33 +1300)] 
Bug 3533: Cache still valid after HTTP/1.1 303 See Other

RFC7231 does not mention 303 response as non-cacheable.
So, assuming that means it *is* cacheable.

8 years agoBug 4004 partial: Fix segfault via Ftp::Client::readControlReply
Christos Tsantilas [Wed, 30 Nov 2016 21:56:30 +0000 (10:56 +1300)] 
Bug 4004 partial: Fix segfault via Ftp::Client::readControlReply

Added nil dereference checks for Ftp::Client::ctrl.conn, including:
- Ftp::Client::handlePasvReply() and handleEpsvReply() that dereference
  ctrl.conn in DBG_IMPORTANT messages.
- Many functions inside FtpClient.cc and FtpGateway.cc files.

TODO: We need to find a better way to handle nil ctrl.conn. It is only
a matter of time when we forget to add another dereference check or
discover a place we missed during this change.

Also disabled forwarding of EPRT and PORT commands to origin servers.
Squid support for those commands is broken and their forwarding may
cause segfaults (bug #4004). Active FTP is still supported, of course.

This is a Measurement Factory project

8 years agoImprove debugs warnings when loading signing certs fails
Amos Jeffries [Wed, 30 Nov 2016 15:42:05 +0000 (04:42 +1300)] 
Improve debugs warnings when loading signing certs fails

8 years agoTLS: Make key= before cert= an error instead of quietly hiding the issue
Amos Jeffries [Tue, 15 Nov 2016 07:57:28 +0000 (20:57 +1300)] 
TLS: Make key= before cert= an error instead of quietly hiding the issue

This squid.conf setup is fatal in Squid-4. So best to fix these installations.
Even though Squdi-3 can cope with it.

8 years agoHonor SBufReservationRequirements::minSize regardless of idealSize.
Alex Rousskov [Mon, 14 Nov 2016 12:40:51 +0000 (01:40 +1300)] 
Honor SBufReservationRequirements::minSize regardless of idealSize.

  In a fully specified SBufReservationRequirements, idealSize would
  naturally match or exceed minSize. However, the idealSize default value
  (zero) may not. We should honor minSize regardless of idealSize, just as
  the API documentation promises to do.

  No runtime changes expected right now because the only existing user of
  SBufReservationRequirements sets .idealSize to CLIENT_REQ_BUF_SZ (4096)
  and .minSize to 1024.

8 years agoFix spelling for digest nonce cache maintenance event
Garri Djavadyan [Mon, 14 Nov 2016 10:54:34 +0000 (23:54 +1300)] 
Fix spelling for digest nonce cache maintenance event

8 years agoFix ssl::server_name ACL badly broken since inception.
Christos Tsantilas [Mon, 14 Nov 2016 10:51:24 +0000 (23:51 +1300)] 
Fix ssl::server_name ACL badly broken since inception.

The original server_name code mishandled all SNI checks and some rare
host checks:

* The SNI-derived value was pointing to an already freed memory storage.
* Missing host-derived values were not detected (host() is never nil).
* Mismatches were re-checked with an undocumented "none" value
  instead of being treated as mismatches.

Same for ssl::server_name_regex.

Also set SNI for more server-first and client-first transactions.

This is a Measurement Factory project.

8 years agoBug 3379: Combination of If-Match and a Cache Hit result in TCP Connection Failure
Garri Djavadyan [Fri, 11 Nov 2016 06:03:25 +0000 (19:03 +1300)] 
Bug 3379: Combination of If-Match and a Cache Hit result in TCP Connection Failure

8 years agoFix build issue after rev.14105
Amos Jeffries [Tue, 1 Nov 2016 11:22:31 +0000 (00:22 +1300)] 
Fix build issue after rev.14105

8 years agoHTTP/1.1: make Vary:* objects cacheable
Amos Jeffries [Sun, 30 Oct 2016 09:45:03 +0000 (22:45 +1300)] 
HTTP/1.1: make Vary:* objects cacheable

Under new clauses from RFC 7231 section 7.1.4 and HTTP response
containing header Vary:* (wifcard variant) can be cached, but
requires revalidation with server before each use.

Use the new mandatory revalidation flags to allow storing of any
wildcard Vary:* response.

Note that responses with headers like Vary:A,B,C,* are equivalent
to Vary:*. The cache key string for these objects is normalized.

8 years agoFix debug message in ACLChecklist::bannedAction()
Garri Djavadyan [Sun, 30 Oct 2016 09:40:25 +0000 (22:40 +1300)] 
Fix debug message in ACLChecklist::bannedAction()

8 years agoBug 4567: Strange IPv6 shown in access.log
Amos Jeffries [Sun, 30 Oct 2016 09:39:20 +0000 (22:39 +1300)] 
Bug 4567: Strange IPv6 shown in access.log

8 years agoCopyright: add some missing blurbs and contributor details
Amos Jeffries [Sun, 30 Oct 2016 09:38:16 +0000 (22:38 +1300)] 
Copyright: add some missing blurbs and contributor details

8 years agoBug 4627: fix generate-host-certificates and dynamic_cert_mem_cache_size docs
Amos Jeffries [Sat, 29 Oct 2016 23:26:28 +0000 (12:26 +1300)] 
Bug 4627: fix generate-host-certificates and dynamic_cert_mem_cache_size docs

For Squid-3 the fix is just to update the documentation.

8 years agoBug 4620: NetBSD build error with --enable-ipf-transparent
Takahiro Kambe [Tue, 25 Oct 2016 08:25:30 +0000 (21:25 +1300)] 
Bug 4620: NetBSD build error with --enable-ipf-transparent

On NetBSD sys/param.h must be included before netinet/ip_compat.h

8 years agoFix external_acl_type default children documentations
Amos Jeffries [Tue, 25 Oct 2016 08:23:49 +0000 (21:23 +1300)] 
Fix external_acl_type default children documentations

The max children has always been 5, not 20.

Also, make mgr:config report dumper actually hide only the real default
values. (sync with helper/ChildConfig.cc defaults)

8 years agoFix regression bug introduced by r14089.
Christos Tsantilas [Tue, 25 Oct 2016 08:19:49 +0000 (21:19 +1300)] 
Fix regression bug introduced by r14089.

Squid crashed because HttpMsg::body_pipe was used without check that it
was initialized. The message lacks body pipe when it has no body or
empty body.

8 years agoFix build with eCAP but without ICAP support.
Alex Rousskov [Sat, 15 Oct 2016 04:20:24 +0000 (17:20 +1300)] 
Fix build with eCAP but without ICAP support.

That is, when ./configured with --enable-ecap --disable-icap-client.

AccessLogEntry::icap requires ICAP_CLIENT, not just USE_ADAPTATION.

8 years ago3.5.22 SQUID_3_5_22
Amos Jeffries [Sun, 9 Oct 2016 19:57:39 +0000 (08:57 +1300)] 
3.5.22

8 years agoHTTP: MUST ignore a [revalidation] response with an older Date header.
Eduard Bagdasaryan [Sun, 9 Oct 2016 19:47:26 +0000 (08:47 +1300)] 
HTTP: MUST ignore a [revalidation] response with an older Date header.

Before this patch, Squid violated the RFC 7234 section 4 MUST
requirement: "When more than one suitable response is stored, a cache
MUST use the most recent response (as determined by the Date header
field)." This problem may be damaging in cache hierarchies where
parent caches may have different responses. Trusting the older response
may lead to excessive IMS requests, cache thrashing and other problems.

8 years agoOptimized/simplified buffering: Appending nothing is always possible.
Alex Rousskov [Sun, 9 Oct 2016 15:55:58 +0000 (04:55 +1300)] 
Optimized/simplified buffering: Appending nothing is always possible.

This change avoids CoW when appending an empty buffer to MemBlob or
SBuf, making "if !empty then append()" caller complications unnecessary.

8 years agoHide OpenSSL tricks from Valgrind far-reaching initialization errors.
Alex Rousskov [Sun, 9 Oct 2016 14:30:11 +0000 (03:30 +1300)] 
Hide OpenSSL tricks from Valgrind far-reaching initialization errors.

This change has no effect unless ./configured --with-valgrind-debug.

OpenSSL, including its Assembly code, contains many optimizations and
timing defenses that Valgrind misinterprets as uninitialized value
usage. Most of those tricks can be disabled by #defining PURIFY when
building OpenSSL, but some are not protected with PURIFY and most
OpenSSL libraries are (and should be) built without that #define.

To make matters worse, once Valgrind misdetects uninitialized memory, it
will complain about every usage of that memory. Those complaints create
a lot of noise, complicate triage, and effectively mask true bugs.
AFAICT, they cannot be suppressed by listing the source of that memory.

For example, this OpenSSL Assembly trick:
    Uninitialised value was created by a stack allocation
       at 0x556C2F7: aesni_cbc_encrypt (aesni-x86_64.s:2081)

Triggers many false errors like this one:
    Conditional jump or move depends on uninitialised value(s)
       by 0x750838: Debug::Finish()
       by 0x942E68: Http::One::ResponseParser::parse(SBuf const&)
       ...

This change marks OpenSSL-returned decrypted bytes as initialized. This
might miss some true OpenSSL bugs, but we should focus on Squid bugs.

8 years agoAvoid segfaults when debugging section 4 at level 9.
Alex Rousskov [Sun, 9 Oct 2016 12:36:16 +0000 (01:36 +1300)] 
Avoid segfaults when debugging section 4 at level 9.

The bug was probably added in r11496. It was exposed by Valgrind's
"Conditional jump or move depends on uninitialised value(s)" error.

8 years agoSourceFormat Enforcement
Source Maintenance [Sun, 9 Oct 2016 00:14:14 +0000 (00:14 +0000)] 
SourceFormat Enforcement

8 years agoBug 4302 pt2: IPFilter v5 transparent interception
Amos Jeffries [Sat, 8 Oct 2016 20:37:35 +0000 (09:37 +1300)] 
Bug 4302 pt2: IPFilter v5 transparent interception

8 years agoBug 4594: build failure with clang 3.9
Amos Jeffries [Sat, 24 Sep 2016 22:36:05 +0000 (11:36 +1300)] 
Bug 4594: build failure with clang 3.9

8 years agoBug 4471: revalidation doesn't work when expired cached object lacks Last-Modified.
Eduard Bagdasaryan [Fri, 23 Sep 2016 20:49:24 +0000 (08:49 +1200)] 
Bug 4471: revalidation doesn't work when expired cached object lacks Last-Modified.

The bug was caused by the fact that Squid used only Last-Modified header
value for evaluating entry's last modification time while making an
internal revalidation request. So, without Last-Modified it was not
possible to correctly fill If-Modified-Since header value. As a result,
the revalidation request was not initiated when it should be.

To fix this problem, we should generate If-Modified-Since based on other
data, showing how "old" the cached response is, such as Date and Age
header values. Both Date and Age header values are utilized while
calculating entry's timestamp. Therefore, we should use the timestamp if
Last-Modified is unavailable.

TODO: HttpRequest::imslen support looks broken/deprecated. Using this
field inside StoreEntry::modifiedSince() leads to several useless checks
and probably may cause other [hidden] problems.

8 years agoSourceFormat Enforcement
Source Maintenance [Fri, 23 Sep 2016 18:14:24 +0000 (18:14 +0000)] 
SourceFormat Enforcement

8 years agoBug 2833: Collapse internal revalidation requests (SMP-unaware caches)
Eduard Bagdasaryan [Fri, 23 Sep 2016 15:28:42 +0000 (03:28 +1200)] 
Bug 2833: Collapse internal revalidation requests (SMP-unaware caches)

... also address Bug 4311 and partially address Bug 2833 and Bug 4471.

Extend collapsed_forwarding functionality to internal revalidation
requests. This implementation does not support Vary-controlled cache
objects and is limited to SMP-unaware caching environments, where each
Squid worker knows nothing about requests and caches handled by other
workers. However, it also lays critical groundwork for future SMP-aware
collapsed revalidation support.

Prior to these changes, multiple concurrent HTTP requests for the same
stale cached object always resulted in multiple internal revalidation
requests sent by Squid to the origin server. Those internal requests
were likely to result in multiple competing Squid cache updates, causing
cache misses and/or more internal revalidation requests, negating
collapsed forwarding savings.

Internal cache revalidation requests are collapsed if and only if
collapsed_forwarding is enabled. There is no option to control just
revalidation collapsing because there is no known use case for it.

* Public revalidation keys

Each Store entry has a unique key. Keys are used to find entries in the
Store (both already cached/swapped_out entries and not). Public keys are
normally tied to the request method and target URI. Same request
properties normally lead to the same public key, making cache hits
possible. If we were to calculate a public key for an internal
revalidation request, it would have been the same as the public key of
the stale cache entry being revalidated. Adding a revalidation response
to Store would have purged that being-revalidated cached entry, even if
the revalidation response itself was not cachable.

To avoid purging being-revalidated cached entries, the old code used
private keys for internal revalidation requests. Private keys are always
unique and cannot accidentally purge a public entry. On the other hand,
for concurrent [revalidation] requests to find the store entry to
collapse on, that store entry has to have a public key!

We resolved this conflict by adding "scope" to public keys:

* Regular/old public keys have default empty scope (that does not affect
  key generation). The code not dealing with collapsed revalidation
  continues to work as before. All entries stored in caches continue to
  have the same keys (with an empty scope).

* When collapsed forwarding is enabled, collapsable internal
  revalidation requests get public keys with a "revalidation" scope
  (that is fed to the MD5 hash when the key is generated). Such a
  revalidation request can find a matching store entry created by
  another revalidation request (and collapse on it), but cannot clash
  with the entry being revalidated (because that entry key is using a
  different [empty] scope).

This change not only enables collapsing of internal revalidation
requests within one worker, but opens the way for SMP-aware workers to
share information about collapsed revalidation requests, similar to how
those workers already share information about being-swapped-out cache
entries.

After receiving the revalidation response, each collapsed revalidation
request may call updateOnNotModified() to update the stale entry [with
the same revalidation response!]. Concurrent entry updates would have
wasted many resources, especially for disk-cached entries that support
header updates, and may have purged being-revalidated entries due to
locking conflicts among updating transactions. To minimize these
problems, we adjusted header and entry metadata updating logic to skip
the update if nothing have changed since the last update.

Also fixed Bug 4311: Collapsed forwarding deadlocks for SMP Squids using
SMP-unaware caches. Collapsed transactions stalled without getting a
response because they were waiting for the shared "transients" table
updates. The table was created by Store::Controller but then abandoned (not
updated) by SMP-unaware caches. Now, the transients table is not created
at all unless SMP-aware caches are present. This fix should also address
complaints about shared memory being used for Squid instances without
SMP-aware caches.

A combination of SMP-aware and SMP-unaware caches is still not supported
and is likely to stall collapsed transactions if they are enabled. Note
that, by default, the memory cache is SMP-aware in SMP environments.

8 years agoBug 3819: "fd >= 0" assertion in file_write() during reconfiguration
Alex Rousskov [Fri, 23 Sep 2016 12:40:44 +0000 (00:40 +1200)] 
Bug 3819: "fd >= 0" assertion in file_write() during reconfiguration

Other possible assertions include "NumberOfUFSDirs" in UFSSwapDir and
"fd >= 0" in file_close(). And Fs::Ufs::UFSStoreState::drainWriteQueue()
may segfault while dereferencing nil theFile, although I am not sure
that bug is caused specifically by reconfiguration.

Since trunk r9181.3.1, reconfiguration is done in at least two steps:
First, mainReconfigureStart() closes/cleans/disables all modules
supporting hot reconfiguration and then, at the end of the event loop
iteration, mainReconfigureFinish() opens/configures/enables them again.
UFS code hits assertions if it has to log entries or rebuild swap.state
between those two steps. The tiny assertion opportunity window hides
these bugs from most proxies that are not doing enough disk I/O or are
not being reconfigured frequently enough.

Asynchronous UFS cache_dirs such as diskd were the most exposed, but
even blocking UFS caching code could probably hit [rebuild] assertions.

The swap.state rebuilding (always initiated at startup) probably did not
work as intended if reconfiguration happened during the rebuild time
because reconfiguration closed the swap.state file being rebuilt. We now
protect that swap.state file and delay rebuilding progress until
reconfiguration is over.

TODO: To squash more similar bugs, we need to move hot reconfiguration
support into the modules so that each module can reconfigure instantly.

8 years agoDo not leak url_rewrite_extras and store_id_extras on reconfigure/shutdown.
Alex Rousskov [Fri, 23 Sep 2016 11:22:48 +0000 (23:22 +1200)] 
Do not leak url_rewrite_extras and store_id_extras on reconfigure/shutdown.

TODO: We should not create unneeded extras either.

8 years agoDo reset $HOME if needed after r13435. Minimize putenv() memory leaks.
Alex Rousskov [Fri, 23 Sep 2016 11:11:48 +0000 (23:11 +1200)] 
Do reset $HOME if needed after r13435. Minimize putenv() memory leaks.

While r13435 is attributed to me, the wrong condition was not mine. This
is a good example of why "cmp() op 0" pattern is usually safer because
the "==" or "!=" operator "tells" us whether the strings are equal,
unlike "!cmp()" that is often misread as "not equal".

8 years agoBug 4228: ./configure bug/typo in r14394.
Alex Rousskov [Wed, 21 Sep 2016 02:09:36 +0000 (14:09 +1200)] 
Bug 4228: ./configure bug/typo in r14394.

The bug resulted in "test: too many arguments" error messages when
running ./configure and effectively replaced AC_MSG_ERROR() with
AC_MSG_WARN() for missing but required Heimdal and GNU GSS Kerberos
libraries.

8 years agoFix potential ICAP null pointer dereference after rev.14082
Eduard Bagdasaryan [Fri, 16 Sep 2016 18:50:04 +0000 (06:50 +1200)] 
Fix potential ICAP null pointer dereference after rev.14082

Adjusted Adaptation::Icap::ModXact::finalizeLogInfo(), fixing possible
"Null pointer dereference".

 Detected by Coverity Scan. Issue 1372977

8 years agoFix logged request size (%http::>st) and other size-related %codes.
Eduard Bagdasaryan [Fri, 16 Sep 2016 11:53:28 +0000 (23:53 +1200)] 
Fix logged request size (%http::>st) and other size-related %codes.

The %[http::]>st logformat code should log the actual number of
[dechunked] bytes received from the client. However, for requests with
Content-Length, Squid was logging the sum of the request header size and
the Content-Length header field value instead. The logged value was
wrong when the client sent fewer than Content-Length body bytes.

Also:

* Fixed %http::>h and %http::<h format codes for icap_log. The old code
  was focusing on preserving the "request header" (i.e. not "response
  header") meaning of the %http::>h logformat code, but since ICAP
  services deal with (and log) both HTTP requests and responses, that
  focus on the HTTP message kind actually complicates ICAP logging
  configuration and will eventually require introduction of new %http
  logformat codes that would be meaningless in access.log context.

  - In ICAP context, %http::>h should log to-be-adapted HTTP message
    headers embedded in an ICAP request (HTTP request headers in REQMOD;
    HTTP response headers in RESPMOD). Before this change, %http::>h
    logged constant/"FYI" HTTP request headers in RESPMOD.

  - Similarly, %http::<h should log adapted HTTP message headers
    embedded in an ICAP response (HTTP request headers in regular
    REQMOD; HTTP response headers in RESPMOD and during request
    satisfaction in REQMOD). Before this change, %http::<h logged "-" in
    REQMOD.

  In other words, in ICAP logging context, the ">" and "<" characters
  should indicate ICAP message kind (where the being-logged HTTP message
  is embedded), not HTTP message kind, even for %http codes.

  TODO: %http::>h code logs "-" in RESPMOD because AccessLogEntry does
  not store virgin HTTP response headers.

* Correctly initialize ICAP ALE HTTP fields related to HTTP message
  sizes for icap_log, including %http::>st, %http::<st, %http::>sh, and
  %http::>sh format codes.

* Initialize HttpMsg::hdr_sz in HTTP header parsing code. Among other
  uses, this field is needed to initialize HTTP fields inside ICAP ALE.

* Synced default icap_log format documentation with the current code.