Graham Dumpleton wrote:
> 
>> I also added a <pre>{{request}}</pre> to the base.html of the django
>> app. Here's the output of the request's SCRIPT_NAME for various urls:
>>
>> /studio   - u''
>> /studio/  - u'/studio'
>> /test     - '/test'
>> /test/    - '/test/'
> 
> Hmmm, that would suggest that it is Django that is changing it for
> some reason.

I believe it's a bug in Django:

http://code.djangoproject.com/browser/django/tags/releases/1.1.1/django/core/handlers/base.py#L204

Sadly, still there on the branch and trunk:

http://code.djangoproject.com/browser/django/branches/releases/1.1.X/django/core/handlers/base.py#L215
http://code.djangoproject.com/browser/django/trunk/django/core/handlers/base.py#L215

The problem is when PATH_INFO is empty, as it is in the top case. Python 
has no notion of positive or negative zero (;-)) so we end up returning 
script_url[:0]...

Now, I'm really curious that Karen says this works for her. Karen, can 
you have a look at what's different about your apache setup, as I can't 
see how this would ever correctly work for the "root url without the 
slash" case.

I have to admit, I can't see why the script name would ever need to be 
trimmed like that. Graham, perhaps you might be able to shed some light 
with your greater wsgi experience?

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk

--

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


Reply via email to