Skip to content

ReferenceReadStream is not compatible with CryptoStream #18503

Closed
@drauch

Description

@drauch

Describe the bug

Very similar to aspnet/KestrelHttpServer#2341 (PR aspnet/KestrelHttpServer#2342) the ReferenceReadStream does throw a NotSupportedException in its Flush method when it should not.

To Reproduce

using(var cs = new CryptoStream(formFile.OpenReadStream(), ...))
{
    throw new Exception("stream has not been read completely and therefore CryptoStream will call Flush");
}

This should not trigger a NotSupportedException.

Further technical details

  • ASP.NET Core version 2.1.x on .NET Framework 4.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    DoneThis issue has been fixedarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.good first issueGood for newcomers.help wantedUp for grabs. We would accept a PR to help resolve this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions