Unsupported Encoding "br"

Not applicable

From proxy requesting a json via GET and get 415 error when reciving response.

1. This is the "Request sent" step as shown in Trace:

curl -X GET -H 'Accept: application/json' -H 'Accept-Encoding: gzip,deflate,br' -H 'Accept-Language: en-US,en;q=0.9,ru;q=0.8' -H 'Cache-Control: no-cache' -H 'Origin: http://localhost:8888' -H 'Pragma: no-cache' -H 'Referer: http://localhost:8888/examples/mbt_basic' -H 'X-Forwarded-For: 81.3.160.50' -H 'X-Forwarded-Port: 443' -H 'X-Forwarded-Proto: https' 'https://static.letsembark.io/map-assets/v8/sprites/sprites.json'

The next step in 80 ms is ERROR 415 and here are few properties as shown in Trace:


error Unsupported Encoding "br"
error.class com.apigee.errors.http.user.UnsupportedMediaType
Identifier fault
state REQ_SENT
type ErrorPoint

Please advise what am I doing wrong and how to fix?

Solved Solved
1 9 6,657
1 ACCEPTED SOLUTION

Not applicable

So, the resolution was to exlicitly set Accept-Encoding header to not include br:

<Set> <Headers> <Header name="Accept-Encoding">gzip,deflate</Header> </Headers> </Set>

View solution in original post

9 REPLIES 9

Didn't quite understood but can are trying to do but can try adding Content-Type:application/json and test? Is there a sample proxy which you can share to replicate?

Not applicable

Setting modified (without br) accept-encoding into the target preflow has solved the issue:

<Set> <Headers> <Header name="Accept-Encoding">gzip,deflate</Header> </Headers> </Set>

Glad your issue is resolved.Please post as an answer.

Not applicable

So, the resolution was to exlicitly set Accept-Encoding header to not include br:

<Set> <Headers> <Header name="Accept-Encoding">gzip,deflate</Header> </Headers> </Set>

Is this only in some version of apigee ? May i know in which version this is fixed ?

@Alexey Pirozhnikov it does not work for me please some help

Ask a new question.

But @dchiesa1 this won't force Apigee to return always compressed data to clients regardless of the supported encoding by the client making the request ?

timfong888
Participant II

Can you share the full policy?