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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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.