Skip to content

Frame XHDR responses with the correct status code - #108

Merged
mjc merged 3 commits into
nntpp-32-tab-command-separatorfrom
nntpp-33-xhdr-framing
Sep 11, 2026
Merged

Frame XHDR responses with the correct status code#108
mjc merged 3 commits into
nntpp-32-tab-command-separatorfrom
nntpp-33-xhdr-framing

Conversation

@mjc

@mjc mjc commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • recognize XHDR’s 221 multiline success response independently from HDR’s 225 response
  • route fragmented XHDR replies through the production framer

Branch-added tests

  • A fragmented XHDR response pauses before the deferred reply and verifies the 221 response completes and preserves ordered emission through the production framing path.
  • Existing HDR, multiline, and deferred-response ordering tests remain green.

Copilot AI lite review requested due to automatic review settings September 5, 2026 21:48
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Advanced

Run ID: fb14c2c2-5070-4189-b0bb-aef47772a376

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The change drops multiline handling for XHDR status 225, which can cause mis-framing if a backend returns 225 for XHDR (a behavior also reflected in the repo’s response-code reference).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adjusts NNTP multiline framing rules so XHDR success responses are recognized with the correct status code, ensuring fragmented XHDR replies are routed through the production multiline framer and preserve deferred-reply ordering.

Changes:

  • Treat XHDR success status 221 as a multiline body response (separate from HDR’s 225 mapping).
  • Add a regression test to ensure a fragmented XHDR 221 response completes correctly before a deferred reply is emitted.
File summaries
File Description
src/session/multiline_framing.rs Adds a test covering fragmented XHDR 221 replies and deferred-response ordering through the production framing path.
src/protocol/request.rs Updates the request/status → multiline-body mapping so XHDR is recognized as multiline on 221.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/protocol/request.rs
@mjc
mjc force-pushed the nntpp-33-xhdr-framing branch from 67610e7 to e7d9d92 Compare September 5, 2026 23:28
@mjc
mjc force-pushed the nntpp-32-tab-command-separator branch from 9bc367d to 61d9a3f Compare September 5, 2026 23:28
@mjc
mjc merged commit 73c0fd7 into nntpp-32-tab-command-separator Sep 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants