minor patch

This commit is contained in:
Miroslav Stampar 2011-06-22 09:11:12 +00:00
parent 019f4d344a
commit e76cb19e35

View File

@ -225,7 +225,7 @@ class Connect:
headers[HTTPHEADER.HOST] = urlparse.urlparse(url).netloc headers[HTTPHEADER.HOST] = urlparse.urlparse(url).netloc
if headers[HTTPHEADER.HOST].endswith(':80'): if any(map(lambda x: headers[HTTPHEADER.HOST].endswith(':%d' % x), [80, 443])):
headers[HTTPHEADER.HOST] = headers[HTTPHEADER.HOST].split(':')[0] headers[HTTPHEADER.HOST] = headers[HTTPHEADER.HOST].split(':')[0]
if auxHeaders: if auxHeaders: