HTTP2: Fix handling of RST_STREAM with error = NO_ERROR after response EndStream...
authorGeoff Kizer <geoffrek@microsoft.com>
Mon, 5 Aug 2019 18:13:46 +0000 (11:13 -0700)
committerGitHub <noreply@github.com>
Mon, 5 Aug 2019 18:13:46 +0000 (11:13 -0700)
commit59d3e335d1eb4dd0f3df2a9009c2f2417d0a97a7
tree7e01b51028dcaa74f3a50bc2309ef95525dbcbc5
parent1b56ae42cb80fb449490f941324682505922be5d
HTTP2: Fix handling of RST_STREAM with error = NO_ERROR after response EndStream (dotnet/corefx#39882)

* fix handling of RST_STREAM with error = NO_ERROR after response EndStream

* eat exception and ensure we don't cancel the response body

* add comment

* add CancelResponseBody to avoid code duplication, and add checks we are not holding the stream object lock when we don't expect to

* fix _expect100ContinueWaiter to use TaskCreationOptions.RunContinuationsAsynchronously

Commit migrated from https://github.com/dotnet/corefx/commit/ca6c44b72b868c112387b0fb7def42d91f5577aa
src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs