Commit 5303951b authored by justcoding121's avatar justcoding121

move user callback after 100 continue test

parent 9c08874b
......@@ -232,20 +232,6 @@ namespace Titanium.Web.Proxy
args.Client.ClientStreamReader = clientStreamReader;
args.Client.ClientStreamWriter = clientStreamWriter;
//If requested interception
if (BeforeRequest != null)
{
BeforeRequest(null, args);
}
args.ProxySession.Request.RequestLocked = true;
if (args.ProxySession.Request.CancelRequest)
{
Dispose(client, clientStream, clientStreamReader, clientStreamWriter, args);
break;
}
if (args.ProxySession.Request.UpgradeToWebSocket)
{
TcpHelper.SendRaw(clientStream, httpCmd, args.ProxySession.Request.RequestHeaders,
......@@ -266,7 +252,7 @@ namespace Titanium.Web.Proxy
args.ProxySession.SetConnection(connection);
args.ProxySession.SendRequest();
if(Enable100ContinueBehaviour)
if (Enable100ContinueBehaviour)
if (args.ProxySession.Request.Is100Continue)
{
WriteResponseStatus(args.ProxySession.Response.HttpVersion, "100",
......@@ -281,6 +267,21 @@ namespace Titanium.Web.Proxy
}
//If requested interception
if (BeforeRequest != null)
{
BeforeRequest(null, args);
}
args.ProxySession.Request.RequestLocked = true;
if (args.ProxySession.Request.CancelRequest)
{
Dispose(client, clientStream, clientStreamReader, clientStreamWriter, args);
break;
}
//If request was modified by user
if (args.ProxySession.Request.RequestBodyRead)
{
......
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