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

Http2LoopbackConnection properly handles stream termination #35100

Merged

Conversation

alnikola
Copy link
Contributor

PR adds an optional stream termination handling to Http2LoopbackConnection.ReadBodyAsync and fixes HttpClient construction missing the SocketHttpHandler created in the test.

Fixes #31220

@ghost
Copy link

ghost commented Apr 17, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

EnableUncryptedHttp2(socketsHttpHandler);
}

#if !NETFRAMEWORK
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this? Should we fix either PlatformDetection or the capability Instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SocketsHttpHandler type is not available on the full .Net Framework, so conditional compilation seems to be the only way.

Copy link
Member

@stephentoub stephentoub Apr 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So why type it as SocketsHttpHandler rather than object, as the other functions this is called from and it's calling are doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's to distinct it from the other overload taking HttpClientHandler.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, I could have made it object, but think an explicit type is more convenient.

Copy link
Member

@ManickaP ManickaP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alnikola alnikola merged commit b0c2a66 into dotnet:master Apr 20, 2020
@alnikola alnikola deleted the alnikola/31220-http2-expect100-nonsuccess-resp branch April 20, 2020 13:33
@davidsh davidsh added this to the 5.0 milestone Apr 20, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PostAsyncExpect100Continue_NonSuccessResponse_RequestBodyNotSent - IOException: End of Stream
6 participants