Hacker News new | past | comments | ask | show | jobs | submit login

actually, http headers are not that easy to send. how do you plan to create "content-length" header before rendering whole response?

This is why nginx gzips the body before writing the headers out.

You can use 'chunked_transfer_encoding' to enable chunking, combined with 'proxy_buffering off', your backend can stream the body and nginx will gzip the chunks. Disabling buffering has other consequences, so be sure to read up and experiment before you go to production.

Transfer-Encoding: chunked

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact