mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-09 05:22:09 +02:00
Fixed: Use indexer errors from response if Content-Type is XML before processing response
(cherry picked from commit 9bdc6183663a3510e53433a30ad701065e7ee9d9)
This commit is contained in:
parent
2b0f4e18e7
commit
6a7fe30171
3 changed files with 6 additions and 3 deletions
|
|
@ -54,7 +54,8 @@ public static void CheckError(XDocument xdoc, IndexerResponse indexerResponse)
|
|||
|
||||
protected override bool PreProcess(IndexerResponse indexerResponse)
|
||||
{
|
||||
if (indexerResponse.HttpResponse.HasHttpError)
|
||||
if (indexerResponse.HttpResponse.HasHttpError &&
|
||||
(indexerResponse.HttpResponse.Headers.ContentType == null || !indexerResponse.HttpResponse.Headers.ContentType.Contains("xml")))
|
||||
{
|
||||
base.PreProcess(indexerResponse);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ public static void CheckError(XDocument xdoc, IndexerResponse indexerResponse)
|
|||
|
||||
protected override bool PreProcess(IndexerResponse indexerResponse)
|
||||
{
|
||||
if (indexerResponse.HttpResponse.HasHttpError)
|
||||
if (indexerResponse.HttpResponse.HasHttpError &&
|
||||
(indexerResponse.HttpResponse.Headers.ContentType == null || !indexerResponse.HttpResponse.Headers.ContentType.Contains("xml")))
|
||||
{
|
||||
base.PreProcess(indexerResponse);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ public TorznabRssParser(TorznabSettings settings, ProviderDefinition definition,
|
|||
|
||||
protected override bool PreProcess(IndexerResponse indexerResponse)
|
||||
{
|
||||
if (indexerResponse.HttpResponse.HasHttpError)
|
||||
if (indexerResponse.HttpResponse.HasHttpError &&
|
||||
(indexerResponse.HttpResponse.Headers.ContentType == null || !indexerResponse.HttpResponse.Headers.ContentType.Contains("xml")))
|
||||
{
|
||||
base.PreProcess(indexerResponse);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue