Ticket #8490: wsgi_r11339.diff
File wsgi_r11339.diff, 1.1 KB (added by , 15 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 or path_info == script_name:79 if not path_info: 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 … … 84 84 # 85 85 # (The comparison of path_info to script_name is to work around an 86 86 # apparent bug in flup 1.0.1. Se Django ticket #8490). 87 path_info = u'/' 87 path_info = u'/' 88 if path_info == script_name: 89 script_name = u'' 88 90 self.environ = environ 89 91 self.path_info = path_info 90 92 self.path = '%s%s' % (script_name, path_info)