Repository navigation
[v2] fix: Update UriTemplate implementation to handle optional/omitted, out-of-order, and encoded query parameters - #1396
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
59ad72e to
316f4c2
Compare
|
|
316f4c2 to
a6509f6
Compare
|
Thanks for the contribution! Closing in favor of #1785, which builds on your implementation with a small refinement: absent query parameters are omitted from the result rather than set to |
|
Thanks @felixweinberger! |
This PR addresses several limitations of the current
UriTemplate#matchimplementation:Omitted query parameters are parsed as an empty string per guidance of RFC 6570 Section 2.3.
Motivation and Context
Fixes #1079
Fixes #149
How Has This Been Tested?
New test additions cover all of the cases mentioned in #1079 and #149 as well as a few additional potential edge cases I could come up with.
Breaking Changes
n/a
Types of changes
Checklist
Additional context