Commit 777535e6 authored by Ruben De Visscher's avatar Ruben De Visscher

Don't pass encoding to unquote on Python 2 since it is not supported there.

parent 84c89421
......@@ -16,6 +16,7 @@ import sys
import time
import traceback
from datetime import datetime
try:
from urllib import unquote
except ImportError:
......@@ -26,6 +27,12 @@ import gevent
from gevent.server import StreamServer
from gevent.hub import GreenletExit, PY3, reraise
from functools import partial
if PY3:
unquote_latin1 = partial(unquote, encoding='latin-1')
else:
unquote_latin1 = unquote
_no_undoc_members = True # Don't put undocumented things into sphinx
__all__ = [
......@@ -949,7 +956,7 @@ class WSGIHandler(object):
path, query = self.path.split('?', 1)
else:
path, query = self.path, ''
env['PATH_INFO'] = unquote(path, encoding='latin-1')
env['PATH_INFO'] = unquote_latin1(path)
env['QUERY_STRING'] = query
if self.headers.typeheader is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment