How nignx handled the header to the client in this situation

Francis Daly francis at
Sat May 16 12:11:36 UTC 2020

On Fri, May 15, 2020 at 11:09:53PM -0400, allenhe wrote:

Hi there,

> w.r.t. the "", the doc does not mention if
> the buffering works for header, body or both,

It's "the response".

It sounds like it should be fairly straightforward to test on your setup,
if you want to convince yourself what it does -- make an upstream that
receives a request, waits 5 second, sends the response header, waits 10
seconds, sends some of the response body, waits 10 seconds, and sends
the rest of the response body.

Then make a request directly to that upstream, and see that you see
something after 5, 15, and 25 seconds.

Then make a request through nginx, and see if you see anything before
25 seconds (all buffered); or see something after 5 seconds (header sent
early) or after 15 (header and start of body sent early).

> I'm wondering if nginx can
> postpone the sending of upstream header in any ways?

Can you show the request that you make and the response that you get
that is not the response that you want?

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list