From: Christos Tsantilas Date: Thu, 4 Oct 2018 10:15:15 +0000 (+0000) Subject: Bug 4893: Malformed %>ru URIs for CONNECT requests (#299) X-Git-Tag: SQUID_4_4~9 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec539cb969229a1d3ae2980af39ac37af6e75a8e;p=thirdparty%2Fsquid.git Bug 4893: Malformed %>ru URIs for CONNECT requests (#299) Commit bec110e (a.k.a. v4 commit fbbd5cd5) broke CONNECT URI logging because it incorrectly assumed that URI::absolute() supports all URIs. As the result, Squid logged CONNECT URLs as "://host:port". Also fixed a similar wrong assumption in ACLFilledChecklist::verifyAle() which may affect URL-related ACL checks for CONNECT requests, albeit only in already buggy cases where Squid warns about "ALE missing URL". This is a Measurement Factory project --- diff --git a/src/AccessLogEntry.cc b/src/AccessLogEntry.cc index f367925686..8476cb80fe 100644 --- a/src/AccessLogEntry.cc +++ b/src/AccessLogEntry.cc @@ -115,7 +115,7 @@ AccessLogEntry::~AccessLogEntry() const SBuf * AccessLogEntry::effectiveVirginUrl() const { - const SBuf *effectiveUrl = request ? &request->url.absolute() : &virginUrlForMissingRequest_; + const SBuf *effectiveUrl = request ? &request->effectiveRequestUri() : &virginUrlForMissingRequest_; if (effectiveUrl && !effectiveUrl->isEmpty()) return effectiveUrl; // We can not use ALE::url here because it may contain a request URI after diff --git a/src/acl/FilledChecklist.cc b/src/acl/FilledChecklist.cc index 27c49a8111..63090847e2 100644 --- a/src/acl/FilledChecklist.cc +++ b/src/acl/FilledChecklist.cc @@ -109,7 +109,7 @@ ACLFilledChecklist::verifyAle() const showDebugWarning("URL"); // XXX: al->url should be the request URL from client, // but request->url may be different (e.g.,redirected) - al->url = request->url.absolute(); + al->url = request->effectiveRequestUri(); } }