summaryrefslogtreecommitdiff
path: root/boto/auth.py
diff options
context:
space:
mode:
authorDaniel Lindsley <daniel@toastdriven.com>2013-06-12 13:56:54 -0700
committerDaniel Lindsley <daniel@toastdriven.com>2013-06-12 13:56:54 -0700
commit3f2b3386fee1f1ddb125d268080754f91cb765a9 (patch)
tree54a022d1ede8de3dfa126c314034341b54317d5f /boto/auth.py
parent816798e2e987e1c8ede7712d07248453c87efabd (diff)
downloadboto-3f2b3386fee1f1ddb125d268080754f91cb765a9.tar.gz
Safely re-introduced the change from SHA: dec541.
Diffstat (limited to 'boto/auth.py')
-rw-r--r--boto/auth.py5
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):