-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
AWSCore.jl automatically decodes certain response MIME types, but doesn't pay attention to the Content-Encoding header, so it fails when the data is compressed. Example:
using AWSS3
bucket = "SOMETHING-YOU-OWN"
s = """
{"foo":"bar"}
"""
gz = open(`gzip`, "r+")
@async begin
write(gz, s)
close(gz.in)
end
zipped = read(gz)
s3_put(bucket, "test.json.gz", zipped, "application/json", "gzip")
s3_get(bucket, "test.json.gz")Here, s3_get throws an error as JSON.jl attempts to parse the gzipped data. This happens in practice with AWS CloudTrail logs, for example.
JuliaWeb/HTTP.jl#256 suggests having the HTTP client handle this transparently, but I don't know whether that's the right solution or not.
Metadata
Metadata
Assignees
Labels
No labels