tickets: 285
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
285 | 2005-08-06 19:22:14 | 2011-09-28 16:12:16 | 2022-03-06 03:20:17.658682 | Accepted | closed | HTTP handling | defect | normal | 1.0-beta | worksforme | WSGIRequest should set request.path to full uri path | 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/}}}". | mtredinnick | rmunn@pobox.com | 0 | 1 | 0 | 0 | 0 | 0 |