Fix: Websocket detection case sensitive
@@ -209,8 +209,8 @@ def _is_websocket(request: web.Request) -> bool:
headers = request.headers
if (
- headers.get(hdrs.CONNECTION) == "Upgrade"
- and headers.get(hdrs.UPGRADE) == "websocket"
+ headers.get(hdrs.CONNECTION, "").lower() == "upgrade"
+ and headers.get(hdrs.UPGRADE, "").lower() == "websocket"
):
return True
return False
