From 3ed7cbe2ed438e4d48bede9400f89a83a0d9736b Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 15 Apr 2019 17:03:36 +0200 Subject: [PATCH] Fix: Websocket detection case sensitive (#1040) --- hassio/api/ingress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hassio/api/ingress.py b/hassio/api/ingress.py index cabbb1fd5..788450439 100644 --- a/hassio/api/ingress.py +++ b/hassio/api/ingress.py @@ -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