Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-678

Malformed UTF-8 characters in JSON Response

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6.0
    • None
    • None
    • None
    • HDP-2.3.4.0-3485, RHEL7

    Description

      UTF-8 encoded characters in a json response from a REST endpoint are being altered when accessing the endpoint behind the knox gateway. When accessing these endpoints directly the expected response is received.

      Here is a comparison of the responses received when accessing the endpoints using curl:

      Output when NOT accessed through knox gateway (Expected Output)
      HTTP/1.1 200 OK
      X-Powered-By: Servlet/3.0
      Content-Type: application/json
      Content-Length: 24
      Date: Thu, 03 Mar 2016 14:45:23 GMT

      {"value":"ß_SomeLabel"}

      %

      Output when accessed through knox gateway
      HTTP/1.1 200 OK
      X-Powered-By: Servlet/3.0
      Date: Thu, 03 Mar 2016 14:47:06 GMT
      Content-Type: application/json
      Content-Length: 26
      Server: Jetty(8.1.14.v20131031)

      {"value":"ß_SomeLabel"}

      %

      I have attached a service.xml, rewrite.xml, and a sample JAX-RS service for testing/troubleshooting purposes.

      Attachments

        1. rewrite.xml
          0.8 kB
          Christopher Jackson
        2. service.xml
          0.6 kB
          Christopher Jackson
        3. TestService.java
          0.5 kB
          Christopher Jackson

        Activity

          People

            kminder Kevin Minder
            jackson Christopher Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: