mirror of
https://github.com/django/daphne.git
synced 2024-11-21 23:46:33 +03:00
Fix non-websocket connection header parsing
This commit is contained in:
parent
cacce0493d
commit
a683fecfa6
|
@ -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.lower() == b"websocket":
|
||||
if upgrade_header and upgrade_header.lower() == b"websocket":
|
||||
# Make WebSocket protocol to hand off to
|
||||
protocol = self.factory.ws_factory.buildProtocol(self.transport.getPeer())
|
||||
if not protocol:
|
||||
|
|
Loading…
Reference in New Issue
Block a user