Skip to content

Commit

Permalink
don't allocate response content buffer when downloading files for pub…
Browse files Browse the repository at this point in the history
…lishing (#7662)
  • Loading branch information
riarenas authored Jul 23, 2021
1 parent 6224d1b commit c5d8214
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ public async Task DownloadFileAsync(
new CancellationTokenSource(TimeSpan.FromMinutes(TimeoutInMinutes));

using HttpRequestMessage getMessage = new HttpRequestMessage(HttpMethod.Get, uri);
using HttpResponseMessage response = await client.GetAsync(uri, timeoutTokenSource.Token);
using HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, timeoutTokenSource.Token);

response.EnsureSuccessStatusCode();

Expand Down

0 comments on commit c5d8214

Please sign in to comment.