MCPcopy Index your code
hub / github.com/python/cpython / _create_https_context

Function _create_https_context

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

Source from the content-addressed store, hash-verified

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

Callers 1

__init__Method · 0.85

Calls 1

set_alpn_protocolsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…