Allow string responses from controller methods

master
Dustin C. Hatch 2011-03-26 17:29:14 -05:00
parent 3df4e4c9ba
commit 5d4b1cf61f
1 changed files with 3 additions and 0 deletions

View File

@ -21,5 +21,8 @@ class Controller(object):
except webob.exc.WSGIHTTPException as e:
return e(environ, start_response)
if isinstance(response, basestring):
response = webob.Response(response)
start_response(response.status, response.headerlist)
return response.app_iter