mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-25 10:58:20 -10:00
Several of the HttpClient POST scenario tests were failing with HTTP status code 500. This was caused by the Azure remote endpoint generating OutOfMemoryException at times. The tests are sending large amounts of request body data to the Echo endpoint. That endpoint will respond back with all the headers and request body data serialized into a JSON payload. The OOM exceptions were coming from the Newtonsoft JSON serialization code currently used by the server endpoint. These tests don't really require that the request body data be sent back. The purpose of the tests is to verify that the request body payload was correctly sent by the client. We already have an endpoint, VerifyUpload, that can do that without echo'ing back the large request body data. This PR modifies the tests to use that endpoint. This should mitigate the OOM exceptions currently being generated in the server-side code. Additional mitigations/fixes will be done later on the server-side code to improve robustness. But fixing the tests to be more streamlined is goodness and will result in these tests being faster and more stable. Closes dotnet/corefx#36782 Commit migrated from https://github.com/dotnet/corefx/commit/288ce93787799052705814876d6e5ccb0523797d