Search Issue Tracker
Fixed in 2017.3.0f3
Fixed in 2017.1.X, 2017.2.X
Votes
5
Found in
2017.1.0f3
Issue ID
932312
Regression
Yes
[WWW][UnityWebRequest] InvalidOperationException when User-Agent header contains parenthesis
Steps to reproduce:
1. Open project
2. Enter play mode
3. Observe the console
Result:
InvalidOperationException: Header value contains invalid characters
UnityEngine.Networking.UnityWebRequest.SetRequestHeader (System.String name, System.String value) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/modules/UnityWebRequest/WebRequestBindings.gen.cs:479)
Reproduced on: 2017.1.0f3, 2017.2.0b2
Did not reproduce on: 5.5.4p1, 5.6.2p4
Note: Removing parenthesis "(" and ")" eliminates the error
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
shubhamswaraj2021
Aug 18, 2020 16:30
good one <a href="https://www.lyricsauto.com">lyricsauto</a>
RowlandCollins
Jun 25, 2020 11:41
It is not easy to solve this issue therefore, I am thinking now to find a way of bypassing it. My friend has suggested me to replace these special characters with the best ones. Website https://xpertwriters.com/academic-ghostwriting-service/ is helpful in research paper online. Using suggested HTML escape characters might help me out.
pikachu007
Mar 09, 2019 10:33
Unity Application side:
Uri.EscapeUriString("Your header content with spéci@l characters");
Serveur side: PHP exemple:
urldecode($encodedString);
AlexKilowat
Oct 02, 2017 10:48
Fixed in 2017.1.1p3.
Hosnkobf
Aug 28, 2017 13:23
Thanks EILIOMM,
It seems to be really only the brackets... I first tried to escape it in different ways without success.
In the end I just replaced the brackets and it works.
[code]
string Escape(string s)
{
s = s.Replace("(", "(");
s = s.Replace(")", ")");
return s;
}
[/code]
emiliomm
Aug 09, 2017 10:52
I found a way to bypass the issue for those who need the header to work and are stuck with the 2017.x version.
Simply replace the characters "(" for "(" and ")" for ")". These are the html escape characters and seem to work fine for me.