Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.signedUrl does not produce a working URL #35

Closed
dustin opened this issue Jul 9, 2011 · 4 comments
Closed

client.signedUrl does not produce a working URL #35

dustin opened this issue Jul 9, 2011 · 4 comments

Comments

@dustin
Copy link

dustin commented Jul 9, 2011

get() works fine for me, but the URL produced from client.signedUrl gives me an error:

<Error>
  <Code>SignatureDoesNotMatch</Code>
  <Message>
    The request signature we calculated does not match the signature you provided. Check your key and signing method.
  </Message>
  <StringToSignBytes>
    47 45 54 0a 0a 0a 31 33 31 30 32 38 32 33 37 31 0a 2f 70 68 6f 74 6f 2e 77 65 73 74 2e 73 70 79 2e 6e 65 74 2f 6f 72 69 67 69 6e 61 6c 2f 30 35 2f 30 35 38 65 33 36 62 62 64 61 31 65 36 34 63 65 62 30 39 63 66 31 37 64 63 63 35 61 61 62 61 31 2e 6a 70 67
  </StringToSignBytes>
  <RequestId>742F2DC7510AEB55</RequestId>
  <HostId>
    WiEAw4VFA57d/SEGbiGlmKccSvBUv/JnED0YHqTesizK79/GMgHavQCWFgnkXblj
  </HostId>
  <SignatureProvided>fjsaPEGJcL4Kr+pIGz5txlDrOH0=</SignatureProvided>
  <StringToSign>
    GET 1310282371 /photo.west.spy.net/original/03/038e36b3da1e34ceb09cf17dcf5aaba1.jpg
  </StringToSign>
  <AWSAccessKeyId>0F4GCGJRS56V9XG6XJR2</AWSAccessKeyId>
</Error>
@seejohnrun
Copy link

Just spent a bit chasing this down. Make sure that you're using case-sensitive Content-Type. You can check for errors by comparing the returned StringToSign with the result of auth.js's #stringToSign

@nickretallack
Copy link

Oh dude, Content Type is case sensitive? That bit me too. It'd be nice if knox was smarter about this.

@peny
Copy link

peny commented May 30, 2012

Good to know:
Starting "/" is required even if the file is located in the root of your bucket.

@domenic
Copy link
Contributor

domenic commented Jul 16, 2012

Looks like this was solved. Let me know if you think Knox's handling here could be improved or better-documented.

@domenic domenic closed this as completed Jul 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants