From dec541f7e56506342394e466fa6e9d9805dd77fb Mon Sep 17 00:00:00 2001 From: Steve Jones Date: Thu, 6 Jun 2013 16:19:25 -0700 Subject: Preserve trailing / when canonicalizing URI path for signature V4 --- boto/auth.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'boto/auth.py') diff --git a/boto/auth.py b/boto/auth.py index cd7ac68f..80377fc3 100644 --- a/boto/auth.py +++ b/boto/auth.py @@ -388,6 +388,8 @@ class HmacAuthV4Handler(AuthHandler, HmacKeys): normalized = posixpath.normpath(http_request.auth_path) # Then urlencode whatever's left. encoded = urllib.quote(normalized) + if http_request.auth_path.endswith('/'): + encoded = encoded + '/' return encoded def payload(self, http_request): -- cgit v1.2.1