cardigann: don't return null for parsing headers (#15167)

This commit is contained in:
Bogdan 2024-03-19 00:37:47 +02:00 committed by GitHub
parent ce45535fe5
commit 466122c339
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -2125,13 +2125,18 @@ namespace Jackett.Common.Indexers
private Dictionary<string, string> ParseCustomHeaders(Dictionary<string, List<string>> customHeaders, Dictionary<string, object> variables)
{
var headers = new Dictionary<string, string>();
if (customHeaders == null)
return null;
{
return headers;
}
// FIXME: fix jackett header handling (allow it to specifiy the same header multipe times)
var headers = new Dictionary<string, string>();
foreach (var header in customHeaders)
{
headers.Add(header.Key, applyGoTemplateText(header.Value[0], variables));
}
return headers;
}