Forgot that Upgrade is case-insensitive

This commit is contained in:
Ivanq 2020-03-08 23:49:46 +03:00
parent a1c176bb3f
commit a2457b2488
1 changed files with 2 additions and 2 deletions

View File

@ -210,8 +210,8 @@ class WebSocketHandler(WSGIHandler):
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()