File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/stac_auth_proxy/utils Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -58,23 +58,25 @@ async def transform_response(message: Message) -> None:
5858 # Delay sending start message until we've processed the body
5959 start_message = message
6060 return
61+
6162 assert start_message is not None
63+
64+ headers = MutableHeaders (scope = start_message )
65+
6266 if not self .should_transform_response (
6367 request = Request (scope ),
64- response_headers = Headers ( scope = start_message ) ,
68+ response_headers = headers ,
6569 ):
66- return await send (message )
67- if message [ "type" ] != "http.response.body" :
68- return await send ( message )
70+ await send (start_message )
71+ await send ( message )
72+ return
6973
7074 body += message ["body" ]
7175
7276 # Skip body chunks until all chunks have been received
7377 if message .get ("more_body" ):
7478 return
7579
76- headers = MutableHeaders (scope = start_message )
77-
7880 # Transform the JSON body
7981 if body :
8082 data = json .loads (body )
You can’t perform that action at this time.
0 commit comments