| 1358 | class HTTPSHandler(AbstractHTTPHandler): |
| 1359 | |
| 1360 | def __init__(self, debuglevel=None, context=None, check_hostname=None): |
| 1361 | debuglevel = debuglevel if debuglevel is not None else http.client.HTTPSConnection.debuglevel |
| 1362 | AbstractHTTPHandler.__init__(self, debuglevel) |
| 1363 | if context is None: |
| 1364 | http_version = http.client.HTTPSConnection._http_vsn |
| 1365 | context = http.client._create_https_context(http_version) |
| 1366 | if check_hostname is not None: |
| 1367 | context.check_hostname = check_hostname |
| 1368 | self._context = context |
| 1369 | |
| 1370 | def https_open(self, req): |
| 1371 | return self.do_open(http.client.HTTPSConnection, req, |