Ticket #5738: unicode_url_bug.patch

File unicode_url_bug.patch, 1.1 KB (added by Armin Ronacher, 17 years ago)

fix

  • django/core/handlers/wsgi.py

     
    7575class WSGIRequest(http.HttpRequest):
    7676    def __init__(self, environ):
    7777        self.environ = environ
    78         self.path = force_unicode(environ['PATH_INFO'])
     78        self.path = force_unicode(environ['PATH_INFO'], errors='ignore')
    7979        self.META = environ
    8080        self.method = environ['REQUEST_METHOD'].upper()
    8181
  • django/core/handlers/modpython.py

     
    1414class ModPythonRequest(http.HttpRequest):
    1515    def __init__(self, req):
    1616        self._req = req
    17         self.path = force_unicode(req.uri)
     17        self.path = force_unicode(req.uri, errors='ignore')
    1818
    1919    def __repr__(self):
    2020        # Since this is called as part of error handling, we need to be very
Back to Top