mirror of
https://github.com/django/daphne.git
synced 2024-11-22 07:56:34 +03:00
Make WebSockt upgrade header case insensitive
This commit is contained in:
parent
07801e9ae8
commit
cacce0493d
|
@ -44,7 +44,7 @@ class WebRequest(http.Request):
|
||||||
if b"?" in self.uri:
|
if b"?" in self.uri:
|
||||||
self.query_string = self.uri.split(b"?", 1)[1]
|
self.query_string = self.uri.split(b"?", 1)[1]
|
||||||
# Is it WebSocket? IS IT?!
|
# Is it WebSocket? IS IT?!
|
||||||
if upgrade_header == b"websocket":
|
if upgrade_header.lower() == b"websocket":
|
||||||
# Make WebSocket protocol to hand off to
|
# Make WebSocket protocol to hand off to
|
||||||
protocol = self.factory.ws_factory.buildProtocol(self.transport.getPeer())
|
protocol = self.factory.ws_factory.buildProtocol(self.transport.getPeer())
|
||||||
if not protocol:
|
if not protocol:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user