@@ -98,15 +98,14 @@ def _process_headers(headers: dict) -> Headers:
9898def prepare_response_headers (
9999 base_headers : dict [str , list [str ]], selected_encoding : str
100100) -> dict [str , list [str ]]:
101- """Prepare response headers and determine if compression should be used .
101+ """Prepare response headers with the selected compression encoding .
102102
103103 Args:
104- base_headers: Base response headers
105- selected_encoding: Selected compression encoding
106- compressed_size: Size of compressed content (if compression was attempted)
104+ base_headers: Base response headers.
105+ selected_encoding: Selected compression encoding.
107106
108107 Returns:
109- tuple[dict, bool]: Final headers and whether to use compression
108+ The final response headers with content-encoding set.
110109 """
111110 headers = base_headers .copy ()
112111
@@ -173,7 +172,8 @@ def __init__(
173172 """Initialize the WSGI application.
174173
175174 Args:
176- endpoints: A mapping of URL paths to service endpoints.
175+ endpoints: A mapping of URL paths to endpoints. Typically provided directly
176+ by generated code from the Connect Python plugin.
177177 interceptors: A sequence of interceptors to apply to the endpoints.
178178 read_max_bytes: Maximum size of request messages.
179179 compressions: Supported compression algorithms. If unset, defaults to gzip.
0 commit comments