File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ def __init__(self, endpoint: str) -> None:
7878 messages to the relative path given.
7979
8080 Args:
81- endpoint: A relative path where messages should be posted (e.g., "/messages/")
81+ endpoint: A relative path where messages should be posted
82+ (e.g., "/messages/").
8283
8384 Note:
8485 We use relative paths instead of full URLs for several reasons:
@@ -94,17 +95,17 @@ def __init__(self, endpoint: str) -> None:
9495 """
9596
9697 super ().__init__ ()
97-
98+
9899 # Validate that endpoint is a relative path and not a full URL
99100 if "://" in endpoint or endpoint .startswith ("//" ):
100101 raise ValueError (
101102 "Endpoint must be a relative path (e.g., '/messages/'), not a full URL."
102103 )
103-
104+
104105 # Ensure endpoint starts with a forward slash
105106 if not endpoint .startswith ("/" ):
106107 endpoint = "/" + endpoint
107-
108+
108109 self ._endpoint = endpoint
109110 self ._read_stream_writers = {}
110111 logger .debug (f"SseServerTransport initialized with endpoint: { endpoint } " )
You can’t perform that action at this time.
0 commit comments