Changes to squid-3.5.7 (01 Aug 2015):
+ - Bug 4293: wrong SNI sent to server after URL-rewrite
- Bug 4251: incorrect instance name for memory segments in /dev/shm
- Bug 4227: invalid key in AuthUserHashPointer causing assertation failure
- Bug 3345: support %un (any available user name) format code for external ACLs.
// Use SNI TLS extension only when we connect directly
// to the origin server and we know the server host name.
- const char *sniServer = hostName ? hostName->c_str() :
- (!request->url.hostIsNumeric() ? request->url.host() : NULL);
+ const char *sniServer = NULL;
+ const bool redirected = request->flags.redirected && ::Config.onoff.redir_rewrites_host;
+ if (!hostName || redirected)
+ sniServer = !request->url.hostIsNumeric() ? request->url.host() : NULL;
+ else
+ sniServer = hostName->c_str();
+
if (sniServer)
Ssl::setClientSNI(ssl, sniServer);
}