Skip to content

Commit

Permalink
Don't include some params into signpath while preparing request.
Browse files Browse the repository at this point in the history
These params would be added automatically by sign function from sign.go.
  • Loading branch information
smira committed Oct 1, 2014
1 parent f3406b0 commit db77339
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
16 changes: 0 additions & 16 deletions s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,22 +706,6 @@ func (s3 *S3) prepare(req *request) error {
req.path = "/" + req.path
}
req.signpath = req.path
// signpath includes subresource, if present: "?acl", "?delete", "?location", "?logging", or "?torrent"
if req.params["acl"] != nil {
req.signpath += "?acl"
}
if req.params["delete"] != nil {
req.signpath += "?delete"
}
if req.params["location"] != nil {
req.signpath += "?location"
}
if req.params["logging"] != nil {
req.signpath += "?logging"
}
if req.params["torrent"] != nil {
req.signpath += "?torrent"
}

if req.bucket != "" {
req.baseurl = s3.Region.S3BucketEndpoint
Expand Down
1 change: 1 addition & 0 deletions s3/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var b64 = base64.StdEncoding

var s3ParamsToSign = map[string]bool{
"acl": true,
"delete": true,
"location": true,
"logging": true,
"notification": true,
Expand Down

0 comments on commit db77339

Please sign in to comment.