Skip to content

Commit 3426d5f

Browse files
authored
Merge pull request HelloZeroNet#2466 from imachug/websocket
Fix websocket_client compatibility
2 parents f2934c1 + a2457b2 commit 3426d5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/gevent_ws/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ def handle_one_response(self):
210210
self.response_length = 0
211211

212212

213-
http_connection = [s.strip() for s in self.environ.get("HTTP_CONNECTION", "").split(",")]
214-
if "Upgrade" not in http_connection or self.environ.get("HTTP_UPGRADE", "") != "websocket":
213+
http_connection = [s.strip().lower() for s in self.environ.get("HTTP_CONNECTION", "").split(",")]
214+
if "upgrade" not in http_connection or self.environ.get("HTTP_UPGRADE", "") != "websocket":
215215
# Not my problem
216216
return super(WebSocketHandler, self).handle_one_response()
217217

0 commit comments

Comments
 (0)