Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-11073

Validate encoding on the response body and content-type

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Zync
    • 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).

            Unassigned Unassigned
            rhn-support-dmayorov Daria Mayorova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: