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

Skip to content

Commit 99c1cc9

Browse files
committed
Fixes #1208
1 parent a19bccc commit 99c1cc9

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
@@ -332,7 +332,7 @@ def getPage(**kwargs):
332332
if HTTP_HEADER.ACCEPT not in headers:
333333
headers[HTTP_HEADER.ACCEPT] = HTTP_ACCEPT_HEADER_VALUE
334334

335-
if HTTP_HEADER.HOST not in headers:
335+
if HTTP_HEADER.HOST not in headers or not target:
336336
headers[HTTP_HEADER.HOST] = getHostHeader(url)
337337

338338
if HTTP_HEADER.ACCEPT_ENCODING not in headers:

0 commit comments

Comments
 (0)