Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Commit

Permalink
#251 move readbody call used for WinAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
justcoding121 authored and justcoding121 committed May 29, 2017
1 parent 84d5e5e commit 68a01f8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Titanium.Web.Proxy/RequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -413,6 +403,16 @@ private async Task<bool> 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
Expand Down

0 comments on commit 68a01f8

Please sign in to comment.