ryan-roemer / node-sunny

Sunny.js cloud datastore client (AWS S3, Google Storage, etc.)
http://sunnyjs.org
MIT License
79 stars 13 forks source link

Wrong Canonical headers order for Google Storage #2

Closed severeon closed 13 years ago

severeon commented 13 years ago

http://code.google.com/apis/storage/docs/reference/v1/developer-guidev1.html#authentication

Google Storage needs the Canonical Headers in the following order: HTTP-Verb, Content-MD5, Content-Type, Date.

Currently Content-MD5 and Content-Type are transposed, causing google to issue a 'SignatureDoesNotMatch' error after the upload has completed.

ryan-roemer commented 13 years ago

Yep. And it's wrong for both AWS and GSFD. Fixed in v0.0.4 and added a regression test. Either update your source or pull v0.0.4 from NPM.

Thanks!