Repository navigation
Conversation
Cover the CRLF read boundary that could cause a multiline terminator to be returned with a trailing carriage return. Verify the terminator and subsequent status line are handled correctly without changing production code.
enteriaza
deleted the
162-bug-protocol-split-crlf-hides-the-nntp-multiline-terminator
branch
October 19, 2026 17:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add regression coverage for issue #162, which concerns an NNTP multiline terminator split across a CRLF read boundary.
The existing
NntpStreamReaderalready handles a trailing CR correctly when the LF arrives in a subsequent read. This change locks that behavior in with deterministic tests. No production code was modified.Closes #162
Changes
Split_crlf_multiline_terminator_is_a_single_dottoNntpStatusLineTests.ChunkedStreamto control read boundaries deterministically, including splitting the terminator between.\rand\n..\r\nis returned as exactly.and recognized byIsMultilineTerminator.Validation
NntpStatusLineTests: 13 passed, 0 failed, 0 skippedRegression verification
Temporarily disabling the existing pending-CR handling caused the new regression test to fail as expected: the split terminator was returned with length 2 instead of 1. The existing handling was restored before the full test suite was run.
Scope
Test-only change in
tests/VectorNNTPD.BackFillerService.Tests/Nntp/NntpStatusLineTests.cs. No production protocol logic was changed.Fixes #162