We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
content-length
1 parent a500513 commit 3575cbaCopy full SHA for 3575cba
uvicorn/protocols/websockets/wsproto_impl.py
@@ -224,6 +224,7 @@ def send_500_response(self) -> None:
224
headers: list[tuple[bytes, bytes]] = [
225
(b"content-type", b"text/plain; charset=utf-8"),
226
(b"connection", b"close"),
227
+ (b"content-length", b"21"),
228
]
229
output = self.conn.send(wsproto.events.RejectConnection(status_code=500, headers=headers, has_body=True))
230
output += self.conn.send(wsproto.events.RejectData(data=b"Internal Server Error"))
0 commit comments