(self, host, port=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
source_address=None, blocksize=8192, *, max_response_headers=None)
| 888 | return None |
| 889 | |
| 890 | def __init__(self, host, port=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, |
| 891 | source_address=None, blocksize=8192, *, max_response_headers=None): |
| 892 | self.timeout = timeout |
| 893 | self.source_address = source_address |
| 894 | self.blocksize = blocksize |
| 895 | self.sock = None |
| 896 | self._buffer = [] |
| 897 | self.__response = None |
| 898 | self.__state = _CS_IDLE |
| 899 | self._method = None |
| 900 | self._tunnel_host = None |
| 901 | self._tunnel_port = None |
| 902 | self._tunnel_headers = {} |
| 903 | self._raw_proxy_headers = None |
| 904 | self.max_response_headers = max_response_headers |
| 905 | |
| 906 | (self.host, self.port) = self._get_hostport(host, port) |
| 907 | |
| 908 | self._validate_host(self.host) |
| 909 | |
| 910 | # This is stored as an instance variable to allow unit |
| 911 | # tests to replace it with a suitable mockup |
| 912 | self._create_connection = socket.create_connection |
| 913 | |
| 914 | def set_tunnel(self, host, port=None, headers=None): |
| 915 | """Set up host and port for HTTP CONNECT tunnelling. |
nothing calls this directly
no test coverage detected