Apigee responds with 504 error for backend response 304

We are facing similar issue mentioned in this link - https://community.apigee.com/questions/70530/for-304-status-code-from-services-the-gateway-take.html

The Apigee sends 504 error to client, however the response received from target is 304 and we can see the http header Content-Encoding: gzip. As per above link Apigee tries to open gzip and waits for response.

Why Apigee is waiting & timing out with 504 when target service is responding with 304. I agree the target is sending header Content-Encoding: gzip for empty body but Apigee should ignore this header as target response code is 304. The http code should take priority. I believe this should be the expected behavior as per HTTP standards. Is this a bug on Apigee side.

Is there a way to resolve this issue without any change on target service?

0 1 176
1 REPLY 1

Are there content-length / transfer encoding headers on the target server response?