Django, LiteSpeed Context / External App Config, and PATH_INFO

First, I'm just getting started with LiteSpeed and enjoying the experience so far.

I was able to get a Django application running by setting up the External App, and Context for '/' as described in these forums.

When I did so, and tried to access the root of the site,, there would be an error similar to the one described in this ticket:

Looking through the debug information, the PATH_INFO variable was not getting through to Django. One of the fixes on the ticket checks whether or not it is set, and if it's not, sets the an internal path variable to '/'. The error went away after applying that patch.

I have no idea if this is an issue with LiteSpeed or Django, but I was curious if there was a setting in LiteSpeed that may be affecting the lack of PATH_INFO in Python's implementation of FastCGI. Nothing was apparent while poking around, so I'm assuming it's a quirk of the FastCGI libraries or Django's code, but I wanted to see if I could get more information.



LiteSpeed Staff
Thanks for the update.
Since there is no standard way to set PATH_INFO environment variable, some server set it for some application, some servers do not. The best way to fix it is to test PATH_INFO env in Python and set it to the desirable value if missing.
an approach that seems to work and doesn't involve changing Django core files is adding a middleware request class something like this:

class SetEmptyPathInfo(object): 
    def process_request(self, request): 
        if not request.path: 
            request.META['PATH_INFO'] = '/' 
            request.path = '/'