Add HttpCompletionOption.ResponseHeadersRead to the buffering option to avoid potentially having 2 copies in memory

This commit is contained in:
Claus Vium 2019-07-20 13:36:59 +02:00
parent 886c88576c
commit dadfc09c01

View file

@ -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);