diff --git a/ArchiSteamFarm.sln.DotSettings b/ArchiSteamFarm.sln.DotSettings index 00086a4f3..986e91548 100644 --- a/ArchiSteamFarm.sln.DotSettings +++ b/ArchiSteamFarm.sln.DotSettings @@ -522,6 +522,7 @@ limitations under the License. <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="I" Suffix="" Style="AaBb" /></Policy> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="_" Suffix="" Style="AaBb" /><ExtraRule Prefix="_" Suffix="" Style="aaBb" /></Policy> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="_" Suffix="" Style="AaBb" /><ExtraRule Prefix="_" Suffix="" Style="aaBb" /></Policy> + False LIVE_MONITOR LIVE_MONITOR LIVE_MONITOR @@ -547,6 +548,7 @@ limitations under the License. True True True + True True True True diff --git a/ArchiSteamFarm/WebBrowser.cs b/ArchiSteamFarm/WebBrowser.cs index 3f1bf5087..a359715a5 100644 --- a/ArchiSteamFarm/WebBrowser.cs +++ b/ArchiSteamFarm/WebBrowser.cs @@ -505,6 +505,20 @@ namespace ArchiSteamFarm { redirectUri = new Uri(requestUri.GetLeftPart(UriPartial.Authority) + redirectUri); } + // According to the RFC, POST requests in certain types of redirection must be converted into GET + if (httpMethod == HttpMethod.Post) { + switch (response.StatusCode) { + case HttpStatusCode.Found: + case HttpStatusCode.Moved: + case HttpStatusCode.MultipleChoices: + case HttpStatusCode.SeeOther: + httpMethod = HttpMethod.Get; + data = null; + + break; + } + } + response.Dispose(); return await InternalRequest(redirectUri, httpMethod, data, referer, httpCompletionOption, --maxRedirections).ConfigureAwait(false);