Hello! I am creating objects in a R2 bucket using a R2 API from a plain Javascript Worker, with a call like this: (body is a gzipped JSON blob)
await BUCKET.put('some/path', body, { httpMetadata: { contentType: 'application/geo+json', contentEncoding: 'gzip', }, customMetadata: { userID: userid, }, });
But the Content-Encoding header is missing in responses (via access to the public bucket URL), or the raw gzip is being wrapped inside a br response, then a Content-Encoding: br is served (via a the custom, cache enabled domain name accessing the bucket).
Querying the object metadata using the S3 API tells me the Content-Encoding header is not being stored in the R2 bucket:
aws s3api head-object --bucket bucket-name --endpoint-url hxxps://account-id.r2.cloudflarestorage.com --key some/path
{
“LastModified”: “Sat, 28 Jan 2023 16:22:11 GMT”,
“ETag”: “XXXXXX”,
“ContentType”: “application/geo+json”,
“Metadata”: {
“userID”: “YYYYYY”
}
}