We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b42b35a commit 5a4d420Copy full SHA for 5a4d420
src/mcp/client/sse.py
@@ -62,9 +62,15 @@ async def sse_reader(
62
logger.debug(f"Received SSE event: {sse.event}")
63
match sse.event:
64
case "endpoint":
65
- base_path = re.search(r"https?://[^/]+/(.+)/sse$", url)
66
- base_path = base_path.group(1) if base_path else ""
67
- endpoint_url = urljoin(url, base_path + sse.data)
+ base_path = re.search(
+ r"https?://[^/]+/(.+)/sse$", url
+ )
68
+ base_path = (
69
+ base_path.group(1) if base_path else ""
70
71
+ endpoint_url = urljoin(
72
+ url, base_path + sse.data
73
74
logger.info(
75
f"Received endpoint URL: {endpoint_url}"
76
)
0 commit comments