blob: b0ba391664fb29137b5f368298dd74cee5128a2b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
--- contrib/python/boto/py3/boto/auth.py (index)
+++ contrib/python/boto/py3/boto/auth.py (working tree)
@@ -624,7 +624,7 @@ class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler):
def host_header(self, host, http_request):
port = http_request.port
secure = http_request.protocol == 'https'
- if ((port == 80 and not secure) or (port == 443 and secure)):
+ if ((port == 80 and not secure) or (port == 443 and secure) or (":" in http_request.host)):
return http_request.host
return '%s:%s' % (http_request.host, port)
|