diff options
author | Phillip J. Eby <pje@telecommunity.com> | 2010-11-03 22:39:01 (GMT) |
---|---|---|
committer | Phillip J. Eby <pje@telecommunity.com> | 2010-11-03 22:39:01 (GMT) |
commit | b6d4a8e4de715d7a7f1fa009f5b636643e76e292 (patch) | |
tree | 8c3d0f29582a9191fe4819b2e25f843e7228fa5d /Lib/wsgiref/simple_server.py | |
parent | 3c6830ca8f406e4a18843aa15186048877555e45 (diff) | |
download | cpython-b6d4a8e4de715d7a7f1fa009f5b636643e76e292.zip cpython-b6d4a8e4de715d7a7f1fa009f5b636643e76e292.tar.gz cpython-b6d4a8e4de715d7a7f1fa009f5b636643e76e292.tar.bz2 |
Implement http://bugs.python.org/issue10155 using And Clover's patch, w/added
docs and support for more client-generated CGI variables. (This should
complete the WSGI 1.0.1 compliance changes for Python 3.x.)
Diffstat (limited to 'Lib/wsgiref/simple_server.py')
-rw-r--r-- | Lib/wsgiref/simple_server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/wsgiref/simple_server.py b/Lib/wsgiref/simple_server.py index 550f4d8..af82f95 100644 --- a/Lib/wsgiref/simple_server.py +++ b/Lib/wsgiref/simple_server.py @@ -15,7 +15,7 @@ import sys import urllib.parse from wsgiref.handlers import SimpleHandler -__version__ = "0.1" +__version__ = "0.2" __all__ = ['WSGIServer', 'WSGIRequestHandler', 'demo_app', 'make_server'] @@ -74,13 +74,14 @@ class WSGIRequestHandler(BaseHTTPRequestHandler): def get_environ(self): env = self.server.base_environ.copy() env['SERVER_PROTOCOL'] = self.request_version + env['SERVER_SOFTWARE'] = self.server_version env['REQUEST_METHOD'] = self.command if '?' in self.path: path,query = self.path.split('?',1) else: path,query = self.path,'' - env['PATH_INFO'] = urllib.parse.unquote(path) + env['PATH_INFO'] = urllib.parse.unquote_to_bytes(path).decode('iso-8859-1') env['QUERY_STRING'] = query host = self.address_string() |