Remove object headers, specifically "last-modified"

Aug 30, 2010 at 5:21 PM

We are using S3 in place of a CDN, and your standalone .EXE in our build process to deploy static assets to S3. It would be great if we had some more control over the headers for objects. Specifically, we want to remove the last-modified header. It is reset every time we build, so it can change for a file whose contents have not been modified.

Can this be added, or can someone point me to a way to do this? I Googled and also looked around in the S3 API. I didn't see a way to modify headers.

Coordinator
Sep 2, 2010 at 1:42 PM

How about using the /sync option to skip uploading files that haven't changed?  I think that gives you what you're looking for as well as avoiding unnecessary uploads.

Sep 2, 2010 at 6:24 PM

Hey maxc,

Thank you for replying. Looking in the Put class, it looks like /sync uses the last modified date to determine whether or not a file needs to be uploaded, as well.

When using /sync with /big it uses an MD5 hash, which would be perfect. I actually wanted to copy that logic to sync && !big, but haven't had the time in the past couple of weeks. You're right, though, if unchanged files are never uploaded, we don't have to worry about last modified headers.

Coordinator
Sep 3, 2010 at 1:12 AM

Oh yes, that's a bit of a mess at the moment.  There really ought to be a separate option to specify whether to use MD5 or dates globally.