Skip to content

Commit

Permalink
Fix cancellation token
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinjahn committed Dec 10, 2024
1 parent bdc61a6 commit 3fe5628
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/http/httpClient/Middleware/BodyInspectionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ CancellationToken cancellationToken
}

var stream = new MemoryStream();

#if NET5_0_OR_GREATER
await httpContent.CopyToAsync(stream, cancellationToken).ConfigureAwait(false);
#else
await httpContent.CopyToAsync(stream).ConfigureAwait(false);
#endif


if(stream.CanSeek)
{
Expand Down

0 comments on commit 3fe5628

Please sign in to comment.