Loading behave_utils/http.py +7 −2 Original line number Diff line number Diff line # Copyright 2021,2022 Dominik Sekotill <dom.sekotill@kodo.org.uk> # Copyright 2021-2023 Dominik Sekotill <dom.sekotill@kodo.org.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this Loading @@ -18,6 +18,8 @@ from urllib.parse import urlparse import requests.adapters from urllib3 import connection from urllib3 import connectionpool from urllib3.exceptions import LocationParseError from urllib3.exceptions import URLSchemeUnknown def redirect( Loading Loading @@ -59,10 +61,13 @@ class _DirectedAdapter(requests.adapters.HTTPAdapter): def get_connection(self, url: str, proxies: Mapping[str, str]|None = None) -> connectionpool.HTTPConnectionPool: parts = urlparse(url) if parts.hostname is None: raise LocationParseError(url) if parts.scheme == "https": return _HTTPSConnectionPool(parts.hostname, parts.port, address=self.destination) else: if parts.scheme == "http": return _HTTPConnectionPool(parts.hostname, parts.port, address=self.destination) raise URLSchemeUnknown(parts.scheme) def cert_verify( self, Loading Loading
behave_utils/http.py +7 −2 Original line number Diff line number Diff line # Copyright 2021,2022 Dominik Sekotill <dom.sekotill@kodo.org.uk> # Copyright 2021-2023 Dominik Sekotill <dom.sekotill@kodo.org.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this Loading @@ -18,6 +18,8 @@ from urllib.parse import urlparse import requests.adapters from urllib3 import connection from urllib3 import connectionpool from urllib3.exceptions import LocationParseError from urllib3.exceptions import URLSchemeUnknown def redirect( Loading Loading @@ -59,10 +61,13 @@ class _DirectedAdapter(requests.adapters.HTTPAdapter): def get_connection(self, url: str, proxies: Mapping[str, str]|None = None) -> connectionpool.HTTPConnectionPool: parts = urlparse(url) if parts.hostname is None: raise LocationParseError(url) if parts.scheme == "https": return _HTTPSConnectionPool(parts.hostname, parts.port, address=self.destination) else: if parts.scheme == "http": return _HTTPConnectionPool(parts.hostname, parts.port, address=self.destination) raise URLSchemeUnknown(parts.scheme) def cert_verify( self, Loading