Special-case SocketsHttpHandler.MaxResponseDrainTime == 0 (#44568)
authorStephen Toub <stoub@microsoft.com>
Thu, 12 Nov 2020 18:12:10 +0000 (13:12 -0500)
committerGitHub <noreply@github.com>
Thu, 12 Nov 2020 18:12:10 +0000 (13:12 -0500)
commita9f1ca4f924b1bf99d314e62bc52b131810a07ae
treea524e07bf2d0dea8ae94bce7bbfea3496147ae74
parent8ebd0d46e5315ce91f70b540e23f5ed96b70050c
Special-case SocketsHttpHandler.MaxResponseDrainTime == 0 (#44568)

If the drain size is set to 0, any attempts to drain end up failing with a 1st-chance exception that's logged and eaten, when we should just be skipping all the associated work and failing immediately.
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentReadStream.cs