Skip to content

rmcp: return forbidden for invalid origin - #1196

Closed
ECD5A wants to merge 1 commit into
modelcontextprotocol:mainfrom
ECD5A:fix/1188-origin-forbidden-status
Closed

rmcp: return forbidden for invalid origin#1196
ECD5A wants to merge 1 commit into
modelcontextprotocol:mainfrom
ECD5A:fix/1188-origin-forbidden-status

Conversation

@ECD5A

@ECD5A ECD5A commented Aug 20, 2026

Copy link
Copy Markdown

Summary

  • return 403 Forbidden for malformed or non-UTF-8 Origin headers when Origin validation is enabled
  • add regression coverage for both invalid-header cases

Fixes #1188

Testing

  • cargo test -p rmcp --test test_custom_headers origin_validation --features 'client,server,transport-streamable-http-client-reqwest,transport-streamable-http-server' -- --nocapture
  • git diff --check
  • targeted rustfmt on the two changed files

Signed-off-by: ECD5A <stelmaknoder@gmail.com>
@ECD5A
ECD5A requested a review from a team as a code owner August 20, 2026 09:33
@github-actions github-actions Bot added T-test Testing related changes T-core Core library changes T-transport Transport layer changes labels Aug 20, 2026
@ECD5A

ECD5A commented Aug 20, 2026

Copy link
Copy Markdown
Author

Closing in favor of #1192, which already covers this status-code fix as part of the broader Origin validation change. I missed the overlap before opening this — sorry for the noise.

@ECD5A ECD5A closed this Aug 20, 2026
@ECD5A
ECD5A deleted the fix/1188-origin-forbidden-status branch August 20, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-test Testing related changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streamable HTTP returns 400 instead of 403 for malformed Origin

1 participant