Opened 7 years ago
Closed 7 years ago
Last modified 5 years ago
#997 closed defect (wontfix)
$body_bytes_sent compute bigger in HTTP2.0 then HTTP1.X
|Reported by:||Owned by:|
HTTP1.0/HTTP1.1: $body_bytes_sent = 2000byte, I think it's correct
HTTP2.0: $body_bytes_sent = 2300byte(uncertainty) > 2000byte, I think it's wrong
I know the fream in HTTP2.0 causes this problem, the frame include NGX_HTTP_V2_FRAME_HEADER_SIZE, HTTP header...
I think this method is wrong, $body_bytes_sent is not $bytes_sent.
look forward to your reply
Change History (2)
comment:1 by , 7 years ago
|Status:||new → closed|
comment:2 by , 5 years ago
See also #1596.
Note: See TracTickets for help on using tickets.
A quote from the documentation:
$body_bytes_sent - number of bytes sent to a client, not counting the response header
In other words: $body_bytes_sent = $bytes_sent - response_header_size, where the response_header_size value in case of HTTP/2 is the size of the response HEADERS block, not the data frame headers.
Of course it's bigger, since HTTP/2 framing adds additional overhead (like chunked transfer encoding in HTTP/1.1).