Le 7/25/21 à 1:26 PM, William Dauchy a écrit :
Hello,
While upgrading from v2.3.x to v2.4.x I noticed a difference of bytes
read in requests http logs with this simple frontend config:
frontend foo
bind 127.0.0.1:8000
http-request return
in v2.3, the logs (%B) tells me 54 bytes, in v2.4, I am getting 49. So
a difference of 5 bytes per request.
I was simply curious to understand that behavior change. Is it a
change in the way we count bytes in stats, or is there really a
difference in the payload we write?
When I look at a dump, the TCP payloads are identical with 57 bytes in
both versions. And the overall length of the packet is 123 bytes.
Maybe that's expected, but I wanted some clarification.
Hi William,
The response size reported in the log messages is related to the internal
representation of the HTTP message. It is a limitation of the current design. It
means this size is not equal to the raw size of the message and may change when
the HTX representation changes. In this case, in 2.4, the start-line
representation was changed, a 32-bits integer was removed from hx_sl structure.
In addition, the end-of-message block (EOM) was removed from the HTX
representation. It counted for 1 byte. This explains the difference of 5 bytes
between 2.3 and 2.4.
--
Christopher Faulet