Skip to content

Reject transport-changing extensions - #109

Merged
mjc merged 3 commits into
nntpp-33-xhdr-framingfrom
nntpp-34-transport-extension-rejection
Sep 11, 2026
Merged

Reject transport-changing extensions#109
mjc merged 3 commits into
nntpp-33-xhdr-framingfrom
nntpp-34-transport-extension-rejection

Conversation

@mjc

@mjc mjc commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • classify transport-changing extensions as locally rejected commands
  • return a clear 503 response without forwarding them to any backend

Branch-added tests

  • A routing-mode matrix sends COMPRESS through hybrid, per-command, and stateful paths and verifies each receives 503 with no backend forwarding.
  • Existing command classification and local-response coverage remains 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: c1f5a92c-7d98-495e-90a6-52b6b0e24d59

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

STARTTLS remains a transport-changing command but still falls back to a generic reject response path, so transport-changing commands do not consistently return the clearer transport-specific 503 message.

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

Pull request overview

This PR extends the proxy’s NNTP command classification to recognize the COMPRESS verb as a transport-changing command and ensures it is locally rejected with a 503 response rather than being forwarded to any backend.

Changes:

  • Added RequestKind::Compress and classified COMPRESS as RequestRouteClass::Reject.
  • Introduced a dedicated local reject response (TRANSPORT_REJECT) and applied it to COMPRESS in the command handler.
  • Added unit tests covering COMPRESS classification/routing and rejection behavior across routing modes.
File summaries
File Description
src/protocol/request.rs Adds COMPRESS request kind classification and marks it as locally rejected.
src/command/handler.rs Adds a transport-specific 503 reject response and tests that COMPRESS is rejected across routing modes.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • 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/command/handler.rs
Comment thread src/command/handler.rs Outdated
@mjc
mjc force-pushed the nntpp-34-transport-extension-rejection branch from 3a3cc35 to 760b711 Compare September 5, 2026 23:28
@mjc
mjc force-pushed the nntpp-33-xhdr-framing branch from 67610e7 to e7d9d92 Compare September 5, 2026 23:28
@mjc
mjc merged commit 3870664 into nntpp-33-xhdr-framing 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