A very basic WSGI Handler for Mongrel2
Python
Permalink
Failed to load latest commit information.
logs Added logs and tmp directory. Updated README. Aug 3, 2010
run Added the BSD license statement. Aug 29, 2010
tmp Added logs and tmp directory. Updated README. Aug 3, 2010
LICENSE Added the BSD license statement. Aug 29, 2010
README No commit message Sep 3, 2010
__init__.py Working version of a basic WSGI handler for Mongrel2. Aug 3, 2010
config.py
test_wsgi_app.py
wsgi-handler.py
wsgi.sqlite

README

## Basic WSGI Handler for Mongrel2

By: berry.groenendijk@gmail.com
Date: 3 August 2010

This is a very basic WSGI Handler for Mongrel2 (http://mongrel2.org/home). It is based on SimpleHandler from de wsgi reference implementation in Python 2.6 or higher.

The code currently handles a couple of simple WSGI application. It also handles a demo Django WSGI application, see http://github.com/berry/Django-demo.

Known issues:
- this wsgi handler currently doesn't support chunked responses. I haven't figured out yet how to do this.
- [26 aug 2010] since mongrel2 1.0beta1 the wsgi handler doesn't cookies correctly. 
- [26 aug 2010] since mongrel2 1.0beta1 some HTTP posts cause a bad request error. Other HTTP posts do work however.
- [26 aug 2010] since mongrel2 1.0beta1 redirects generated by Django will fail.
- [3 sept 2010] HTTP_HOST header seems to be missing. Django expects it. Need to investigate.

Status of the WSGI handler as of august 2010: only basic simple WSGI applications seems to work correctly. 

Fixed issues:
- [FIXED 4 aug 2010] the handler does not handle query strings correctly right now. Still have to fix and test this.
- [UGLY FIX 4 aug 2010 - Removing BOM(s) before returning the response] Using the Django demo app I get some strange HTML parsing errors in Chrome. It says "Extra <html> encountered...". Which leads to a couple a follow up parsing errors. It apparently has something to do with unicode and a BOM being present in the response data. Strange. Hmmm, the Django development server (./manage runserver) has the same problem.