~mirtchovski/goamz/ec2

Viewing all changes in revision 11.

  • Committer: Gustavo Niemeyer
  • Author(s): James Henstridge
  • Date: 2012-07-19 13:58:26 UTC
  • mfrom: (10.1.2 goamz)
  • Revision ID: gustavo@niemeyer.net-20120719135826-pmmwamlhomkc3y37
s3: fix canonical path handling on signing

The Sign function was trying to reverse engineer the bucket name from the
Host header, which would result in incorrect signatures if it guessed wrong.

Since prepare knows the bucket and key name (and uses it to decide how to
set the host header and path), having it pass the canonical path to Sign
removes this failure condition, and removes the need for Sign to have
specific knowledge of Amazon and DreamHost host names.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: