Commit a229da42 authored by justcoding121's avatar justcoding121

cleanup

parent 700d7d15
......@@ -30,7 +30,6 @@ namespace Titanium.Web.Proxy
private async Task HandleClient(ExplicitProxyEndPoint endPoint, TcpClient tcpClient)
{
Stream clientStream = tcpClient.GetStream();
clientStream.ReadTimeout = ConnectionTimeOutSeconds * 1000;
......@@ -57,7 +56,8 @@ namespace Titanium.Web.Proxy
//Find the request Verb
var httpVerb = httpCmdSplit[0];
httpRemoteUri = httpVerb.ToUpper() == "CONNECT" ? new Uri("http://" + httpCmdSplit[1]) : new Uri(httpCmdSplit[1]);
httpRemoteUri = httpVerb.ToUpper() == "CONNECT" ?
new Uri("http://" + httpCmdSplit[1]) : new Uri(httpCmdSplit[1]);
//parse the HTTP version
var version = new Version(1, 1);
......@@ -70,9 +70,10 @@ namespace Titanium.Web.Proxy
version = new Version(1, 0);
}
}
//filter out excluded host names
var excluded = endPoint.ExcludedHttpsHostNameRegex != null && endPoint.ExcludedHttpsHostNameRegex.Any(x => Regex.IsMatch(httpRemoteUri.Host, x));
//filter out excluded host names
var excluded = endPoint.ExcludedHttpsHostNameRegex != null
&& endPoint.ExcludedHttpsHostNameRegex.Any(x => Regex.IsMatch(httpRemoteUri.Host, x));
List<HttpHeader> connectRequestHeaders = null;
......
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