websocket: allow "websocket" in lowercase in Upgrade header (Google Chrome sends so)

This commit is contained in:
Dmitry Orlov
2013-09-13 02:34:11 +04:00
committed by Sergey Shepelev
parent bc796c4f65
commit 01690fc45b

View File

@@ -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 []