修复_make_response()中自动设置host错误的bug

This commit is contained in:
g1879 2020-05-29 00:45:06 +08:00
parent d6465c412d
commit 09c98d8cf6

View File

@ -200,11 +200,11 @@ class SessionPage(object):
if 'referer' not in keys:
kwargs['headers']['Referer'] = self._url
if 'host' not in keys:
kwargs['headers']['Host'] = urlparse(self._url).hostname
kwargs['headers']['Host'] = urlparse(url).hostname
else:
kwargs['headers'] = self.session.headers
kwargs['headers']['Referer'] = self._url
kwargs['headers']['Host'] = urlparse(self._url).hostname
kwargs['headers']['Host'] = urlparse(url).hostname
try:
r = None