]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix const-correctness of ACLHTTPHeaderData::match() parameter (#1771)
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 3 Apr 2024 09:25:55 +0000 (09:25 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Thu, 4 Apr 2024 15:05:26 +0000 (15:05 +0000)
commit47c9c9376d11a828a675e96ad6fa96c9fbcbceb0
tree17c6b82b3e99b3f5c4db840459314278fb64f9a6
parent2e7dea3cedd3ef2f071dee82867c4147f17376dd
Fix const-correctness of ACLHTTPHeaderData::match() parameter (#1771)

ACLHTTPHeaderData::match() required a pointer to non-const HttpHeader
but does not (and should not) modify the supplied HttpHeader.

Also removed support for nil HttpHeader in that method. All callers
already require HttpHeader presence. If that changes, it is the _caller_
that should decide what HttpHeader absence means (match, mismatch,
exception/dunno, etc.); ACLHTTPHeaderData does not have enough
information to make the right choice and, hence, should not be asked to
choose.

Also polished related #includes to remove unnecessary ones.
src/acl/HttpHeaderData.cc
src/acl/HttpHeaderData.h
src/acl/HttpRepHeader.cc
src/acl/HttpRepHeader.h
src/acl/HttpReqHeader.cc
src/acl/HttpReqHeader.h
src/http/forward.h