Fixed #19468 -- Decoded request.path correctly on Python 3.

Thanks aliva for the report and claudep for the feedback.
This commit is contained in:
Aymeric Augustin 2012-12-17 10:49:26 +01:00
parent d9a0b6ab36
commit 1e4a27d087
6 changed files with 49 additions and 19 deletions

View file

@ -6,6 +6,7 @@ except ImportError: # Python 2
from urlparse import urlparse
from django.conf import settings
from django.core.handlers.base import get_path_info
from django.core.handlers.wsgi import WSGIHandler
from django.contrib.staticfiles import utils
@ -67,6 +68,6 @@ class StaticFilesHandler(WSGIHandler):
return super(StaticFilesHandler, self).get_response(request)
def __call__(self, environ, start_response):
if not self._should_handle(environ['PATH_INFO']):
if not self._should_handle(get_path_info(environ)):
return self.application(environ, start_response)
return super(StaticFilesHandler, self).__call__(environ, start_response)