Problem
The HTTP request and response parsers sometimes consult their connection-closed flag before attempting to consume framing bytes that are already buffered. This can reject a complete request start line or header block that arrived with the final read.
The response parser has the inverse problem for some partial framing: a partial status line, 100-Continue header block, or fixed-length body can remain suspended forever after EOF because the checks only treat an empty buffer as premature closure.
Expected behavior
Within the current parser generation:
- complete buffered start lines, headers, and fixed-length bodies are consumed before EOF is applied;
- partial buffered framing at EOF settles as
PrematureClosure instead of hanging; and
- existing chunked-body behavior remains unchanged and independently covered.
Proposed regression coverage
Use real Requestant, Respondent, and transport objects to pause at each framing boundary, append the final buffered bytes, latch EOF, and verify both complete and partial cases. No monkey-patched clients or uninitialized objects are required.
Problem
The HTTP request and response parsers sometimes consult their connection-closed flag before attempting to consume framing bytes that are already buffered. This can reject a complete request start line or header block that arrived with the final read.
The response parser has the inverse problem for some partial framing: a partial status line, 100-Continue header block, or fixed-length body can remain suspended forever after EOF because the checks only treat an empty buffer as premature closure.
Expected behavior
Within the current parser generation:
PrematureClosureinstead of hanging; andProposed regression coverage
Use real
Requestant,Respondent, and transport objects to pause at each framing boundary, append the final buffered bytes, latch EOF, and verify both complete and partial cases. No monkey-patched clients or uninitialized objects are required.