Windows support of FastCGI feature
|Reported by:||anonymous||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Django FastCGI cannot be used on Windows, and possibly other non-Unix environments.
Currently the FastCGI feature of Django (manage.py runfcgi) relies on the Python library 'flup', which relies on Unix-only socket functions (socket.socketpair(), socket.fromfd(), etc.) making it impossible to use the FastCGI feature of Django on non-Unix envs like Windows, and hence, making it impossible to serve Django with non-Apache (non-mod_python) httpds like lighttpd on non-Unix envs.
Possible solutions: The function socketpair() is unofficially implemented on Windows by a recipe. (http://code.activestate.com/recipes/525487/) Committing this patch to the flup project is not a hard work. However, the function fromfd() has nothing like that. There is a patch enabling its Windows use (http://bugs.python.org/issue1378) but the patch is not yet applied on the Windows release, even on Python 2.6b2. Rewriting the FastCGI feature with python-fastcgi (http://pypi.python.org/pypi/python-fastcgi) could be a more work than flup, but then the feature can support Windows.
Unix environments, especially GNU/Linux, is of course better than Windows to be used as a web server, but there are some situations where Windows and FastCGI have to be used. It would be good to have Django FastCGI available on Windows.