mirror of
https://github.com/django/django.git
synced 2025-11-23 20:37:00 +00:00
Fixed #19468 -- Decoded request.path correctly on Python 3.
Thanks aliva for the report and claudep for the feedback.
This commit is contained in:
parent
d9a0b6ab36
commit
1e4a27d087
6 changed files with 49 additions and 19 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue