From a2457b2488b5bca50bfa11d1ec80386e33a3a005 Mon Sep 17 00:00:00 2001 From: Ivanq Date: Sun, 8 Mar 2020 23:49:46 +0300 Subject: [PATCH] Forgot that Upgrade is case-insensitive --- src/lib/gevent_ws/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/gevent_ws/__init__.py b/src/lib/gevent_ws/__init__.py index 8ad741551..7309ad1c1 100644 --- a/src/lib/gevent_ws/__init__.py +++ b/src/lib/gevent_ws/__init__.py @@ -210,8 +210,8 @@ def handle_one_response(self): self.response_length = 0 - http_connection = [s.strip() for s in self.environ.get("HTTP_CONNECTION", "").split(",")] - if "Upgrade" not in http_connection or self.environ.get("HTTP_UPGRADE", "") != "websocket": + http_connection = [s.strip().lower() for s in self.environ.get("HTTP_CONNECTION", "").split(",")] + if "upgrade" not in http_connection or self.environ.get("HTTP_UPGRADE", "") != "websocket": # Not my problem return super(WebSocketHandler, self).handle_one_response()