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

Skip to content

Commit b16b92f

Browse files
committed
minor update
1 parent 2220afb commit b16b92f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/request/connect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ def getPage(**kwargs):
225225

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

228+
if headers[HTTPHEADER.HOST].endswith(':80'):
229+
headers[HTTPHEADER.HOST] = headers[HTTPHEADER.HOST].split(':')[0]
230+
228231
if auxHeaders:
229232
for key, item in auxHeaders.items():
230233
headers[key] = item

0 commit comments

Comments
 (0)