Below is the debug trace…Please share your thoughts as how can we resolve this issue.
com.apigee.errors.http.user.UnsupportedMediaType: Unsupported Encoding "UTF-8"
at com.apigee.protocol.http.msg.Encoding.wrap(Encoding.java:87) ~[http-1.0.0.jar:na]
at com.apigee.protocol.http.msg.Encoding.wrap(Encoding.java:52) ~[http-1.0.0.jar:na]
at com.apigee.protocol.http.HTTPClient$Context$3.onHeaders(HTTPClient.java:1039) ~[http-1.0.0.jar:na]
at com.apigee.protocol.http.io.MessageReader.onRead(MessageReader.java:119) ~[http-1.0.0.jar:na]
at com.apigee.nio.channels.DefaultNIOSupport$DefaultIOChannelHandler.onIO(NIOSupport.java:51) [nio-1.0.0.jar:na]
at com.apigee.nio.handlers.NIOThread.run(NIOThread.java:123) [nio-1.0.0.jar:na]
The “Content-Encoding” header field indicates what content codings
have been applied to the representation, beyond those inherent in the
media type, and thus what decoding mechanisms have to be applied in
order to obtain data in the media type referenced by the Content-Type
header field. Content-Encoding is primarily used to allow a
representation’s data to be compressed without losing the identity of
its underlying media type.
Below is the headers when the issue occurs. Content-Type and content (json) matches . Wondering what is the issue.
As per RFC specification ( https://tools.ietf.org/html/rfc2616#section-3.5 ) value UFT-8 should not be present in Content-Encoding header as it is not valid and message-processor behavior is correct.
Reviving old thread.
I am facing this as well … with the request hitting the backend server and working correctly.
Yet Apigee freaks out due to the incorrect response an returns the 415.
I have not found any override ability, including declaring properties to ignore errors.
Is there perhaps any other override ability ?
Out of interest: The issue remains and will not be addresed by Apigee - RFC rules
The backend system of record is CIS and they also refused to fix their error as “other 3PPs are using it without complaining”.
I solved this with a workaround - stood up an Edgemicro gateway with a custom plugin to strip off any Content-Encoding header from the CIS response.
I can share the plugin if you wish to follow this route.
Update: You may also be able to create a Hosted Target proxy to achieve similar. In our case, the southbound IP prevented this - Hosted Targets come from the greater GCE range which caused isues with the firewall NAT listings.