mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Add workaround for POST limit size
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user