HttpWebClient: add support for Referrer

This commit is contained in:
kaso17 2017-01-03 15:04:49 +01:00
parent b8d40b5259
commit e476233f07
1 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,9 @@ namespace Jackett.Utils.Clients
}
}
if (!string.IsNullOrEmpty(webRequest.Referer))
request.Headers.Referrer = new Uri(webRequest.Referer);
if (!string.IsNullOrEmpty(webRequest.RawBody))
{
var type = webRequest.Headers.Where(h => h.Key == "Content-Type").Cast<KeyValuePair<string,string>?>().FirstOrDefault();