(fixing typos) Christpher,
I would start with curl request 1. directly to your service end point 2. through knox to your service end point Compare all the header values returned with more attention on Content-type header and Content-length header If you share that information, may be able to identity potential problems. Thanks On Wed, Mar 2, 2016 at 9:48 PM, Dilli Dorai <[email protected]> wrote: > Christpher, > > I would start with curl request > 1. directly to your service end point > 2. through know to your service end point > > Compare all the header values returned with more attention on Content-type > header and Content-lengh header > > If you share that information, may be able to identity potential problems. > > Thanks > Dilli > > > > > On Wed, Mar 2, 2016 at 8:33 PM, Christopher Jackson < > [email protected]> wrote: > >> Hi All, >> >> We have a REST API sitting behind Knox and some of the endpoints in our >> API return JSON with utf-8. Specifically we are prefixing some labels with >> UTF-8 charcters to test translation capabilities. I am noticing that when >> we access these endpoints through knox our UTF-8 characters are malformed. >> When we access our API directly there is no issues. >> >> I turned up logging in knox to see if I could capture what was going >> wrong but I didn’t find much. I see that the request is made to the knox >> gateway, it’s properly forwarded to the end point behind the gateway. >> Looking at the data on the wire I see that the correct utf-8 encodings are >> being returned from our end point. I don’t see any logging for what was >> returned after knox rewrote the response. Is there anyway to enable this >> logging? >> >> Here is a snippet of the log showing the encoding: >> >> 2016-03-02 23:00:55,269 DEBUG http.wire (Wire.java:wire(72)) - >> http-outgoing-3 << "HTTP/1.1 200 OK[\r][\n]" >> 2016-03-02 23:00:55,269 DEBUG http.wire (Wire.java:wire(72)) - >> http-outgoing-3 << "X-Powered-By: Servlet/3.0[\r][\n]" >> 2016-03-02 23:00:55,270 DEBUG http.wire (Wire.java:wire(72)) - >> http-outgoing-3 << "Content-Type: application/json[\r][\n]" >> 2016-03-02 23:00:55,270 DEBUG http.wire (Wire.java:wire(72)) - >> http-outgoing-3 << "Content-Length: 17560[\r][\n]" >> 2016-03-02 23:00:55,270 DEBUG http.wire (Wire.java:wire(72)) - >> http-outgoing-3 << "Date: Thu, 03 Mar 2016 04:00:55 GMT[\r][\n]" >> 2016-03-02 23:00:55,270 DEBUG http.wire (Wire.java:wire(72)) - >> http-outgoing-3 << "[\r][\n]" >> 2016-03-02 23:00:55,271 DEBUG http.wire (Wire.java:wire(86)) - >> http-outgoing-3 << >> "[{"numBuckets":3,"version":1,"standardizedAttributes":[{"version":1,"cmproleId":451,"stdrole1":29,"stdrole2":0,"dvdargs":"","minwgtfreq":20,"cmprole2Id":0,"stdfuncId":292,"attributeId":331,"equistrcodeId":0,"stdfuncLabel":"[0xc3][0x9f]_Person","anonstrcodeId":4654,"cmapstrcodeId":4662,"attributeLabel":"Per >> Business…….. >> >> >> Below is a sample of how the labels are being malformed: >> >> Without Knox (expected output): >> “ß_Person" >> >> Through Knox: >> "ß_Person” >> >> ------------- >> >> LATIN SMALL LETTER SHARP S >> "\u00DF" >> >> is becoming >> >> LATIN CAPITAL LETTER A WITH TILDE >> "\u00C3" >> >> Any thoughts on how I might resolve this? Or best way to troubleshoot >> this further? Let me know if you require more information about my knox >> setup and rewrite rules. >> >> Regards, >> >> Christopher Jackson > > >
