squid:v6

Last commit made on 2024-04-08
Get this branch:
git clone -b v6 https://git.launchpad.net/squid

Branch merges

Branch information

Name:
v6
Repository:
lp:squid

Recent commits

dc76e11... by Francesco Chemolli

v6.9

23b3ee0... by Francesco Chemolli

Preemptively add bug 5360

0105ba3... by Francesco Chemolli

Reorder changelog entries

2d300fa... by Francesco Chemolli <email address hidden>

Update ChangeLog

Apply suggestion by Amos

Co-authored-by: Amos Jeffries <email address hidden>

5f6a24f... by Francesco Chemolli <email address hidden>

Apply suggestions from code review

Co-authored-by: Alex Rousskov <email address hidden>

842e6f2... by Francesco Chemolli

Prep for 6.9

8a5c6a7... by Alex Rousskov

Bug 5360: FwdState::noteDestinationsEnd() assertion "err" (#1767)

    FATAL: assertion failed: FwdState.cc:660: "err"

When FwdState decides to re-forward a request, it forgets the original
response[^1] but does not create an error object. Since commit e2bbd3b,
FwdState::noteDestinationsEnd() correctly assumed that we only idly wait
for additional destinations after encountering a problem, but
incorrectly asserted that past problems imply error object existence.

Now Squid generates an HTTP 502 (Bad Gateway) response while setting
%err_code/%err_detail to ERR_CANNOT_FORWARD/REFORWARD_TO_NONE.

TunnelStateData::noteDestinationsEnd() code is similar, but it probably
does not suffer from the same bug because an error object is created
before every retryOrBail() call, and there is no re-forwarding code that
forgets an HTTP error response without creating an error. Those
invariants are not well tracked, and this change mimics FwdState changes
in TunnelStateData just in case and to keep the two methods in sync. In
those hypothetical cases, ERR_CANNOT_FORWARD/RETRY_TO_NONE is logged.

[^1]: Long-term we probably want to preserve that original response so
that we do not have to replace it with a generated error, but doing so
requires significant refactoring and is outside this minimal fix scope.

ddfbbea... by Alex Rousskov

Do not leak memory when handling cache manager requests (#1408)

Also adjusted Cache-Control APIs to prevent similar bugs. These changes
also speed up processing a bit and simplify most of the affected code.
The now-gone "just remove the old CC" putCc() misfeature was unused.

The leak was introduced by commit 92a5adb: PutCommonResponseHeaders()
incorrectly assumed that putCc(pointerToX) takes ownership of X.

Detected by Coverity. CID 1534779: Resource leak (RESOURCE_LEAK).

6ec0a25... by Alex Rousskov

Reduce stale errno usage (#1302)

This covers a few easy cases, one of which resulted in wasted triage
time. More changes are needed to cover all potentially stale errno uses.

4bee0c8... by Amos Jeffries <email address hidden>

Fix error: template-id not allowed for constructor in C++20 (#1731)