Commit 2fd7d55c authored by Denis Bilenko's avatar Denis Bilenko

make examples/wsgiserver.py to return the same replies as httpserver.py so...

make examples/wsgiserver.py to return the same replies as httpserver.py so that they can be tested with the same test
parent d0a738d5
......@@ -5,11 +5,11 @@ from gevent import wsgi
def hello_world(env, start_response):
if env['PATH_INFO'] == '/':
start_response('200 OK', [('Content-Type', 'text/plain')])
return ["Hello World!\r\n"]
start_response('200 OK', [('Content-Type', 'text/html')])
return ["<b>hello world</b>"]
else:
start_response('404 Not Found', [('Content-Type', 'text/plain')])
return ['Not Found\r\n']
start_response('404 Not Found', [('Content-Type', 'text/html')])
return ['<h1>Not Found</h1>']
print 'Serving on 8088...'
wsgi.WSGIServer(('', 8088), hello_world).serve_forever()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment