MCPcopy Index your code
hub / github.com/RustPython/RustPython / _create_https_context

Function _create_https_context

Lib/http/client.py:826–836  ·  view source on GitHub ↗
(http_version)

Source from the content-addressed store, hash-verified

824
825
826def _create_https_context(http_version):
827 # Function also used by urllib.request to be able to set the check_hostname
828 # attribute on a context object.
829 context = ssl._create_default_https_context()
830 # send ALPN extension to indicate HTTP/1.1 protocol
831 if http_version == 11:
832 context.set_alpn_protocols(['http/1.1'])
833 # enable PHA for TLS 1.3 connections if available
834 if context.post_handshake_auth is not None:
835 context.post_handshake_auth = True
836 return context
837
838
839class HTTPConnection:

Callers 1

__init__Method · 0.85

Calls 1

set_alpn_protocolsMethod · 0.45

Tested by

no test coverage detected