Fixed: uTorrent api proxy would fail on specific Win10 configurations. (The Phoenix Rises)

Moved token queryparam to start since uTorrent requires it.
Fixed handling response missing an expected Set-Cookie header.
Force Cache-Control: no-cache for uTorrent.
Added Connection: KeepAlive to fix inexplicable uTorrent api failure.
This commit is contained in:
Taloth Saldono 2016-03-19 12:13:34 +01:00
parent edea488dbe
commit e1ea17cabf
5 changed files with 35 additions and 6 deletions

View file

@ -61,12 +61,16 @@ namespace NzbDrone.Common.Http
{
var result = new Dictionary<string, string>();
foreach (var cookie in Headers.GetValues("Set-Cookie"))
var setCookieHeaders = Headers.GetValues("Set-Cookie");
if (setCookieHeaders != null)
{
var match = RegexSetCookie.Match(cookie);
if (match.Success)
foreach (var cookie in setCookieHeaders)
{
result[match.Groups[1].Value] = match.Groups[2].Value;
var match = RegexSetCookie.Match(cookie);
if (match.Success)
{
result[match.Groups[1].Value] = match.Groups[2].Value;
}
}
}