#5320: request.path doesn't work properly under fastcgi
------------------------------------+---------------------------------------
Reporter: julian | Owner: mtredinnick
Status: new | Component: HTTP handling
Version: SVN | Resolution:
Keywords: request path fastcgi | Stage: Unreviewed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------------------+---------------------------------------
Changes (by ubernostrum):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> hi,
>
> my django-app runs under www.domain.com/appl/ with fastcgi.
>
> the output of "request.path" in a view called for ^$ is just "/" not
> "/appl/" as it should be...reproduce it:
>
> urls.py:
> from django.conf.urls.defaults import *
> from appl.views import start
>
> urlpatterns = patterns('',
> (r'^', start),
> )
>
> views.py:
> from django.shortcuts import render_to_response
>
> def start(request):
> return render_to_response('base.html',{'path':request.path})
>
> base.html:
> {{path}}
>
> running with fastcgi under www.domain.com/appl/ returns:
>
> /
>
> but should
>
> /appl/
>
> I know this can be solved with a rewrite-rule in a .htaccess, but this
> shouldn't be the proper way to fix bugs.
New description:
hi,
my django-app runs under www.domain.com/appl/ with fastcgi.
the output of "request.path" in a view called for `^$` is just "/" not
"/appl/" as it should be...reproduce it:
urls.py:
{{{
from django.conf.urls.defaults import *
from appl.views import start
urlpatterns = patterns('',
(r'^', start),
)
}}}
views.py:
{{{
from django.shortcuts import render_to_response
def start(request):
return render_to_response('base.html',{'path':request.path})
}}}
base.html:
{{{
{{path}}
}}}
running with fastcgi under www.domain.com/appl/ returns:
/
but should
/appl/
I know this can be solved with a rewrite-rule in a .htaccess, but this
shouldn't be the proper way to fix bugs.
Comment:
(cleaning up formatting)
--
Ticket URL: <http://code.djangoproject.com/ticket/5320#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---