From 8ae74eae556120d3be3d04dcbeabba3619c8cca3 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 13 Oct 2007 02:57:57 +0000 Subject: [PATCH] Fixed #5738 -- Fixed bug with defective Unicode strings in a URL git-svn-id: http://code.djangoproject.com/svn/django/trunk@6475 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/handlers/modpython.py | 2 +- django/core/handlers/wsgi.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py index d4f5e55011..52419d9e6c 100644 --- a/django/core/handlers/modpython.py +++ b/django/core/handlers/modpython.py @@ -14,7 +14,7 @@ import os class ModPythonRequest(http.HttpRequest): def __init__(self, req): self._req = req - self.path = force_unicode(req.uri) + self.path = force_unicode(req.uri, errors='ignore') def __repr__(self): # Since this is called as part of error handling, we need to be very diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 16d1d822e0..95c5f9cbda 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -75,7 +75,7 @@ def safe_copyfileobj(fsrc, fdst, length=16*1024, size=0): class WSGIRequest(http.HttpRequest): def __init__(self, environ): self.environ = environ - self.path = force_unicode(environ['PATH_INFO']) + self.path = force_unicode(environ['PATH_INFO'], errors='ignore') self.META = environ self.method = environ['REQUEST_METHOD'].upper()