mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40968: Send http/1.1 ALPN extension (#20959)
Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
09490a109f
commit
f97406be4c
5 changed files with 17 additions and 0 deletions
|
@ -1407,6 +1407,9 @@ else:
|
|||
self.cert_file = cert_file
|
||||
if context is None:
|
||||
context = ssl._create_default_https_context()
|
||||
# send ALPN extension to indicate HTTP/1.1 protocol
|
||||
if self._http_vsn == 11:
|
||||
context.set_alpn_protocols(['http/1.1'])
|
||||
# enable PHA for TLS 1.3 connections if available
|
||||
if context.post_handshake_auth is not None:
|
||||
context.post_handshake_auth = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue