Reject transport-changing extensions - #109
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
🟡 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::Compressand classifiedCOMPRESSasRequestRouteClass::Reject. - Introduced a dedicated local reject response (
TRANSPORT_REJECT) and applied it toCOMPRESSin the command handler. - Added unit tests covering
COMPRESSclassification/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.
3a3cc35 to
760b711
Compare
67610e7 to
e7d9d92
Compare
Summary
Branch-added tests