I use nginx 1.2.3 to proxy to a script:
proxy_set_header Host $host; proxy_pass http://127.0.0.1:8880; proxy_buffering off; proxy_read_timeout 300s; gzip off;
The scripts sends both Transfer-encoding: chunked and Content-Length: 251:
HTTP/1.0 307 Temporary Redirect Content-length: 251 Pragma: no-cache Location: /... Cache-control: no-cache Transfer-encoding: chunked
I need both, but nginx automatically removes the 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: /...
As a result, the clients do not wait for the chunks to be sent. This used to work with an earlier version of nginx.