1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-11 12:02:35 +02:00

Fixed: Follow 301 redirects when fetching torrents

Closes #1929
This commit is contained in:
Mark McDowall 2017-05-22 18:09:59 -07:00
parent 8eaab46488
commit 755575d107
No known key found for this signature in database
GPG Key ID: D4CEFA9A718052E0

View File

@ -133,7 +133,9 @@ private string DownloadFromWebUrl(RemoteEpisode remoteEpisode, string torrentUrl
var response = _httpClient.Get(request);
if (response.StatusCode == HttpStatusCode.SeeOther || response.StatusCode == HttpStatusCode.Found)
if (response.StatusCode == HttpStatusCode.MovedPermanently ||
response.StatusCode == HttpStatusCode.Found ||
response.StatusCode == HttpStatusCode.SeeOther)
{
var locationHeader = response.Headers.GetSingleValue("Location");