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:
parent
4b3b86d863
commit
e8b44878b7
1 changed files with 2 additions and 2 deletions
|
|
@ -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",
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue