jclouds/jclouds — pull request #628 by aledsage (2012-05-11 15:28:45+00:00)
Title: Issue-647: adding "Expires" header for ContentMetadata

I've made a start to this, but I don't think it's right yet.
I'll continue looking into this, but any advice gratefully received.

I've added Expires to org.jclouds.io.ContentMetadata, and to the various builders etc.

I ran the new test AWSS3ContainerLiveTest.testCreateBlobWithExpiry, and looked at the blob in the AWS console.
The blob had Metadata of "Expires", but the properties showed "Expiry Date" as None and the "Lifecycle Rule" as N/A.

I don't think it's being used correctly in the API call.

I've modeled "Expires" as a String:
* In http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21, the HTTP Expires header "MUST be in RFC 1123 date format".
* In http://awsdocs.s3.amazonaws.com/S3/latest/s3-dg.pdf, it gives an example of setting the 'Expires' header to 'Thu, 01 Dec 1994 16:00:00 GMT'
* The http://awsdocs.s3.amazonaws.com/S3/latest/s3-dg.pdf also shows setting 'Expires' in the query string of the URL.
This is in the section "Query String Request Authentication Alternative". I presume that is completed unrelated?
* In http://docs.amazonwebservices.com/AmazonS3/2006-03-01/API/RESTObjectPUT.html?r=364, it says the Expires header should be an int ("number of milliseconds before expiration").
Confusing...