Skip to content

Http2LoopbackConnection properly handles stream termination - #35100

Merged
alnikola merged 4 commits into
dotnet:masterfrom
alnikola:alnikola/31220-http2-expect100-nonsuccess-resp
Apr 20, 2020
Merged

Http2LoopbackConnection properly handles stream termination#35100
alnikola merged 4 commits into
dotnet:masterfrom
alnikola:alnikola/31220-http2-expect100-nonsuccess-resp

Conversation

@alnikola

Copy link
Copy Markdown
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

ghost commented Apr 17, 2020

Copy link
Copy Markdown

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

EnableUncryptedHttp2(socketsHttpHandler);
}

#if !NETFRAMEWORK

Copy link
Copy Markdown
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
Copy Markdown
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.

@stephentoub stephentoub Apr 20, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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.

@ManickaP ManickaP left a comment

Copy link
Copy Markdown
Member

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