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
- WebGL Player with WebGPU Graphics API fails to render Scene when custom Render Feature is used
- “EndLayoutGroup” error thrown when changing Shader Precision Model settings in Build Profiles window > Player Settings Overrides
- Button hover state uses default theme color when a custom .uss is applied
- Samples Showcase script warning does not clear after enabling required settings until GameObject is reselected
- VFX Particles receive shadow artifacts when using ShaderGraph with enabled shadows and Face Camera Plane Orient mode
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.