mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-25 10:58:20 -10:00
* Size CurlHandler's SendTransferState based on content length libcurl will never request more than 16K at a time from a request content stream, so our transfer state object allocates a 16K buffer to use the first time data needs to be transferred. This size can be efficient in limiting the number of operations required in passing data around, but for small posts, it's an unnecessarily large size. This commit changes the code to inspect the request content length, and if it's known to be less than 16K, that size is used instead. Commit migrated from https://github.com/dotnet/corefx/commit/3c362496e358a8097538d81cf8aa6f69bb5493cc