Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 019f4d3 commit e76cb19Copy full SHA for e76cb19
1 file changed
lib/request/connect.py
@@ -225,7 +225,7 @@ def getPage(**kwargs):
225
226
headers[HTTPHEADER.HOST] = urlparse.urlparse(url).netloc
227
228
- if headers[HTTPHEADER.HOST].endswith(':80'):
+ if any(map(lambda x: headers[HTTPHEADER.HOST].endswith(':%d' % x), [80, 443])):
229
headers[HTTPHEADER.HOST] = headers[HTTPHEADER.HOST].split(':')[0]
230
231
if auxHeaders:
0 commit comments