14-fix-auth-v4-host_header.patch 581 B

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