From 68a01f8cc84b4b8f8a5334b883700365438bdceb Mon Sep 17 00:00:00 2001 From: justcoding121 Date: Mon, 29 May 2017 00:11:22 -0400 Subject: [PATCH] #251 move readbody call used for WinAuth --- Titanium.Web.Proxy/RequestHandler.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Titanium.Web.Proxy/RequestHandler.cs b/Titanium.Web.Proxy/RequestHandler.cs index 10b763a31..b399165fb 100644 --- a/Titanium.Web.Proxy/RequestHandler.cs +++ b/Titanium.Web.Proxy/RequestHandler.cs @@ -322,16 +322,6 @@ await CheckAuthorization(clientStreamWriter, PrepareRequestHeaders(args.WebSession.Request.RequestHeaders, args.WebSession); args.WebSession.Request.Host = args.WebSession.Request.RequestUri.Authority; - //if win auth is enabled - //we need a cache of request body - //so that we can send it after authentication in WinAuthHandler.cs - if (EnableWinAuth - && !RunTime.IsRunningOnMono - && args.WebSession.Request.HasBody) - { - await args.GetRequestBody(); - } - //If user requested interception do it if (BeforeRequest != null) { @@ -413,6 +403,16 @@ private async Task HandleHttpSessionRequestInternal(TcpConnection connecti try { + //if win auth is enabled + //we need a cache of request body + //so that we can send it after authentication in WinAuthHandler.cs + if (EnableWinAuth + && !RunTime.IsRunningOnMono + && args.WebSession.Request.HasBody) + { + await args.GetRequestBody(); + } + args.WebSession.Request.RequestLocked = true; //If request was cancelled by user then dispose the client