PipeReader.CopyToAsync(Stream) should not perform zero-length writes (#85768)
authorMarc Gravell <marc.gravell@gmail.com>
Sat, 20 May 2023 21:36:24 +0000 (22:36 +0100)
committerGitHub <noreply@github.com>
Sat, 20 May 2023 21:36:24 +0000 (17:36 -0400)
commit383947f2956a8b8128269ec90bcf91da95fd359c
tree470dee2fece21c7dd7928a748eff608f33486bb2
parent547b37ce775bfef1612401c2a69de06c9f41c47d
PipeReader.CopyToAsync(Stream) should not perform zero-length writes (#85768)

* add failing test for zero-length write

* simplify test

* apply fix
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs
src/libraries/System.IO.Pipelines/tests/PipeReaderCopyToAsyncTests.cs