andreineculau / fl-aws

Flaws at AWS
Apache License 2.0
15 stars 0 forks source link

mishandling of content-encodings and file extensions #24

Open andreineculau opened 7 years ago

andreineculau commented 7 years ago

Firehose can be configured to dump onto an S3 bucket raw or compressed records.

When choosing compression, Firehose will write instead to an object like "foo.gz" (as opposed to the uncompressed "foo") but also set metadata "Content-Encoding: gzip". Other metadata will stay the same "Content-Type: application/octet-stream".

This is not just confusing but plain logic breakdown as any HTTP-knowledge person would tell you. Either don't use the ".gz" extension and stick to "Content-Encoding: gzip", or use it and set "Content-Type: application/gzip" and forget the Content-Encoding header.