Try to decode URLs with utf-8 (Fixes #486)
This commit is contained in:
parent
79bfa9c1d3
commit
8db580abce
@ -38,6 +38,7 @@ import socketserver
|
|||||||
import ssl
|
import ssl
|
||||||
import subprocess
|
import subprocess
|
||||||
import threading
|
import threading
|
||||||
|
import urllib
|
||||||
import wsgiref.simple_server
|
import wsgiref.simple_server
|
||||||
import zlib
|
import zlib
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
@ -133,6 +134,12 @@ class RequestHandler(wsgiref.simple_server.WSGIRequestHandler):
|
|||||||
def log_message(self, *args, **kwargs):
|
def log_message(self, *args, **kwargs):
|
||||||
"""Disable inner logging management."""
|
"""Disable inner logging management."""
|
||||||
|
|
||||||
|
def get_environ(self):
|
||||||
|
env = super().get_environ()
|
||||||
|
# Parent class only tries latin1 encoding
|
||||||
|
env["PATH_INFO"] = urllib.parse.unquote(self.path.split("?", 1)[0])
|
||||||
|
return env
|
||||||
|
|
||||||
|
|
||||||
class Application:
|
class Application:
|
||||||
"""WSGI application managing collections."""
|
"""WSGI application managing collections."""
|
||||||
|
Loading…
Reference in New Issue
Block a user