From dadfc09c01ee34b67bfc02f655ac06e4de953805 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Sat, 20 Jul 2019 13:36:59 +0200 Subject: [PATCH] Add HttpCompletionOption.ResponseHeadersRead to the buffering option to avoid potentially having 2 copies in memory --- .../HttpClientManager/HttpClientManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs index a4cd98b400..528053c21b 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs @@ -301,7 +301,7 @@ namespace Emby.Server.Implementations.HttpClientManager }; } - using (var response = await client.SendAsync(httpWebRequest, options.CancellationToken).ConfigureAwait(false)) + using (var response = await client.SendAsync(httpWebRequest, HttpCompletionOption.ResponseHeadersRead, options.CancellationToken).ConfigureAwait(false)) { await EnsureSuccessStatusCode(response, options).ConfigureAwait(false);