1
Vote

s3.exe Doesn't Send 'Authorization' Request Header on 307

description

When you make a put command for a new S3 bucket on a non-US region AWS will respond with a 307 to a temporary end point for a period of time

When s3.exe repeats it's request at the second end point it doesn't send the 'Authorization' header

Note: I've replace keys with fakes

E.g.

When I run this command

s3 put my-sea-bucket "C:\My folder*" /sync /acl:private /sub:withdelete /yes /key:SomeKey /secret:SomePrivateKey

Fiddler picks up these requests

s3.exe Says....
HEAD http://my-sea-bucket.s3.amazonaws.com/somefile.txt HTTP/1.1
x-amz-date: Tue, 29 Apr 2014 00:55:24 GMT
Authorization: AWS df523r4523rd3f23f234f
Host: cmsincludes-aspermontlimited.s3.amazonaws.com
Connection: Keep-Alive
AWS Responds...
HTTP/1.1 307 Temporary Redirect
x-amz-request-id: DF342342342342342
x-amz-id-2: dfewr34r3464tgfg34t45ty45g234g35g45g34
Location: http://my-sea-bucket.s3-ap-southeast-2.amazonaws.com/somefile.txt
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Tue, 29 Apr 2014 00:55:25 GMT
Server: AmazonS3
s3.exe tries again....
HEAD http://my-sea-bucket.s3-ap-southeast-2.amazonaws.com/somefile.txt HTTP/1.1
x-amz-date: Tue, 29 Apr 2014 00:55:24 GMT
Host: cmsincludes-aspermontlimited.s3-ap-southeast-2.amazonaws.com
AWS Responds...
HTTP/1.1 403 Forbidden
x-amz-request-id: F345345234512124
x-amz-id-2: fert35f456frsgergGG24r5est456w34r254524/4312
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Tue, 29 Apr 2014 00:55:26 GMT
Server: AmazonS3

comments