Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A very basic WSGI Handler for Mongrel2
Branch: master
Failed to load latest commit information.


## Basic WSGI Handler for Mongrel2

Date: 3 August 2010

This is a very basic WSGI Handler for Mongrel2 ( 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

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.
Something went wrong with that request. Please try again.