diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index 79e39bc..2c1ec97 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -4,7 +4,7 @@ import logging import six import time -from six.moves.urllib_parse import unquote_plus +from six.moves.urllib_parse import unquote from twisted.protocols.policies import ProtocolWrapper from twisted.web import http @@ -124,9 +124,9 @@ class WebRequest(http.Request): Python 2 and 3 compat layer for utf-8 unquoting """ if six.PY2: - return unquote_plus(value).decode("utf8") + return unquote(value).decode("utf8") else: - return unquote_plus(value.decode("ascii")) + return unquote(value.decode("ascii")) def send_disconnect(self): """ diff --git a/daphne/ws_protocol.py b/daphne/ws_protocol.py index b0f0a52..5794e7a 100755 --- a/daphne/ws_protocol.py +++ b/daphne/ws_protocol.py @@ -4,7 +4,7 @@ import logging import six import time import traceback -from six.moves.urllib_parse import unquote_plus, urlencode +from six.moves.urllib_parse import unquote, urlencode from autobahn.twisted.websocket import WebSocketServerProtocol, WebSocketServerFactory @@ -68,9 +68,9 @@ class WebSocketProtocol(WebSocketServerProtocol): Python 2 and 3 compat layer for utf-8 unquoting """ if six.PY2: - return unquote_plus(value).decode("utf8") + return unquote(value).decode("utf8") else: - return unquote_plus(value.decode("ascii")) + return unquote(value.decode("ascii")) def onOpen(self): # Send news that this channel is open