From 8581192cadbac1a8b6dd61549f69796b3fa08aea Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 27 Apr 2016 09:44:46 +0100 Subject: [PATCH] Update path encoding for WebSockets --- daphne/ws_protocol.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daphne/ws_protocol.py b/daphne/ws_protocol.py index 94d9792..b0f0a52 100755 --- a/daphne/ws_protocol.py +++ b/daphne/ws_protocol.py @@ -88,14 +88,14 @@ class WebSocketProtocol(WebSocketServerProtocol): if isBinary: self.channel_layer.send("websocket.receive", { "reply_channel": self.reply_channel, - "path": self.path, + "path": self.unquote(self.path), "order": self.packets_received, "bytes": payload, }) else: self.channel_layer.send("websocket.receive", { "reply_channel": self.reply_channel, - "path": self.path, + "path": self.unquote(self.path), "order": self.packets_received, "text": payload.decode("utf8"), }) @@ -123,7 +123,7 @@ class WebSocketProtocol(WebSocketServerProtocol): del self.factory.reply_protocols[self.reply_channel] self.channel_layer.send("websocket.disconnect", { "reply_channel": self.reply_channel, - "path": self.path, + "path": self.unquote(self.path), "order": self.packets_received + 1, }) self.factory.log_action("websocket", "disconnected", {