Merge pull request #2466 from imachug/websocket

Fix websocket_client compatibility
This commit is contained in:
ZeroNet 2020-03-09 15:54:54 +01:00 committed by GitHub
commit 3426d5fe63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()