Skip to content

Commit

Permalink
fix path_info encoding bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fuktommy committed May 2, 2014
1 parent 41aafe6 commit 2dc91b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shingetsu/LightCGIHTTPServer.py
Expand Up @@ -169,6 +169,8 @@ def run_cgi(self):
env['SERVER_PORT'] = str(self.server.server_port)
env['REQUEST_METHOD'] = self.command
uqrest = urllib.parse.unquote(rest)
if isinstance(uqrest, bytes):
uqrest = str(uqrest, 'utf-8', 'replace')
env['PATH_INFO'] = uqrest
env['PATH_TRANSLATED'] = self.translate_path(uqrest)
env['SCRIPT_NAME'] = scriptname
Expand Down

0 comments on commit 2dc91b9

Please sign in to comment.