How nignx handled the header to the client in this situation

Francis Daly francis at daoine.org
Fri May 15 18:33:01 UTC 2020


On Fri, May 15, 2020 at 01:51:13AM -0400, allenhe wrote:

Hi there,

> Will nginx buffer the header before receiving of the whole body?
> If not, what if error happens in the middle of body receiving? nginx has no
> chance to resend the error status then.

What do you want your nginx to do, in that case?

I suspect that what nginx does do,  depends on things like
http://nginx.org/r/proxy_buffering

As you suggest: if nginx gets the entire response before sending anything
to the client, it can send a suitable response code.

If nginx is told to stream the response "live", then if the response is
http 200 plus half the intended body, that is what the client will get.

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list