Search Issue Tracker
[Windows] UnityWebRequest and WWW not handling Content-Encoding header
How to reproduce:
1. Download attached project and open "Launcher" Scene
2. Enter Play mode and hit "Start Request" button with "Use GZIP" checkbox checked (You can see a log with Content-Encoding: gzip, but "Received content" is still gzipped. (Start with 0x1f 0x8b ...) )
3. Uncheck "Use GZIP" and request again (you can see right data content print in the log)
Expected result: Get uncompressed data in log whether or not you check/uncheck "Use GZIP".
Actual result: UnityWebRequest and WWW cannot handle Content-Encoding header in Windows, but works in macOS.
Note: If use macOS, you can see right data content in log (uncompressed) with/without "Use GZIP" checked
Reproduced with: 5.6.5f1, 2017.1.3p1, 2017.2.1p3, 2017.3.1p1, 2018.1.0b6
By Design: Supported content encodings are platform specific.
WWW is a wrapper on top of UnityWebRequest, which has it documented here: https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.SetRequestHeader.html
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- The Vector Graphics package can't be found in the Package Manager even if preview packages are enabled
- Hyphen symbol is not allowed inside the InputField if its content type is set to Name
- [2D Game kit] "Import parameters got modified during import" error is thrown when opening up the project for the first time
- Building subscenes without platform package doesn't work
- Picking stacked objects always selects prefab