diff options
| author | Julien Phalip <jphalip@gmail.com> | 2013-03-31 00:54:52 -0700 |
|---|---|---|
| committer | Julien Phalip <jphalip@gmail.com> | 2013-04-01 12:04:44 -0700 |
| commit | 2f81a0ca6543f4f7b59bf6cd9aeb8ae87f1e968e (patch) | |
| tree | ff94dd3a365cf202ec6f07a693497fac64beb526 /django | |
| parent | 8c41bd93c2412ddeb9dbe8bd73e1d3c3427d171b (diff) | |
Fixed #20169 -- Ensured that the WSGI request's path is correctly based on the `SCRIPT_NAME` environment parameter or the `FORCE_SCRIPT_NAME` setting, regardless of whether or not those have a trailing slash. Thanks to bmispelon for the review.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/handlers/wsgi.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 78bf101e20..3c88aeac6d 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -137,7 +137,7 @@ class WSGIRequest(http.HttpRequest): path_info = '/' self.environ = environ self.path_info = path_info - self.path = '%s%s' % (script_name, path_info) + self.path = '%s/%s' % (script_name.rstrip('/'), path_info.lstrip('/')) self.META = environ self.META['PATH_INFO'] = path_info self.META['SCRIPT_NAME'] = script_name |
