Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Foundation] Set the MaxInputInMemory to match the limit from other BCL classes. Fixes #21537 #21660

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 19, 2024

  1. [Foundation] Set the MaxInputInMemory to match the limit from other B…

    …CL classes. Fixes #21537
    
    The MaxInputInMemory property is set by default to be long.MaxValue.
    This value is much larger than the one we can find in other BCL classes
    such as the HttpContent [max value](https://github.com/microsoft/referencesource/blob/master/System/net/System/Net/Http/HttpContent.cs#L20)
    and the MemoryStream [max value](https://github.com/dotnet/runtime/blob/1d1bf92fcf43aa6981804dc53c5174445069c9e4/src/libraries/System.Private.CoreLib/src/System/IO/MemoryStream.cs#L37).
    
    It is important to notice that the HttpContent.MaxValue is used to
    limit the value of the MaxResponseContentBufferSize property in the
    HttpClient. This means that by making this move we are following the
    rest of the BCL.
    
    Fixes #21537
    mandel-macaque committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    10aa1d9 View commit details
    Browse the repository at this point in the history