Unverified Commit f3528b77 authored by honfika's avatar honfika Committed by GitHub

Merge pull request #725 from justcoding121/master

fix
parents 746f8d6d 66a45c02
...@@ -302,6 +302,11 @@ namespace Titanium.Web.Proxy.Network.Tcp ...@@ -302,6 +302,11 @@ namespace Titanium.Web.Proxy.Network.Tcp
} }
} }
if (isHttps && sslProtocol == SslProtocols.None)
{
sslProtocol = proxyServer.SupportedSslProtocols;
}
bool useUpstreamProxy1 = false; bool useUpstreamProxy1 = false;
// check if external proxy is set for HTTP/HTTPS // check if external proxy is set for HTTP/HTTPS
......
...@@ -68,7 +68,10 @@ namespace Titanium.Web.Proxy ...@@ -68,7 +68,10 @@ namespace Titanium.Web.Proxy
UserData = connectArgs?.UserData UserData = connectArgs?.UserData
}; };
args.HttpClient.Request.IsHttps = isHttps; if (isHttps)
{
args.HttpClient.Request.IsHttps = true;
}
try try
{ {
...@@ -156,7 +159,18 @@ namespace Titanium.Web.Proxy ...@@ -156,7 +159,18 @@ namespace Titanium.Web.Proxy
} }
prefetchTask = null; prefetchTask = null;
}
if (connection != null)
{
var socket = connection.TcpSocket;
bool part1 = socket.Poll(1000, SelectMode.SelectRead);
bool part2 = socket.Available == 0;
if (part1 & part2)
{
//connection is closed
connection = null;
}
} }
// create a new connection if cache key changes. // create a new connection if cache key changes.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment