1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #23173 -- Fixed incorrect stripping of SCRIPT_URL

This commit is contained in:
Bas Peschier
2015-03-08 15:06:23 +01:00
committed by Markus Holtermann
parent a5b225084f
commit 336512fae7
2 changed files with 13 additions and 2 deletions

View File

@@ -219,7 +219,7 @@ def get_script_name(environ):
if script_url:
path_info = get_bytes_from_wsgi(environ, 'PATH_INFO', '')
script_name = script_url[:-len(path_info)]
script_name = script_url[:-len(path_info)] if path_info else script_url
else:
script_name = get_bytes_from_wsgi(environ, 'SCRIPT_NAME', '')