<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">The patch has been manually modified to meet code review.<br><br>Here is the patch without any manuall modification:<br><br>diff --git a/squid-3.5.6/src/ssl/PeerConnector.cc b/squid-3.5.6/src/ssl/PeerConnector.cc<br>index b4dfd8f..d307665 100644<br>--- a/squid-3.5.6/src/ssl/PeerConnector.cc<br>+++ b/squid-3.5.6/src/ssl/PeerConnector.cc<br>@@ -189,8 +189,13 @@ Ssl::PeerConnector::initializeSsl()<br><br>             // Use SNI TLS extension only when we connect directly<br>             // to the origin server and we know the server host name.<br>-            const char *sniServer = hostName ? hostName->c_str() :<br>-                                    (!request->GetHostIsNumeric() ? request->GetHost() : NULL);<br>+            const char *sniServer = NULL;<br>+            const bool redirected = request->flags.redirected && ::Config.onoff.redir_rewrites_host;<br>+            if (!hostName || redirected)<br>+                sniServer = request->GetHostIsNumeric() ? request->GetHost() : NULL;<br>+            else<br>+                sniServer = hostName->c_str();<br>+<br>             if (sniServer)<br>                 Ssl::setClientSNI(ssl, sniServer);<br>         }<br>~            <br><br>Alex<br><br><br></div><br /><br /><div>> Date: Tue, 21 Jul 2015 12:59:29 -0700<br>> From: hack.back@hotmail.com<br>> To: squid-users@lists.squid-cache.org<br>> Subject: Re: [squid-users] SSL connction failed due to SNI after content redirection<br>> <br>> :~/squid-3.5.6-20150716-r13865# patch -p0 --verbose < sni.patch<br>> Hmm...  Looks like a unified diff to me...<br>> The text leading up to this was:<br>> --------------------------<br>> |--- src/ssl/PeerConnector.cc<br>> |+++ src/ssl/PeerConnector.cc<br>> --------------------------<br>> Patching file src/ssl/PeerConnector.cc using Plan A...<br>> patch: **** malformed patch at line 16:                  debugs(83, 5,<br>> "SNIserve " << sniServer);<br>> <br>> <br>> <br>> <br>> <br>> --<br>> View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/SSL-connction-failed-due-to-SNI-after-content-redirection-tp4672339p4672366.html<br>> Sent from the Squid - Users mailing list archive at Nabble.com.<br>> _______________________________________________<br>> squid-users mailing list<br>> squid-users@lists.squid-cache.org<br>> http://lists.squid-cache.org/listinfo/squid-users<br></div></div></body>
</html>                                     </div></body>
</html>