Pylons/webob — Issue #29: Error when running as CGI script
Author: tarmiziaffandi
Created: 2012-02-12 18:37:55+00:00
State: open

The standard wsgiref package offers CGIHandler helper class to convert a WSGI application to a CGI script. However, converting a WebOb callback to a WSGI app with "wsgify" then to a CGI script produces an error. Executing the CGI script below results in a server error under Apache.

```python
#!/usr/bin/env python

from webob.dec import wsgify
from wsgiref.handlers import CGIHandler

@wsgify
def app(req):
pass

CGIHandler().run(app)
```