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