mirror of https://github.com/scrapy/scrapy.git
Mock server: use 127.0.0.1 also for HTTPS
Windows throws an error about 0.0.0.0 being external: https://stackoverflow.com/a/23857995/939364
This commit is contained in:
parent
2f510fd47d
commit
94ee68695a
|
|
@ -218,9 +218,8 @@ class MockServer():
|
|||
self.proc.communicate()
|
||||
|
||||
def url(self, path, is_secure=False):
|
||||
host = self.http_address.replace('0.0.0.0', '127.0.0.1')
|
||||
if is_secure:
|
||||
host = self.https_address
|
||||
host = self.https_address if is_secure else self.http_address
|
||||
host = host.replace('0.0.0.0', '127.0.0.1')
|
||||
return host + path
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue