]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Honor on_unsupported_protocol for intercepted https_port (#689)
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 6 Jul 2020 08:04:31 +0000 (08:04 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 10 Jul 2020 13:09:22 +0000 (13:09 +0000)
... when Squid discovers a non-TLS client while parsing its handshake.

For https_port traffic, ConnStateData::switchToHttps() relies on start()
to set preservingClientData_ correctly, but shouldPreserveClientData(),
called by start() to set preservingClientData_, was not preserving TLS
bytes in the https_port start() context. Typical debug messages:

    parseTlsHandshake: Got something other than TLS ... Cannot SslBump
    tunnelOnError: may have forgotten client data; send error: 40

src/client_side.cc

index 889ea138ae39d5121b7fdcf2b552213d0f06c520..3a502639e4983bf6168bb88552f0ee6ebf2e7a86 100644 (file)
@@ -4068,8 +4068,8 @@ ConnStateData::shouldPreserveClientData() const
         return true;
 #endif
 
-    // the 1st HTTP request on a connection to a plain intercepting port
-    if (!pipeline.nrequests && !port->secure.encryptTransport && transparent())
+    // the 1st HTTP(S) request on a connection to an intercepting port
+    if (!pipeline.nrequests && transparent())
         return true;
 
     return false;