fix cookie handling

This commit is contained in:
kaso17
2017-02-24 17:35:21 +01:00
parent ff025825ec
commit 3b3420086f
2 changed files with 4 additions and 2 deletions

View File

@@ -40,11 +40,12 @@ namespace Jackett.Utils.Clients
if (!string.IsNullOrEmpty(webRequest.Cookies))
{
var uri = new Uri(webRequest.Url);
var cookieUrl = new Uri("//" + uri.Host); // don't include the path
foreach (var c in webRequest.Cookies.Split(';'))
{
try
{
cookies.SetCookies(uri, c);
cookies.SetCookies(cookieUrl, c.Trim());
}
catch (CookieException ex)
{