diff --git a/ArchiSteamFarm/Trading.cs b/ArchiSteamFarm/Trading.cs index 95f09cc07..dac03cde6 100644 --- a/ArchiSteamFarm/Trading.cs +++ b/ArchiSteamFarm/Trading.cs @@ -35,7 +35,7 @@ using SteamKit2; namespace ArchiSteamFarm { public sealed class Trading : IDisposable { - internal const byte MaxItemsPerTrade = byte.MaxValue; // This is decided upon various factors, mainly limit on POST size in WebBrowser, as well as stability of Steam servers when dealing with huge trade offers + internal const byte MaxItemsPerTrade = byte.MaxValue; // This is decided upon various factors, mainly stability of Steam servers when dealing with huge trade offers internal const byte MaxTradesPerAccount = 5; // This is limit introduced by Valve private readonly Bot Bot; diff --git a/ArchiSteamFarm/WebBrowser.cs b/ArchiSteamFarm/WebBrowser.cs index f09855f73..08cc92dd4 100644 --- a/ArchiSteamFarm/WebBrowser.cs +++ b/ArchiSteamFarm/WebBrowser.cs @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Net; using System.Net.Http; using System.Threading.Tasks; @@ -553,10 +554,8 @@ namespace ArchiSteamFarm { if (data != null) { try { request.Content = new FormUrlEncodedContent(data); - } catch (UriFormatException e) { - ArchiLogger.LogGenericException(e); - - return null; + } catch (UriFormatException) { + request.Content = new StringContent(string.Join("&", data.Select(kv => WebUtility.UrlEncode(kv.Key) + "=" + WebUtility.UrlEncode(kv.Value))), null, "application/x-www-form-urlencoded"); } }