Skip to content

Commit 948a833

Browse files
committed
Fixed #8490 -- Worked around a bug in flup 1.0.1 when working out the correct
path_info setting in the WSGI handler. Thanks, Mike Richardson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent f2b389b commit 948a833

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

django/core/handlers/wsgi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,14 @@ class WSGIRequest(http.HttpRequest):
7676
def __init__(self, environ):
7777
script_name = base.get_script_name(environ)
7878
path_info = force_unicode(environ.get('PATH_INFO', u'/'))
79-
if not path_info:
79+
if not path_info or path_info == script_name:
8080
# Sometimes PATH_INFO exists, but is empty (e.g. accessing
8181
# the SCRIPT_NAME URL without a trailing slash). We really need to
8282
# operate as if they'd requested '/'. Not amazingly nice to force
8383
# the path like this, but should be harmless.
84+
#
85+
# (The comparison of path_info to script_name is to work around an
86+
# apparent bug in flup 1.0.1. Se Django ticket #8490).
8487
path_info = u'/'
8588
self.environ = environ
8689
self.path_info = path_info

0 commit comments

Comments
 (0)