Open halter73 opened 2 months ago
Tagging subscribers to this area: @dotnet/area-system-buffers See info in area-owners.md if you want to be subscribed.
@GrabYourPitchforks In case you have any thoughts. I see that StreamReader
does some things with BOMs and preambles that HttpRequestStreamReader
currently does not. I would imagine less duplication is a good idea for security too.
Background and motivation
Microsoft.AspNetCore.WebUtilities.HttpRequestStreamReader is essentially a less complete and efficient version of
StreamReader
that allows you to specify theArrayPool<byte>
andArrayPool<char>
it uses. It could probably be updated to inherit fromStreamReader
ifStreamReader
had a constructor accepting these parameters reducing unnecessary duplication.API Proposal
API Usage
Alternative Designs
Do nothing at continue having a substantially similar implementation in ASP.NET Core's
HttpRequestStreamReader
andHttpRequestStreamWriter
.Risks
There might be some incompatibility or breaking change caused by
HttpRequestStreamReader
implementingStreamReader
and/orHttpRequestStreamWriter
implementingStreamWriter
that I'm not seeing.