Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e76cb19

Browse files
committed
minor patch
1 parent 019f4d3 commit e76cb19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def getPage(**kwargs):
225225

226226
headers[HTTPHEADER.HOST] = urlparse.urlparse(url).netloc
227227

228-
if headers[HTTPHEADER.HOST].endswith(':80'):
228+
if any(map(lambda x: headers[HTTPHEADER.HOST].endswith(':%d' % x), [80, 443])):
229229
headers[HTTPHEADER.HOST] = headers[HTTPHEADER.HOST].split(':')[0]
230230

231231
if auxHeaders:

0 commit comments

Comments
 (0)