Search Issue Tracker
By Design
Unknown (hidden) 2020.3.X, 2021.3.X, 2022.1.X, 2022.2.X, 2023.1.X
Votes
0
Found in
2023.1.0a1
Issue ID
UUM-3994
Regression
No
When sending a GET request with a body using HttpClient, a ProtocolViolationException is thrown
How to reproduce:
1. Open the attached project ("unity-http-get-with-body-request.zip")
2. Enter Play Mode
3. Observe the output in the Console
Expected result: The request returns a response successfully and it is logged in the Console
Actual result: A "Cannot send a content-body with this verb-type" or "Cannot send data when method is: GET" ProtocolViolationException is thrown
Reproducible with: Windows, macOS (2019.4.39f1, 2020.3.35f1), Windows (2021.3.4f1, 2022.1.4f1, 2022.2.0a16)
Tested on:
macOS 12.1 (Intel)
Windows 11
Note:
- When using .NET (instead of Mono) outside of the Editor, the exception is thrown with .NET Framework but not .NET Core
- Reproducible in Editor and build
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android][Vulkan] Crash on /system/lib/libandroid.so (ANativeWindow_setBuffersGeometry+4) when the Vulkan Graphics API is used
- Event handlers are preventing operations when trying to copy or paste HTML text in the WebGL Player
- [macOS] Crash on __pthread_kill when Exporting a Package while another export is in progress
- Crash on TransformAccessDestroyCallback when removing a URP Decal Projector component from a parent GameObject that had a URP Decal Projector child GameObject
- An added component is being removed form the prefab when reimporting the prefab
Resolution Note:
As per: https://github.com/dotnet/runtime/issues/25485 -- the .Net Framework Http client is more strict when it comes to undefined behaviors and therefore rejects by default. Our mono is in a state where the windows runtime is using the legacy .Net implementation under the hood whereas MacOS has been switched over to using the CoreFX (newer) behavior and is more permissive.