Add workaround for POST limit size

This commit is contained in:
JustArchi
2020-02-24 21:11:54 +01:00
parent 1494e96ed3
commit ff3ecad6d1
2 changed files with 4 additions and 5 deletions

View File

@@ -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");
}
}