Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

stop Apigee from uncompressing files

This is a bit of a specific situation. I have an event driven API that receives payloads of certain data from a 3rd party API. This goes through an API proxy, which Apigee in this case. The payload is compressed and Apigee automatically decompresses it. The issue is that sometimes the payload when decompressed exceeds the payload limit in terms of size, which prompts an error. The decompression happens before any policy is triggered so I can't do anything about it. The request header responsible for causing the decompression is Content-Encoding which is set to blank, I know this is very specific and I have so little degree of freedom to change, but do you guys have any suggestions ?
The setting we have tried :

  1. Get rid of the Content- Encoding  header before the request is processed by APIGEE

{

             "Set-Request-Header": {

                            "name": "Content-Encoding",

                            "value": ""

             }

}

 

  1. Ignore-Content- Encoding  -If request is getting forwarded to backend target. In this case setting the Ignore-Content- Encoding flag might work.

{

             "ServiceCallout": {

                            "Request": {

                                          "Set-Header": {

                                                         "name": "Content-Encoding",

                                                         "value": "gzip"

                                          }

                            },

                            "Ignore-Content-Encoding": "true",

                            "Timeout": "30000",

                            "name": "A2C"

             }

}
None worked so far. 
Any suggestion as this is something we would like to fix ASAP

0 5 1,454
5 REPLIES 5

Any luck ??

Hi @sudeepAPIGEE, thank you for sharing your question and engaging with our community, we are keeping an eye on this conversation to ensure you get a reply. If you have additional details, like error messages or configurations, feel free to share them to help others provide suggestions.

We appreciate your patience and look forward to our community pitching in to assist!

Hi @sudeepAPIGEE, I wanted to follow up on your question. If you still need support, feel free to share any additional context or details, and we’d be happy to assist further.

Also, a big thank you to @ravenhedden and @MarciSoos for contributing to this thread!

Looking forward to hearing from you. 🙂

Hi there, sorry for the wait. Can you provide a few more details? 1.) What is the error message that you're receiving? 2.) How big is the file while uncompressed?

@sudeepAPIGEE have you tried it with setting the request.streaming.enabled proxy-endpoint property to true?
You can read more info regarding this property and streaming, in the ProxyEndpoint Transport Property Specification and the Streaming requests and responses documentation.

Cheers,
Marcelo