Hi,

I wrote a replacement for 'flup' to attach Django to IIS7 FastCGI. My
WSGI handler works OK with non-Django applications, but when I use
WSGIHandler from Django, I cannot resolve any URL under the root.
Problem, I believe, is in the following code:

In WSGIRequest.__init__
...
        if not path_info or path_info == script_name:
            # Sometimes PATH_INFO exists, but is empty (e.g. accessing
            # the SCRIPT_NAME URL without a trailing slash). We really
need to
            # operate as if they'd requested '/'. Not amazingly nice
to force
            # the path like this, but should be harmless.
            #
            # (The comparison of path_info to script_name is to work
around an
            # apparent bug in flup 1.0.1. Se Django ticket #8490).
            path_info = u'/'
        self.environ = environ
        self.path_info = path_info
        self.path = '%s%s' % (script_name, path_info)
...
In my case script_name is the same as path_info. This code sets
path_info to '/', later it tries to resolve it agains my rules in
urls.py, and expectedly fails. Which results in 404 for anything under
the root Url. Here is the code:

In BaseHandler.get_response
...
       try:
            callback, callback_args, callback_kwargs = resolver.resolve
(
                    request.path_info)
...
Here request.path_info is '/', somehow code tries to resolve it, but
not request.path.

How should I set environment parameters or urls.py patterns to get
through this issue?


Thanks,
Sergei


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to