Commit 68a01f8c authored by justcoding121's avatar justcoding121 Committed by justcoding121

#251 move readbody call used for WinAuth

parent 84d5e5ef
...@@ -322,16 +322,6 @@ namespace Titanium.Web.Proxy ...@@ -322,16 +322,6 @@ namespace Titanium.Web.Proxy
PrepareRequestHeaders(args.WebSession.Request.RequestHeaders, args.WebSession); PrepareRequestHeaders(args.WebSession.Request.RequestHeaders, args.WebSession);
args.WebSession.Request.Host = args.WebSession.Request.RequestUri.Authority; 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 user requested interception do it
if (BeforeRequest != null) if (BeforeRequest != null)
{ {
...@@ -413,6 +403,16 @@ namespace Titanium.Web.Proxy ...@@ -413,6 +403,16 @@ namespace Titanium.Web.Proxy
try 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; args.WebSession.Request.RequestLocked = true;
//If request was cancelled by user then dispose the client //If request was cancelled by user then dispose the client
......
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