Files
deb-python-falcon/tests/bare_bones.py
Kurt Griffiths e1d92ebd89 fix(Request): Improve support for content-length under wsgiref
Under wsgiref, if no content-length header is provided, an empty
string is inserted. Update falcon.Request to handle this case,
as well as to more gracefully handle the case that the header is
set to any invalid value.
2014-10-29 14:23:37 -05:00

21 lines
439 B
Python

import falcon
class Things(object):
def on_get(self, req, resp):
pass
api = application = falcon.API()
api.add_route('/', Things())
if __name__ == '__main__':
# import eventlet.wsgi
# import eventlet
# eventlet.wsgi.server(eventlet.listen(('localhost', 8000)), application)
from wsgiref.simple_server import make_server
server = make_server('localhost', 8000, application)
server.serve_forever()