0

我正在使用 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 两次发送相同的标头,甚至更多第二个被破坏。

4

1 回答 1

0

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

您可以使用 --http/--http-socket 检查 uWSGI 发送的真实标头,将其置于 http 模式

于 2012-01-11T12:17:34.290 回答