ฉันใช้ nginx 1.2.3 เพื่อ proxy ไปยังสคริปต์:
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8880;
proxy_buffering off;
proxy_read_timeout 300s;
gzip off;
สคริปต์ส่งทั้งสองTransfer-encoding: chunked
และContent-Length: 251
:
HTTP/1.0 307 Temporary Redirect
Content-length: 251
Pragma: no-cache
Location: /...
Cache-control: no-cache
Transfer-encoding: chunked
ฉันต้องการทั้งสองอย่าง แต่ nginx ลบโดยอัตโนมัติContent-Length
:
HTTP/1.1 302 Found
Server: nginx/1.2.3
Content-Type: application/json; charset=utf-8
Content-Length: 58
Connection: keep-alive
Location: /...
เป็นผลให้ลูกค้าไม่รอให้ชิ้นที่จะส่ง สิ่งนี้เคยทำงานกับ nginx รุ่นก่อนหน้า