summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-26 02:42:39 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-26 02:42:39 +0000
commit948a833eb7fd9be0bc2d585c92a407f036ef42b2 (patch)
tree2afa11d1aaf994c68c72e8261ac8dae55b80455d
parentf2b389b354165cceb578aa3b13bec88f0e44c654 (diff)
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
-rw-r--r--django/core/handlers/wsgi.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index d1336b33be..765600de95 100644
--- a/django/core/handlers/wsgi.py
+++ b/django/core/handlers/wsgi.py
@@ -76,11 +76,14 @@ class WSGIRequest(http.HttpRequest):
def __init__(self, environ):
script_name = base.get_script_name(environ)
path_info = force_unicode(environ.get('PATH_INFO', u'/'))
- if not path_info:
+ if not path_info or path_info == script_name:
# Sometimes PATH_INFO exists, but is empty (e.g. accessing
# the SCRIPT_NAME URL without a trailing slash). We really need to
# operate as if they'd requested '/'. Not amazingly nice to force
# the path like this, but should be harmless.
+ #
+ # (The comparison of path_info to script_name is to work around an
+ # apparent bug in flup 1.0.1. Se Django ticket #8490).
path_info = u'/'
self.environ = environ
self.path_info = path_info