Couple questions about module behaviour

Maxim Dounin mdounin at mdounin.ru
Tue Mar 17 13:46:48 UTC 2015


Hello!

On Tue, Mar 17, 2015 at 02:29:21PM +0700, hungnv at opensource.com.vn wrote:

> Hello,
> 
> No, it’s not. If you take a look at ngx_http_log_module.c, 
> r->connection->sent is use by function ngx_http_log_bytes_sent, 
> which is later logged as $byte_sents variable, and it’s actually 
> file size. 

No.  The $bytes_sent variable is a number of bytes nginx wrote 
to a socket, not a file size.  Note though, that as long socket 
buffers are big enough the whole response will fit into the send 
buffer, and you won't see the difference.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list