websocket: allow "websocket" in lowercase in Upgrade header (Google Chrome sends so)
This commit is contained in:

committed by
Sergey Shepelev

parent
bc796c4f65
commit
01690fc45b
@@ -40,7 +40,7 @@ class WebSocketWSGI(object):
|
||||
|
||||
def __call__(self, environ, start_response):
|
||||
if not (environ.get('HTTP_CONNECTION') == 'Upgrade' and
|
||||
environ.get('HTTP_UPGRADE') == 'WebSocket'):
|
||||
environ.get('HTTP_UPGRADE').lower() == 'websocket'):
|
||||
# need to check a few more things here for true compliance
|
||||
start_response('400 Bad Request', [('Connection','close')])
|
||||
return []
|
||||
|
Reference in New Issue
Block a user