andreineculau/fl-aws

mishandling of content-encodings and file extensions

andreineculau opened this issue · 0 comments

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.