Closed billatq closed 1 year ago
Looks like this is an easy fix:
if 'host' not in headers:
host, port = urlparse(req.url).netloc.split(':')
if (port == '80' or port == '443'):
headers['host'] = host
else:
headers['host'] = host + ":" + port
please fix it
this can be solved on the client side by specifying the host header
self.sess = requests.Session()
self.sess.auth = AWS4Auth(access_key, secret_key, '', 'rramp')
+ self.sess.headers['host'] = urlparse(self.host).netloc
@meox PRs are open.
This doesn't work correctly:
It should check to see if the port number is either 80 or 443 and include it if not.