This PR adds two small test cases to line_reader_test in src/test/util_string_tests.cpp to lock in util::LineReader behavior that upcoming HTTP request parsing will depend on.
What the new cases check:
CRLF and trailing bare
\rConsecutive CRLFs produce an empty line (this is how HTTP signals end of headers). A lone\rat the end of the buffer is not treated as a line terminator, so the rest can still be read withReadLength().State after a
max_line_lengthexception After the exception, the iterator is reset and bothConsumed()andRemaining()reflect that reset. This means callers can safely fall back toReadLength()without losing position.
LineReader was added in #34242 (commit 1911db8c) with the max_line_length + iterator-reset semantics exercised here.
Consumed() was added later in #34905 (commit 81720992) so callers could observe position after an exception.
These utilities are consumed by the in-progress libevent replacement (#32061). Adding these edge cases reduces risk and ambiguity