Skip to content

Commit 1fc2beb

Browse files
committed
cosmetic change
1 parent 3186a0d commit 1fc2beb

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

uvicorn/protocols/http/h11_impl.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@
2020
)
2121
from uvicorn.config import Config
2222
from uvicorn.logging import TRACE_LOG_LEVEL
23-
from uvicorn.protocols.http.flow_control import CLOSE_HEADER,HIGH_WATER_LIMIT,FlowControl, service_unavailable
24-
from uvicorn.protocols.utils import TLSInfo, get_client_addr, get_local_addr, get_path_with_query_string, get_remote_addr, get_tls_info, is_ssl
23+
from uvicorn.protocols.http.flow_control import CLOSE_HEADER, HIGH_WATER_LIMIT, FlowControl, service_unavailable
24+
from uvicorn.protocols.utils import (
25+
get_client_addr,
26+
get_local_addr,
27+
get_path_with_query_string,
28+
get_remote_addr,
29+
get_tls_info,
30+
is_ssl,
31+
)
2532
from uvicorn.server import ServerState
2633

2734

uvicorn/protocols/http/httptools_impl.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@
2222
from uvicorn.config import Config
2323
from uvicorn.logging import TRACE_LOG_LEVEL
2424
from uvicorn.protocols.http.flow_control import CLOSE_HEADER, HIGH_WATER_LIMIT, FlowControl, service_unavailable
25-
from uvicorn.protocols.utils import get_client_addr, get_local_addr, get_path_with_query_string, get_remote_addr, get_tls_info, is_ssl
25+
from uvicorn.protocols.utils import (
26+
get_client_addr,
27+
get_local_addr,
28+
get_path_with_query_string,
29+
get_remote_addr,
30+
get_tls_info,
31+
is_ssl,
32+
)
2633
from uvicorn.server import ServerState
2734

2835
HEADER_RE = re.compile(b'[\x00-\x1f\x7f()<>@,;:[]={} \t\\"]')

uvicorn/protocols/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def get_path_with_query_string(scope: WWWScope) -> str:
5858
return path_with_query_string
5959

6060

61-
def get_tls_info(transport: asyncio.Transport, server_config: Config) -> TLSExtensionInfo:
61+
def get_tls_info(transport: asyncio.Transport, config: Config) -> TLSExtensionInfo:
6262
###
6363
# server_cert: Unable to set from transport information, need to set from server_config
6464
# client_cert_chain:
@@ -73,7 +73,7 @@ def get_tls_info(transport: asyncio.Transport, server_config: Config) -> TLSExte
7373
"cipher_suite": None,
7474
}
7575

76-
ssl_info["server_cert"] = server_config.ssl_cert_pem
76+
ssl_info["server_cert"] = config.ssl_cert_pem
7777

7878
ssl_object = transport.get_extra_info("ssl_object")
7979
if ssl_object is not None:

0 commit comments

Comments
 (0)