Implement hybrid session logic

In ASF V3.0 and before, we had a very naive mechanism with session handling that used to work fine but send a lot of requests as we always had to check session before sending a request.

Since ASF V3.1 until now we used new mechanism which refreshed session only when it indeed got invalidated, which worked good until now, but apparently due to some changed at Valve it stopped redirecting appropriately in all POST requests and non-/my GET/HEAD ones.

Therefore, implement hybrid session logic whick works V3.1+ for /my requests, and V3.0- for everything else.
This commit is contained in:
JustArchi
2018-11-06 21:41:59 +01:00
parent 5471394bab
commit 242284559e
2 changed files with 185 additions and 58 deletions

View File

@@ -33,10 +33,11 @@ using SteamKit2;
namespace ArchiSteamFarm {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public sealed class GlobalConfig {
internal const byte DefaultConnectionTimeout = 60;
private const bool DefaultAutoRestart = true;
private const string DefaultCommandPrefix = "!";
private const byte DefaultConfirmationsLimiterDelay = 10;
private const byte DefaultConnectionTimeout = 60;
private const string DefaultCurrentCulture = null;
private const bool DefaultDebug = false;
private const byte DefaultFarmingDelay = 15;