Commit 6717aa8 1 parent accd5f8 commit 6717aa8 Copy full SHA for 6717aa8
File tree 2 files changed +7
-9
lines changed
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ class LifespanScope(TypedDict):
96
96
WWWScope = Union [HTTPScope , WebSocketScope ]
97
97
Scope = Union [HTTPScope , WebSocketScope , LifespanScope ]
98
98
99
+ class TLSInfo (TypedDict , total = False ):
100
+ type : Literal ["extensions.tls" ]
101
+ server_cert : str | None
102
+ client_cert_chain : list [str ]
103
+ tls_version : str | None
104
+ cipher_suite : str | None
99
105
100
106
class HTTPRequestEvent (TypedDict ):
101
107
type : Literal ["http.request" ]
Original file line number Diff line number Diff line change 3
3
import asyncio
4
4
import ssl
5
5
import urllib .parse
6
- from typing import TypedDict
7
6
8
- from uvicorn ._types import WWWScope
7
+ from uvicorn ._types import WWWScope , TLSInfo
9
8
from uvicorn .config import Config
10
9
11
10
@@ -59,13 +58,6 @@ def get_path_with_query_string(scope: WWWScope) -> str:
59
58
return path_with_query_string
60
59
61
60
62
- class TLSInfo (TypedDict , total = False ):
63
- server_cert : str | None
64
- client_cert_chain : list [str ]
65
- tls_version : str | None
66
- cipher_suite : str | None
67
-
68
-
69
61
def get_tls_info (transport : asyncio .Transport , server_config : Config ) -> TLSInfo :
70
62
###
71
63
# server_cert: Unable to set from transport information, need to set from server_config
You can’t perform that action at this time.
0 commit comments