Commit 22345d87 authored by justcoding121's avatar justcoding121 Committed by justcoding121

#269 cleanup

parent ed1c6ba3
......@@ -339,8 +339,14 @@ namespace Titanium.Web.Proxy
await BeforeRequest.InvokeParallelAsync(this, args);
}
if (args.WebSession.Request.CancelRequest)
{
args.Dispose();
break;
}
//if upgrading to websocket then relay the requet without reading the contents
if (!args.WebSession.Request.CancelRequest && args.WebSession.Request.UpgradeToWebSocket)
if (args.WebSession.Request.UpgradeToWebSocket)
{
await TcpHelper.SendRaw(this,
httpRemoteUri.Host, httpRemoteUri.Port,
......@@ -351,7 +357,7 @@ namespace Titanium.Web.Proxy
break;
}
if (!args.WebSession.Request.CancelRequest && connection == null)
if (connection == null)
{
connection = await GetServerConnection(args);
}
......@@ -373,13 +379,7 @@ namespace Titanium.Web.Proxy
args.Dispose();
break;
}
if (args.WebSession.Request.CancelRequest)
{
args.Dispose();
break;
}
//if connection is closing exit
if (args.WebSession.Response.ResponseKeepAlive == false)
{
......@@ -424,12 +424,6 @@ namespace Titanium.Web.Proxy
{
args.WebSession.Request.RequestLocked = true;
//If request was cancelled by user then dispose the client
if (args.WebSession.Request.CancelRequest)
{
return true;
}
//if expect continue is enabled then send the headers first
//and see if server would return 100 conitinue
if (args.WebSession.Request.ExpectContinue)
......
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