Skip to content

Commit

Permalink
Use the params arg to AWSAuthConnection.make_request
Browse files Browse the repository at this point in the history
Adding the params to the uri arg will cause the sigv4
signer to create the wrong canonical string.  By explicitly
passing the params as a separate arg, the sigv4 signer can
do the right thing.

Previously this would cause signature errors.
  • Loading branch information
jamesls committed Sep 19, 2012
1 parent adb238e commit 5672c19
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions boto/glacier/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,8 @@ def make_request(self, verb, resource, headers=None,
headers = {}
headers['x-amz-glacier-version'] = self.Version
uri = '/%s/%s' % (self.account_id, resource)
if params:
param_list = []
for key, value in params:
param_list.append('%s=%s' % (urllib.quote(key),
urllib.quote(value)))
uri += '?' + '&'.join(param_list)
response = AWSAuthConnection.make_request(self, verb, uri,
params=params,
headers=headers,
data=data)
if response.status in ok_responses:
Expand Down

0 comments on commit 5672c19

Please sign in to comment.