From 9af75aca5d0ee5f9fc2e52dc58c8647435de2d45 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 23 Jul 2020 21:36:05 +0200 Subject: [PATCH] Closes #1907 --- ArchiSteamFarm/WebBrowser.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ArchiSteamFarm/WebBrowser.cs b/ArchiSteamFarm/WebBrowser.cs index a96fd0187..951a07066 100644 --- a/ArchiSteamFarm/WebBrowser.cs +++ b/ArchiSteamFarm/WebBrowser.cs @@ -685,6 +685,17 @@ namespace ArchiSteamFarm { redirectUri = new Uri(requestUri, redirectUri); } + switch (response.StatusCode) { + case HttpStatusCode.SeeOther: + // Per https://tools.ietf.org/html/rfc7231#section-6.4.4, a 303 redirect should be performed with a GET request + httpMethod = HttpMethod.Get; + + // Data doesn't make any sense for a GET request, clear it + data = null; + + break; + } + response.Dispose(); // Per https://tools.ietf.org/html/rfc7231#section-7.1.2, a redirect location without a fragment should inherit the fragment from the original URI