Skip to content

Commit

Permalink
Merge pull request HelloZeroNet#2466 from imachug/websocket
Browse files Browse the repository at this point in the history
Fix websocket_client compatibility
  • Loading branch information
HelloZeroNet authored Mar 9, 2020
2 parents f2934c1 + a2457b2 commit 3426d5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/gevent_ws/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 3426d5f

Please sign in to comment.