clean up auth and allow specifying request parameters #41

Open
wants to merge 3 commits into
from

1 participant

@lukfugl

See commit messages for details. Out immediate use case is being able to specify response-content-disposition when generating our S3 GET urls. I noticed the auth deficiencies while adding that.

lukfugl added some commits Oct 21, 2011
@lukfugl lukfugl fix canonicalized request in authentication
see

http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html#ConstructingTheCanonicalizedResourceElement

the calculation of the canonicalized resource was not quite right. the
problems were:

 * only one significant parameter (the first) was included
 * values of significant parameters were excluded
 * not all significant parameters were considered
7daf78e
@lukfugl lukfugl allow request parameters to S3Object.url_for
see

http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?RESTObjectGET.html

the response-content-type, response-content-language, response-expires,
response-cache-control, response-content-disposition, and
response-content-encoding request parameters can be supplied to control
the response headers of an S3 GET request. allow providing these to
S3Object.url_for and have them included in the URL. bring along the
other recognized parameters as well, while we're at it.

also, make sure these parameters make it into the canonicalized request
for authentication
f1a4192
@lukfugl lukfugl don't cut off options between url_for and building canonical request 3ddcae6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment