I have been testing my proxy with requests that use different content encoding and here is what I see: 1. If I send "Content-Type: application/json; UTF-8" in POST body then it works OK
2. If I send "Content-Type: application/json; UTF-16" in POST body and encode the file with UTF-16 encoding and use "Content-Transfer-Encoding: binary" then it works OK
3. If I send "Content-Type: application/json; UTF-32" in POST body and encode the file with UTF-32 encoding and use "Content-Transfer-Encoding: binary" then Commons-JT-JsonThreatProtection produced this error:
{"fault":{"faultstring":"JSONThreatProtection[Commons-JT-JsonThreatProtection]: Execution failed. reason: Expecting { or [ at line 1","detail":{"errorcode":"steps.jsonthreatprotection.ExecutionFailed"}}}
I send the same JSON in all 3 cases, just differently encoded.
I verified through Apigee trace that the request body is interpreted correctly in all 3 cases (I can see the proper JSON). Please help me troubleshoot the problem.
I am not able to recreate your problem without your data.
When I try
curl -H "Content-Type: application/json; charset=utf-32" -H "Content-Transfer-Encoding: binary" https://dbcedge-eval-test.apigee.net/json-threat-prot --data-binary @utf-32.json
where utf-32.json (utf-32.zip) is a file that contains simple json datagram in utf-32, and proxy has a default json threat protection policy, then the result is as expected:
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |