Ticket #8490: 8490.diff
File 8490.diff, 1.1 KB (added by , 16 years ago) |
---|
-
django/core/handlers/wsgi.py
76 76 def __init__(self, environ): 77 77 script_name = base.get_script_name(environ) 78 78 path_info = force_unicode(environ.get('PATH_INFO', u'/')) 79 if not path_info :79 if not path_info or path_info == script_name: 80 80 # Sometimes PATH_INFO exists, but is empty (e.g. accessing 81 81 # the SCRIPT_NAME URL without a trailing slash). We really need to 82 82 # operate as if they'd requested '/'. Not amazingly nice to force 83 83 # the path like this, but should be harmless. 84 # 85 # Other times, path_info erroneously is the same as script_name. 86 # This occurs on subdirectories in lighttpd accessed without 87 # a trailing '/' and possibly under other situations. 84 88 path_info = u'/' 85 89 self.environ = environ 86 90 self.path_info = path_info