4 ms·
actually, http headers are not that easy to send. how do you plan to create "content-length" header before rendering whole response?
by mstdokumaci 14y ago
actually, http headers are not that easy to send. how do you plan to create "content-length" header before rendering whole response?
- jgrahamc 14y agoTransfer-Encoding: chunked
- WALoeIII 14y agoThis 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.