views:

47

answers:

1

In Amazon's S3 Management Console, I'm trying to add metadata, with the key being "Vary" and the value being "Accept-Encoding".

This seems to work, I hit save. But when I hit refresh it disappears, as if Amazon rejected the tag. The file in question is a gzip compressed javascript file.

My other headers are working and added properly (Content-Type, Cache-Control, etc.). I've tried adding the vary header with only a Content-Type header too and it fails in the same way.

+2  A: 

Given that S3 is going to serve up the exact same static blob no matter what, it doesn't really make sense to serve a Vary header, which tells the browser that the resource representation will vary depending on the request's content negotiation headers.

S3 doesn't do that, so it doesn't surprise me that they won't allow Vary headers to be set on an object.

friedo