-
Notifications
You must be signed in to change notification settings - Fork 5.3k
HttpContent.ReadAsStream API #37494
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
HttpContent.ReadAsStream API #37494
Conversation
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
Tagging subscribers to this area: @dotnet/ncl |
src/libraries/System.Net.Http/src/System/Net/Http/HttpContent.cs
Outdated
Show resolved
Hide resolved
34c8ad2 to
eabed04
Compare
src/libraries/System.Net.Http/src/System/Net/Http/HttpContent.cs
Outdated
Show resolved
Hide resolved
|
@scalablecory @stephentoub : this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these ? and ?? operators makes it hard to understand order of precedence here. Can you please add some parens to help make it clear what's going on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split up into if/else, defaulting to empty MemoryStream moved as the last step.
8ffb324 to
028567b
Compare
|
/azp run runtime-libraries outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Followed the same pattern as in MultipartContent.
8d4393e to
01f59c0
Compare
|
There are a couple of places in the implementation of SocketsHttpHandler that should be updated to use the synchronous ReadAsStream (because ReadAsStreamAsync will always complete synchronously but we pay an additional task object to use it): runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs Line 1815 in 8b92fcd
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs Line 1185 in 8b92fcd
|
Fixed |
|
CI's finished and green, it just doesn't show here yet. |
Prototype, it will not compile on master until #34948 is merged.
@scalablecory Could you please give it a look that it's ok before we proceed with an API review process.
cc: @stephentoub