Commit 6561d16
committed
replace path matching from
`getRequestURI()` → full request path (without query).
`getPathInfo()` → extra path after the servlet's mapping, or null if none.
So if I am configuring my Servlet to be mapped on `/somePath` and initiating the Servlet:
```
new HttpServletSseServerTransport(new ObjectMapper(), "/somePath/message", "/somePath/sse")
```
it will work and won't fail.
`getPathInfo` will return "/message" and "/sse".
while `getRequestURI` will return "/somePath/message" and "/somePath/sse" and will not fail on the validation.getPathInfo to getRequestURI.1 parent a94163b commit 6561d16
File tree
1 file changed
+4
-4
lines changed- mcp/src/main/java/io/modelcontextprotocol/server/transport
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
| 228 | + | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
0 commit comments