Modify StreamContent to use default CopyToAsync buffer size when no size is provided...
authorMax Kerr <rmkerr@users.noreply.github.com>
Fri, 16 Feb 2018 12:18:59 +0000 (04:18 -0800)
committerStephen Toub <stoub@microsoft.com>
Fri, 16 Feb 2018 12:18:59 +0000 (07:18 -0500)
commitcd85b45b2da62ac81236f126d8413ea528296492
tree9e30ecc433273ea263afe07e6d281ec150b7cf6d
parentf6746a3cc334e986c6fd9d7df80b6c13c9a38af6
Modify StreamContent to use default CopyToAsync buffer size when no size is provided (dotnet/corefx#27176)

* Add a tentative fix

* Minor fixes.

* Remove unused default value.

* Re-order error checks for compatibility reasons.

* Add a test to pin exception behavior when both parameters are incorrect.

Commit migrated from https://github.com/dotnet/corefx/commit/c28fbce3ce31cc0274b14e6e4ae08a84ec04ed1b
src/libraries/System.Net.Http/src/System/Net/Http/StreamContent.cs
src/libraries/System.Net.Http/src/System/Net/Http/StreamToStreamCopy.cs
src/libraries/System.Net.Http/tests/FunctionalTests/StreamContentTest.cs