Skip to content

Commit 3c33631

Browse files
authored
Merge branch 'master' into 1001-yuluo/infra-zk
2 parents 90a9f8c + 2456516 commit 3c33631

File tree

1 file changed

+7
-1
lines changed
  • shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/callback

1 file changed

+7
-1
lines changed

shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/callback/ShenyuToolCallback.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,13 @@ private void configureShenyuContext(final ServerWebExchange decoratedExchange,
574574
decoratedExchange.getAttributes().put(Constants.META_DATA, metaData);
575575
shenyuContext.setRpcType(metaData.getRpcType());
576576
}
577-
shenyuContext.setPath(decoratedPath);
577+
try {
578+
URI uri = new URI(decoratedPath);
579+
shenyuContext.setPath(uri.getRawPath());
580+
} catch (URISyntaxException ignore) {
581+
shenyuContext.setPath(decoratedPath);
582+
}
583+
578584
shenyuContext.setRealUrl(decoratedPath);
579585

580586
LOG.debug("Configured RpcType to HTTP for tool call, session: {}", sessionId);

0 commit comments

Comments
 (0)