---------- Forwarded message ----------
From: heng zhao <[email protected]>
Date: Mon, May 28, 2012 at 3:09 PM
Subject: Re: a problem when PATH_INFO == SCRIPT_NAME
To: [email protected]


I read the comment in  https://code.djangoproject.com/ticket/8490,  I
found someone met the same problem 3years ago. why don't merge it into
chunk?

On Mon, May 28, 2012 at 2:56 PM, heng zhao <[email protected]> wrote:
> I'm using Django-1.4 and nginx with fastcgi mode.
> when I use runserver  mode everything goes well,  But in nginx &
> fastcgi ,whatever URL i visit, I get a response "/"
> I trace the code and found that , when PATH_INFO == SCRIPT_NAME,
> path_info has been set to  u'/' (core/handlers/wsgi.py WSGIRequest
> __init__)
> so all the request redirect to /
> for example , I visit /foo/, nginx send a fastcgi request with
> PATH_INFO = ‘/foo/’ & SCRIPT_NAME = '/foo/' ,and Django redirect it
> to ‘/’
> I change :
>
>    if not path_info or path_info == script_name :
>            path_info = u'/'
> to:
>
>   if not path_info :
>            path_info = u'/'
>   if path_info == script_name:
>            script_name = u''
>
> I found this problem has been reported and fixed in
> https://code.djangoproject.com/ticket/8490,
> but he treat it in a strange way,  i'm still wondering it's a django bug or 
> not.
>
> excuse for my pool english :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en.

Reply via email to