Upgrade gevent-ws to v2.0.5

This commit is contained in:
Ivanq 2020-03-16 20:50:10 +03:00
parent faa24a8b41
commit d3d18234df
1 changed files with 8 additions and 1 deletions

View File

@ -211,7 +211,7 @@ class WebSocketHandler(WSGIHandler):
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":
if "upgrade" not in http_connection or self.environ.get("HTTP_UPGRADE", "").lower() != "websocket":
# Not my problem
return super(WebSocketHandler, self).handle_one_response()
@ -259,3 +259,10 @@ class WebSocketHandler(WSGIHandler):
def process_result(self):
if "wsgi.websocket" not in self.environ:
super(WebSocketHandler, self).process_result()
@property
def version(self):
if not self.environ:
return None
return self.environ.get('HTTP_SEC_WEBSOCKET_VERSION')