bucket.Put with object keys with spaces fails (fix included)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
goamz |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The s3 request signing process signs a payload with an unescaped path. When amazon checks the signature, it does so on an escaped version of the path (containing the object key/name). All put requests with spaces in object keys fail with "The request signature we calculated does not match the signature you provided. Check your key and signing method.".
The fix I am using now is to escape "canonicalPath" var before passing it to the sign function. A diff of the fix below:
=== modified file 's3/s3.go'
--- s3/s3.go 2012-07-19 13:51:13 +0000
+++ s3/s3.go 2012-12-06 16:49:38 +0000
@@ -396,6 +396,7 @@
if err != nil {
}
+ canonicalPath = (&url.URL{Path: canonicalPath}
summary: |
- bucket.Put with object keys with spaces fails + bucket.Put with object keys with spaces fails (fix included) |
Changed in goamz: | |
status: | New → Confirmed |
The suggested fix resolves the issue for me.