question

Irate Retro avatar image
Irate Retro asked

Are gzipped requests supported in REST API?

I am trying to upload files via the REST API with Content-Encoding: gzip. I know not all HTTP servers support gzipped requests, but surely Amazon does? I'm receiving HTTP/1.1 500 Internal Server Error and the body of the response simply says {"message":"Internal failure"}. In fact I get that very same response if I send a bogus Content-Encoding such as 'abcdef'. This is what leads me to believe gzip is unsupported, rather than this being a code problem on my end. If I disable gzip, everything works fine. Can anyone confirm for me that gzip is not supported, so I can abandon my attempts to figure out what is wrong?
amazon drive
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jamie Grossman avatar image
Jamie Grossman answered
Hi there, Thanks for posting! We only use gzip calls for getChanges. Everything else should be done without. Thanks, Jamie
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Irate Retro avatar image
Irate Retro answered
Thanks for the response,. Jamie, but I think the question may have been misunderstood. The get changes _request_ has no payload, aside from a few tiny variables, so it would make no sense for Amazon to support gzipped _requests_ for these. I think you are talking about the _response_. In other words, I trust you are saying that sending Accept-Encoding: gzip with all requests will only return gzip content for getChanges and nothing else in the API, but on the other hand it won't do any harm, either. This has nothing to do with my question. I was asking if one could send gzip requests in the request body, as in for a large file upload. Completely different. Request != Response. They have nothing to do with each other. A server which "uses gzip calls", as you put it, for large responses such as getChanges may very well NOT support gzip requests to that same API call. And the reverse is also true. At any rate, it seems to not be supported (that or my code is messed up). I would recommend that you guys return some meaningful message rather than 500 Internal Server Error with an empty JSON error message. Because I'm still left here guessing as to which cause it is. It would have taken a developer 5 seconds to spit out "Encoding not supported". Instead at least two folks have had to spend several minutes on this. Not even counting the hours of development time.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image
Levon@Amazon answered
Hi Irate Retro, Thank you for posting and apologies for a delay in replying. At the moment, Cloud Drive doesn't support gzip encoded requests. I agree with you that the messaging should be better, so we captured your comments and requests. Thank you!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.