get - Request authorization of Amazon Web Service -
i going through doc
the next code explains construction of authorization header:
authorization = "aws" + " " + awsaccesskeyid + ":" + signature; signature = base64( hmac-sha1( yoursecretaccesskeyid, utf-8-encoding-of( stringtosign ) ) ); stringtosign = http-verb + "\n" + content-md5 + "\n" + content-type + "\n" + date + "\n" + canonicalizedamzheaders + canonicalizedresource; canonicalizedresource = [ "/" + bucket ] + <http-request-uri, protocol name query string> + [ subresource, if present. illustration "?acl", "?location", "?logging", or "?torrent"]; canonicalizedamzheaders = <described below>
and, in authentication examples (for illustration object get), have showstringtosign
following:
get\n \n \n tue, 27 mar 2007 19:36:42 +0000\n /johnsmith/photos/puppy.jpg
my question:
why have used 3 \n
after get
? there reason behind that?
also, can write above code follows:
get\n \n \n tue, 27 mar 2007 19:36:42 gmt\n
think of "\n" separator. illustration sending empty content-md5
, content-type
, you'll see 3 \n
in row.
i don't know trying please maintain in mind aws sdks can handle request signature don't have to.
amazon-web-services get
No comments:
Post a Comment