<div dir="ltr"><div>Hi,</div><div><br></div><div>Thanks for the clarification!</div><div>What would we see if the client disconnects in the middle of nginx sending the response? Will there be a "while .." clause in the error log? Will the http status code be reset to 499?</div><div><br></div><div>Thanks!</div><div>Frank</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 25, 2020 at 5:34 AM Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<br>
On Tue, Nov 24, 2020 at 08:23:08PM -0800, Frank Liu wrote:<br>
<br>
> When a client disconnects (initiated tcp FIN), shouldn't we see 499 in<br>
> nginx logs? But sometimes I see 400, along with below in error log:<br>
> *2314539 client prematurely closed connection, client: x.x.x.x,<br>
> <br>
> Since I don't see "while reading client request headers" in the error log,<br>
> I assume the request is already received (or maybe "body" hasn't arrived<br>
> fully yet?) when client disconnects.<br>
> <br>
> When would nginx log 400 instead of 499? The error log ("info" level) is<br>
> not clear about why 400, other than "client prematurely closed connection,<br>
> ".<br>
<br>
The 400 error along with "client prematurely closed connection" <br>
and without an "while ..." clause implies that the connection was <br>
closed while reading the request body.<br>
<br>
-- <br>
Maxim Dounin<br>
<a href="http://mdounin.ru/" rel="noreferrer" target="_blank">http://mdounin.ru/</a><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div>