would it be possible to add support for setting cache expiration headers when PUTting files?
thanks for this awesome utility!
I have very limited Python knowledge, but managed to insert the "Expires" header by editing S3/S3.py
Right after line 169 (headers["content-length"] = size") I added the following line:
headers["Expires"] = "Fri, 28 Nov 2008 18:15:05 GMT"
I know this isn't much flexible, but it works for me. It should be possible to add it through the command line arguments, but my Pyhon skills does not reach so far :-p
I wonder what is it good for? What's the use case that requires Expires header?
ive been using cloudfront, and syncing images from my local server to a S3 origin bucket. being able to add an expires (or any other custom header) through s3cmd would make the cacheability greater according to this (http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?Expiration.html).
ive been looking through the source, and it seems that the framework to add custom headers is partly there, though all that would be needed is a command line option
Log in to post a comment.