From c4cf38255e422b5c0d4e5c3909810cc596b0510b Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 23 Nov 2021 19:21:59 -0600 Subject: [PATCH] Fixed: Combine content headers with response headers --- .../Http/Dispatchers/ManagedHttpDispatcher.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs b/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs index b621a1bd7..ab41c132b 100644 --- a/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs +++ b/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs @@ -117,7 +117,11 @@ public HttpResponse GetResponse(HttpRequest request, CookieContainer cookies) } } - return new HttpResponse(request, new HttpHeader(responseMessage.Headers), data, responseMessage.StatusCode); + var headers = responseMessage.Headers.ToNameValueCollection(); + + headers.Add(responseMessage.Content.Headers.ToNameValueCollection()); + + return new HttpResponse(request, new HttpHeader(headers), data, responseMessage.StatusCode); } protected virtual System.Net.Http.HttpClient GetClient(HttpUri uri)