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

Commit cfb601a

Browse files
author
Björn Weström
committed
concurrency fix
1 parent ce0bba9 commit cfb601a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Titanium.Web.Proxy/ResponseHandler.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ private async Task HandleHttpSessionResponse(SessionEventArgs args)
2828
await args.WebSession.ReceiveResponse();
2929

3030
var response = args.WebSession.Response;
31+
args.ReRequest = false;
3132

3233
//check for windows authentication
3334
if (isWindowsAuthenticationEnabledAndSupported && response.StatusCode == (int)HttpStatusCode.Unauthorized)
3435
{
3536
await Handle401UnAuthorized(args);
3637
}
3738

38-
args.ReRequest = false;
39-
4039
//if user requested call back then do it
4140
if (!response.Locked)
4241
{

Titanium.Web.Proxy/WinAuthHandler.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,8 @@ internal async Task Handle401UnAuthorized(SessionEventArgs args)
130130
//Should we cache all Set-Cokiee headers from server during auth process
131131
//and send it to client after auth?
132132

133-
//clear current server response
134-
await args.ClearResponse();
135-
136-
//request again with updated authorization header
137-
//and server cookies
138-
await HandleHttpSessionRequestInternal(args.WebSession.ServerConnection, args);
133+
// Let ReposnseHandler send the updated request
134+
args.ReRequest = true;
139135
}
140136
}
141137
}

0 commit comments

Comments
 (0)