Uvicorn assumes that HTTPResponseStartEvent.headers
is a List
#1779
Answered
by
Kludex
rijenkii
asked this question in
Potential Issue
-
According to the spec and asgiref, But, if headers: dict
await send({
"type": "http.response.start",
"status": status,
"headers": headers.items(),
}) Uvicorn fails with
Relevant Uvicorn code: uvicorn/uvicorn/protocols/http/h11_impl.py Lines 471 to 474 in 782f17e Potential fix may just be this: message_headers = list(message.get("headers", [])) |
Beta Was this translation helpful? Give feedback.
Answered by
Kludex
Nov 27, 2022
Replies: 1 comment 1 reply
-
PR welcome. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rijenkii
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PR welcome.