Using the MemBuf::buf directly is not great, but it does have a properly
terminated c-string in this instance. We cannot use Raw() interface
because that is for output at DBG_DATA levels and will only display the
buffer name as if that was the raw traffic bytes at 11,2.
Which negates the entire purpose of this 11,2 output.
Alex Rousskov [Tue, 1 Sep 2015 09:07:03 +0000 (02:07 -0700)]
Support splice for SSLv3 and TLSv1 sessions that start with an SSLv2 Hello
Such sessions are created, for example, by some SSL clients using OpenSSL
v0.9.8 with default options. This does _not_ re-enable SSLv2 sessions.
Just enacts the permitted exception for Hello messages in RFC 6176
Amos Jeffries [Sun, 30 Aug 2015 20:36:48 +0000 (13:36 -0700)]
Fix regression in rev.14268
My bad cut-n-paste resulted in wrong locking sequence.
Fixing that reveals that the validity check on the return
result triggers cases of cbdata 'locks > 0' assertions.
The validity test is not currently needed by the fastCheck
code which preserves the value. So removing for now.
Amos Jeffries [Wed, 26 Aug 2015 17:51:18 +0000 (10:51 -0700)]
Bug 3553: cache_swap_high ignored and maxCapacity used instead
Also, to make matters worse the amount of objects (max 70) being purged on
each of the 1-second maintenance loops was far too small for the traffic
speeds of up to 20k RPS now being processed by proxies.
This fixes the cache_swap_high behaviour to closer match what is documented
at present, although some documentatino does say it cleans all the way down
to the low-water mark. Which appears never to have been true in regards to
one cycle but would occur over several of the proxy speed was not too high.
With this updated algorithm there is almost no limit to how far the
aggressiveness can scale, but it is linear at 200 objects per multiple of the
gap between low- and high- watermark.
SwapDir::maintain is now fairly well documented and debug traces added. With
several TODO ideas for future improvement also documented in the method code.
Alex Rousskov [Mon, 24 Aug 2015 21:07:31 +0000 (15:07 -0600)]
When a RESPMOD service aborts, mark the body it produced as truncated.
Without these changes, the recipient of the truncated body often
cannot tell that the body was actually truncated (e.g., when Squid
uses chunked encoding for body delivery). Lying about truncation
may result in rather serious user-level problems.
Implement constructors for wordlist allowing them to support non-zeroing pools
Make destructor private in order to force clients to use wordlistDestroy
Implement wordlistChopHead to support the only user of deleting the head of a wordlist
Amos Jeffries [Sun, 23 Aug 2015 11:53:54 +0000 (04:53 -0700)]
Docs: auto-build release notes for snapshots
This adds conditional build support to generate release notes whenever
a tarball is being created, regardless of what the code branch status
is. All that is required is the linuxdoc tool chain.
Formal release branch snapshots have been publishing the notes files
built for their previous release. But development versions of Squid
have not been getting documented at all which can be annoying for
testers.
The release-N.html file is also removed from the repository. With this
update it should no longer be needed by the snapshot machinery.
Amos Jeffries [Sat, 22 Aug 2015 19:06:46 +0000 (12:06 -0700)]
TLS: failure of https:// context non-fatal for non-OpenSSL builds
Only OpenSSL library is 'guaranteed' to produce a TLS context at this point
in the conversion to library-agnostic security. Any others may produce
nothing.
Match the DBG_IMPORTANT used for debug level of the 'initializing' message.
Amos Jeffries [Fri, 21 Aug 2015 09:43:53 +0000 (02:43 -0700)]
Cleanup: fix assertion in Store unit tests
The old Squid String implementation cannot handle appending nullptr or
negative lengths. So if the test code using CapturingStoreEntry ever
tries to append such it will crash instead of working like a StoreEntry
should.
Revert override keyword in Ftp::Server::callException
If even one only method is marked override in a class, then clang
requires all overriding methods in the class to be marked as such.
This uncovers a problem where toCbdata is defined virtual in
AsyncJob (which Ftp::Server inherits from) and implemented nonvirtual
in the CBDATA_CLASS macro. Fixing this will be the result of a sepearate
effort, for now covering up by removing keyword and marking XXX.