Couple questions about module behaviour
hungnv at opensource.com.vn
hungnv at opensource.com.vn
Fri Feb 13 02:49:08 UTC 2015
Hello,
if you return control to the nginx event loop while generating the
response, you may set appropriate events to detect if the client
closed the connection. See ngx_http_upstream_check_broken_connection()
and related things in the ngx_http_upstream.c for an example.
Yes, it’s fine, I will take a deeper look at upstream module to find out the answer. Thanks.
Log module, once you use $bytes_sent (or $body_bytes_sent, as
logged by default) variable, logs the number of bytes sent to the
client. It is not the same as the number of bytes actually
received by the client though, because there are bytes which are
sent (i.e., passed by nginx to the socket buffer) but not yet
received.
Well, this means there’s another parameter in log module which actually log number of bytes client received (other than $body_bytes_sent or $bytes_sent). ?
--
Hưng
Email: hungnv at opensource.com.vn
> On Feb 12, 2015, at 8:52 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
>
> f you return control to the nginx event loop while generating the
> response, you may set appropriate events to detect if the client
> closed the connection. See ngx_http_upstream_check_broken_connection()
> and related things in the ngx_http_upstream.c for an example.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150213/f316bb49/attachment.html>
More information about the nginx-devel
mailing list