Hi,

if the SCGI/AJP/mod_python app is mounted under /dynamic (http://.../dynamic)

and request URL is http://.../dynamic/test/

What should be the content if request.path?


With mod_python it is /dynamic/test/

With SCGI+WSCGI it is /test/


settings.APPEND_SLASH and other stuff don't work with WSCGI.

I think it would be right to prepend SCRIPT_NAME in request.path:

wsgi.py:

class WSGIRequest(http.HttpRequest):
    def __init__(self, environ):
        self.environ = environ
        
        # old self.path = force_unicode(environ['PATH_INFO'])
        self.path = force_unicode("%s%s" % (environ['SCRIPT_NAME'], 
environ['PATH_INFO']))
        
        self.META = environ
        self.method = environ['REQUEST_METHOD'].upper()

docs/request_response.txt
  path:  A string representing the full path to the requested page, not 
including the domain.

The docs should be more explicit here. The mod_python/wsgi/scgi mount point is 
part of the path
and it starts with a slash.

related: http://code.djangoproject.net/ticket/1516

 Thomas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
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