HttpClient throws OutOfMemory exception when TransferEncodingChunked is not set
问题 In order to support upload of large (actually very large, up to several gigabytes) files with progress report we started using HttpClient with PushStreamContent, as described here. It works straightforward, we copy bytes between two streams, here is a code example: private void PushContent(Stream src, Stream dest, int length) { const int bufferLength = 1024*1024*10; var buffer = new byte[bufferLength]; var pos = 0; while (pos < length) { var bytes = Math.Min(bufferLength, length - pos); src