﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
285	WSGIRequest should set request.path to full uri path	rmunn@…	Malcolm Tredinnick	"Following the instructions at http://wiki.dreamhost.com/index.php/Django, I got Django running under FastCGI. But the login form points to the wrong URL: instead of pointing to http://django.example.com/django-admin.fcgi/admin/, it points to http://django.example.com/admin/.

The reason is found in {{{django/core/handlers/wsgi.py}}}, where the {{{WSGIRequest}}} class's {{{__init__()}}} sets {{{self.path}}} equal to {{{environ['PATH_INFO']}}}. The {{{request.path}}} value eventually makes its way to the login template, which uses ""{{{app_path}}}"" as the form submission URL.  In a CGI environment (including FastCGI), {{{PATH_INFO}}} contains the path referenced *after* the script name (here, ""{{{/admin/}}}""). {{{SCRIPT_NAME}}} contains the path to the script (here, ""{{{/django-admin.fcgi}}}"". To construct a proper self-referential URL, you need to concatenate {{{SCRIPT_NAME}}} and {{{PATH_INFO}}} to obtain, in this case, ""{{{/django-admin.fcgi/admin/}}}""."	defect	closed	HTTP handling	1.0-beta	normal	worksforme		sam@… remco@… cwebber@… djangotrac.285@… richard.davies@… Leo Soto M.	Accepted	1	0	0	0	0	0
