Same cached objects, but different body_bytes_sent
Maxim Dounin
mdounin at mdounin.ru
Fri Jun 9 16:29:46 UTC 2017
Hello!
On Thu, Jun 08, 2017 at 07:26:40PM -0300, Guilherme wrote:
> Thanks for your response, Zhang.
>
> I included content-length in log_format to see:
>
> y.y.y.y - [08/Jun/2017:22:15:46 +0000] "GET /image.jpg HTTP/2.0" 200 466
> HIT "Mozilla/5.0 (Linux; Android 5.0.1; GT-I9515L Build/LRX22C)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile
> Safari/537.36" 44 466 2.384 "image/jpeg" 21221
> x.x.x.x - [08/Jun/2017:22:15:46 +0000] "GET /image.jpg HTTP/2.0" 200 21687
> HIT "Mozilla/5.0 (Linux; Android 5.0; SM-G900F Build/LRX21T)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile
> Safari/537.36" 41 21714 7.786 "image/jpeg" 21221
>
> *log_format:* $remote_addr $remote_user [$time_local] "$request" $status
> $body_bytes_sent $upstream_cache_status "$http_user_agent" $request_length
> $bytes_sent $request_time "$sent_http_content_type"
> $sent_http_content_length';
>
> Any idea?
The $bytes_sent and $body_bytes_sent variables reflect actual
amount of bytes nginx was able to sent to the client (was able to
wrote to the client's socket). It may be different from the
full response size if, for example, the client closed the
connection before the whole response was sent.
--
Maxim Dounin
http://nginx.org/
More information about the nginx
mailing list