FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(auth): keep root PRM resource URL canonical by Epochex · Pull Request #2888 · modelcontextprotocol/python-sdk · GitHub

fix(auth): keep root PRM resource URL canonical - #2888

Closed
Epochex wants to merge 2 commits into
modelcontextprotocol:mainfrom
Epochex:fix/prm-root-resource-canonical-url
Closed

fix(auth): keep root PRM resource URL canonical#2888
Epochex wants to merge 2 commits into
modelcontextprotocol:mainfrom
Epochex:fix/prm-root-resource-canonical-url

Conversation

Epochex commented Jun 16, 2026

Copy link
Copy Markdown

Summary

  • serialize ProtectedResourceMetadata.resource without a synthetic trailing slash when the resource is the origin root
  • keep the internal field typed as AnyHttpUrl, so this only changes the served PRM wire shape
  • add regression coverage for the root metadata endpoint and direct JSON serialization

Testing

  • uv run pytest tests/server/auth/test_protected_resource.py
  • uv run pytest tests/interaction/auth/test_discovery.py -k prm_endpoint_serves_the_resource_url

Fixes #2883.

Copy link
Copy Markdown
Contributor

Thanks for the PR. This has since landed via #2925. Closing as part of a general backlog cleanup following the v2 release. If this is still relevant against v2, feel free to reopen.

AI Disclaimer

maxisbey closed this Jul 29, 2026
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AnyHttpUrl normalization adds trailing slash → breaks RFC 9728 canonical resource URL in ProtectedResourceMetadata

2 participants


Back | FazBrowse Home | New Git URL