{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
1
Question by vinay · Sep 08, 2017 at 12:55 AM · 1.2k Views edge

protocol.http.UnsupportedEncoding

While invoking backend REST service we receive below error.

{"fault":{"faultstring":"Unsupported Encoding \"UTF-8\"","detail":{"errorcode":"protocol.http.UnsupportedEncoding"}}}

Similar question was asked in below but we have no control on the response.

https://community.apigee.com/questions/30479/how-to-fix-unsupported-encoding-utf-8-error.html

How to resolve it?

-Vinay


Comment
Add comment Show 2
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image vinay · Sep 08, 2017 at 07:09 AM 0
Link

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]
avatar image vinay · Sep 09, 2017 at 04:22 PM 0
Link

As expected based on the error message I am able to track the issue via tcpdump as the response from backend having header with

Content-Encoding: UTF-8 which apigee is not appreciating. Can some one detail on what is happening?

As per spec it show as below..

https://tools.ietf.org/html/rfc7231#section-3.1.2.2
==
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.

Content-Length: 404
Content-Type: application/json; charset=utf-8
Last-Modified: 2017-09-08T17:10:46.451-06:00
Content-Encoding: UTF-8
Allow: GET, POST, HEAD, PUT, DELETE, OPTIONS
X-Powered-By: Servlet/2.5 JSP/2.1

Close

1 Answer

  • Sort: 
avatar image
1

Answer by vinay · Sep 18, 2017 at 02:35 AM

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.

Comment
Add comment Show 4 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MAGESHWARANNATHAN · Feb 01, 2019 at 12:37 PM 0
Link

I'm unable to change in the server, is there any other workaroud.

avatar image Robin Martin MAGESHWARANNATHAN   · Dec 06, 2019 at 07:55 AM 0
Link

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 ?

avatar image Major Tom Robin Martin · Dec 28, 2020 at 11:08 PM 0
Link

I have the same issue: I can send a request directly to the backend but when I proxy with Apigee I get the same error.

Show more comments

Follow this Question

Answers Answers and Comments

61 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Matching a flow with or without a trailing slash 1 Answer

How do I begin to implement? 2 Answers

How to extract a URI path element from an inbound request? 3 Answers

Is there existing solution to integrate box.com with apigee? 1 Answer

minimize java memory usage by nodejs proxies 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges