Revise cookie handling (#315)

* Fixed: Revised handling of cookies in case of redirects.

* Revised deletion of cookies.
This commit is contained in:
Qstick
2018-04-22 19:49:08 -04:00
committed by GitHub
parent 98653fafbf
commit 307c989409
4 changed files with 301 additions and 50 deletions
+4 -1
View File
@@ -13,8 +13,10 @@ namespace NzbDrone.Common.Http
Url = new HttpUri(url);
Headers = new HttpHeader();
AllowAutoRedirect = true;
StoreRequestCookie = true;
Cookies = new Dictionary<string, string>();
if (!RuntimeInfo.IsProduction)
{
AllowAutoRedirect = false;
@@ -37,6 +39,7 @@ namespace NzbDrone.Common.Http
public bool ConnectionKeepAlive { get; set; }
public bool LogResponseContent { get; set; }
public Dictionary<string, string> Cookies { get; private set; }
public bool StoreRequestCookie { get; set; }
public bool StoreResponseCookie { get; set; }
public TimeSpan RequestTimeout { get; set; }
public TimeSpan RateLimit { get; set; }