0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00

Fixed #17550 -- Removed a workaround for a bug in flup 1.0.1.

This reverts commit 948a833eb7.

flup appears to be dead, and this fix breaks legitimate uses of Django.

Refs #8490.
This commit is contained in:
Aymeric Augustin 2013-03-24 10:57:38 +01:00
parent d384878cc1
commit f5dbb566ee

View File

@ -129,14 +129,11 @@ class WSGIRequest(http.HttpRequest):
def __init__(self, environ): def __init__(self, environ):
script_name = base.get_script_name(environ) script_name = base.get_script_name(environ)
path_info = base.get_path_info(environ) path_info = base.get_path_info(environ)
if not path_info or path_info == script_name: if not path_info:
# Sometimes PATH_INFO exists, but is empty (e.g. accessing # Sometimes PATH_INFO exists, but is empty (e.g. accessing
# the SCRIPT_NAME URL without a trailing slash). We really need to # the SCRIPT_NAME URL without a trailing slash). We really need to
# operate as if they'd requested '/'. Not amazingly nice to force # operate as if they'd requested '/'. Not amazingly nice to force
# the path like this, but should be harmless. # 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. See Django ticket #8490).
path_info = '/' path_info = '/'
self.environ = environ self.environ = environ
self.path_info = path_info self.path_info = path_info