Lawouach/WebSocket-for-Python — Issue #13: Server not handling "Upgrade" header case-insensitively, as it should
Author: ysangkok
Created: 2011-11-27 00:18:59+00:00
State: open

According to the standard draft 10 that the README says this server conforms to, the Upgrade header should be handled case-insensitively. Currently it is handled case-sensitively.

middleware.py:

def __call__(self, environ, start_response):
# Initial handshake validation
try:
if 'websocket' not in environ.get('upgrade.protocol', ''):
raise HandshakeError("Upgrade protocol is not websocket")