dotnet / dotnet/aspnetcore

Consolidate IRequestBodyPipeFeature and IHttpRequestFeature.Body

Open
#12,620 2 comments 0 reactions 0 assignees View on GitHub
affected-very-few area-networking breaking-change enhancement severity-nice-to-have
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

For 3.0.0-preview8 we [consolidated](https://github.com/aspnet/AspNetCore/pull/12328) all of the response body APIs onto the new IHttpResponseBodyFeature. We should do something similar for request bodies to make them more reliable to shim.

New API:
IHttpRequestBodyFeature
- Stream
- PipeReader
- DisableBuffering - Maybe we don't need to bring this one back. We obsoleted IHttpBufferingFeature and nobody was using DisableRequestBuffering. It's more common for people to want to enable buffering since we don't by default.

Obsolete:
IRequestBodyPipeFeature
IHttpRequestFeature.Body

https://github.com/aspnet/AspNetCore/blob/master/src/Http/Http.Features/src/IRequestBodyPipeFeature.cs
https://github.com/aspnet/AspNetCore/blob/master/src/Http/Http/src/Features/RequestBodyPipeFeature.cs

This isn't as high a priority as it was for response bodies because there are fewer APIs, the auto-adapters work better for the read scenario, and it's less common to shim the request body.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.