-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
False
-
None
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
-
When Zync makes requests to a 3rd party service, it first verifies that the Content-Type of the response is JSON. In https://github.com/3scale/zync/pull/528 we started allowing this header to have a charset, for example application/json;charset=UTF-8, however the charset is just ignored.
This task is to add a validation for the charset, i.e. if we only support UTF-8, we need to throw an error if the received charset is different. Also, we need to verify that in the body content indeed is encoded using UTF-8 (e.g. apply #force_encoding to the string, or pass check_utf8 to the JSON parser).