Search Issue Tracker
By Design
By Design in 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
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- Module installation fails with "Download failed: Validation Failed" errors when using beta.2 Hub version
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Shader Graph Category dropdown cannot be expanded/collapsed when clicking on the text
- Different text alignment in the column header in Entities "System" window
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.
Resolution Note (2023.1.X):
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.