diff options
author | Daniel Lindsley <daniel@toastdriven.com> | 2013-06-12 13:56:54 -0700 |
---|---|---|
committer | Daniel Lindsley <daniel@toastdriven.com> | 2013-06-12 13:56:54 -0700 |
commit | 3f2b3386fee1f1ddb125d268080754f91cb765a9 (patch) | |
tree | 54a022d1ede8de3dfa126c314034341b54317d5f /boto/auth.py | |
parent | 816798e2e987e1c8ede7712d07248453c87efabd (diff) | |
download | boto-3f2b3386fee1f1ddb125d268080754f91cb765a9.tar.gz |
Safely re-introduced the change from SHA: dec541.
Diffstat (limited to 'boto/auth.py')
-rw-r--r-- | boto/auth.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/boto/auth.py b/boto/auth.py index cd7ac68f..0aa299f9 100644 --- a/boto/auth.py +++ b/boto/auth.py @@ -384,10 +384,13 @@ class HmacAuthV4Handler(AuthHandler, HmacKeys): return ';'.join(l) def canonical_uri(self, http_request): + path = http_request.auth_path # Normalize the path. - normalized = posixpath.normpath(http_request.auth_path) + normalized = posixpath.normpath(path) # Then urlencode whatever's left. encoded = urllib.quote(normalized) + if len(path) > 1 and path.endswith('/'): + encoded += '/' return encoded def payload(self, http_request): |