]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix %>ru for CONNECT requests (#299) M-staged-PR299
authorChristos Tsantilas <christos@chtsanti.net>
Thu, 4 Oct 2018 10:15:15 +0000 (10:15 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 6 Oct 2018 10:15:51 +0000 (10:15 +0000)
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

src/AccessLogEntry.cc
src/acl/FilledChecklist.cc

index 1d87505ea6b425f74ecdb5442c79e264dcbd550c..c51918257e97f5e1bb44829625a06bfc4c4fac05 100644 (file)
@@ -120,7 +120,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
index 4761a8f57faa70fb898334d353730fb29b541866..24d9fdc489d19ee74e8298aef233accf2a484e44 100644 (file)
@@ -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();
         }
     }