B3 fix: the over-bound header test must be over the bound

The previous commit's over-bound case used floor(bound / line) lines, which
can still fit under the bound once the status and Content-Length lines are
counted; the answer was accepted and the test failed. It now sends one whole
line more.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-29 18:23:11 +02:00
commit e8b44878b7

View file

@ -8657,10 +8657,10 @@ mod tests {
}
};
let lines = ROUTE_HTTP_MAX_HEADER_BYTES / filler.len();
// Just inside the bound, then just outside it.
// Just inside the bound, then just outside it (a whole line over).
challenge(scripted_peer(answer_with(lines - 2)), |_| {}).expect("headers inside the bound");
assert_refused(
challenge(scripted_peer(answer_with(lines)), |_| {}),
challenge(scripted_peer(answer_with(lines + 1)), |_| {}),
"headers over the bound together",
);
}