From cacce0493d4101a8894c72883e718c7bcfa3a2dd Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 23 Feb 2016 21:25:26 +0000 Subject: [PATCH] Make WebSockt upgrade header case insensitive --- daphne/http_protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index d8f66c9..8f33afb 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -44,7 +44,7 @@ class WebRequest(http.Request): if b"?" in self.uri: self.query_string = self.uri.split(b"?", 1)[1] # Is it WebSocket? IS IT?! - if upgrade_header == b"websocket": + if upgrade_header.lower() == b"websocket": # Make WebSocket protocol to hand off to protocol = self.factory.ws_factory.buildProtocol(self.transport.getPeer()) if not protocol: