aboutsummaryrefslogtreecommitdiffstats
path: root/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'server.py')
-rw-r--r--server.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/server.py b/server.py
index 9e4f674..fc9d30e 100644
--- a/server.py
+++ b/server.py
@@ -195,6 +195,12 @@ def site_dispatch(env, start_response):
# correct malformed query string with ? separators instead of &
env['QUERY_STRING'] = env['QUERY_STRING'].replace('?', '&')
+ # Fix PATH_INFO for UWSGI
+ if 'REQUEST_URI' in env:
+ env['PATH_INFO'] = urllib.parse.unquote(
+ env['REQUEST_URI'].split('?')[0]
+ )
+
method = env['REQUEST_METHOD']
path = env['PATH_INFO']