uwsgi打破了标题

时间:2012-01-11 04:23:59

标签: http-headers nginx python-3.x uwsgi

我正在使用Nginx + uwsgi + python3

通过start_response发送任何标题都很顺利,但是当我想发送多个标题时,它会变得很疯狂。 例如,如果我写:

start_response('200 OK', [('Last-Modified', 'Wed, 11 Jan 2012 00:00:00 GMT'), ('Content-Type', 'text/html; charset=windows-1251')])

发送的标头是:

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Server: nginx/1.0.11
Connection: close
Date: Wed, 11 Jan 2012 04:17:22 GMT
Content-Type: text/html; charset=windows-1251
Content-Type: text/html; charset=windows-12

uwsgi两次发送相同的标题,第二个标题更多。

1 个答案:

答案 0 :(得分:0)

哪个uWSGI和nginx版本?在0.9.8.x和1.0.x中,我无法重现您的错误。

您可以使用--http / - http-socket

检查uWSGI发送的真实标头,并将其置于http模式
相关问题