linux安装uwsgi后运行hello world测试用例不输出hello world

说明:转载自https://blog.csdn.net/zhangmingbao2016/article/details/79615121

原因:测试用例对于python2.x 和 python3.x的写法不同。 
python2.x请用一下用例测试:

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return "Hello World"


python3.x请用一下用例测试:

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return [b"Hello World"]

猜你喜欢

转载自blog.csdn.net/cckavin/article/details/85164676
今日推荐