mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-19 14:12:02 +01:00
parent
f6906d0f18
commit
ed7c5a937f
1 changed files with 7 additions and 0 deletions
|
|
@ -84,6 +84,13 @@ public async Task<HttpResponse> ExecuteAsync(HttpRequest request)
|
|||
throw new WebException($"Too many automatic redirections were attempted for {autoRedirectChain.Join(" -> ")}", WebExceptionStatus.ProtocolError);
|
||||
}
|
||||
|
||||
// 302 or 303 should default to GET on redirect even if POST on original
|
||||
if (response.StatusCode == HttpStatusCode.Redirect || response.StatusCode == HttpStatusCode.RedirectMethod)
|
||||
{
|
||||
request.Method = HttpMethod.GET;
|
||||
request.ContentData = null;
|
||||
}
|
||||
|
||||
response = await ExecuteRequestAsync(request, cookieContainer);
|
||||
}
|
||||
while (response.HasHttpRedirect);
|
||||
|
|
|
|||
Loading…
Reference in a new issue