SIGN IN SIGN UP

Implement Response header count

Add Response::headerCount() to return the total number of
stored header fields on a response. The implementation counts
the current header entries directly from the underlying Beast
header container.

Added unit coverage to verify the method reports the full
header count after headers are added through the normal
addHeader() path.

Tested with:
meson test -C build http_response_test --print-errorlogs

This helper is used by response unit tests to verify that only
the expected headers are present and that no unexpected headers
are added to the response. See also:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/91848

Change-Id: I28432bb4fc982db44cee0688395d04ac513d6749
Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
J
Joel P J committed
bb662f2ad11548ec4600d651e58b205b38b43cc9
Parent: bd5f6cf
Committed by Ed Tanous <ed@tanous.net> on 7/22/2026, 6:29:44 PM