Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 791
Make "Stateless" mode sessionless#760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -158,7 +158,7 @@ public async Task StreamableHttpClient_SendsMcpProtocolVersionHeader_AfterInitia | ||
| { | ||
| return async context => | ||
| { | ||
| if (!StringValues.IsNullOrEmpty(context.Request.Headers["mcp-session-id"])) | ||
| if (!StringValues.IsNullOrEmpty(context.Request.Headers["mcp-protocol-version"])) | ||
halter73 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| { | ||
| protocolVersionHeaderValues.Add(context.Request.Headers["mcp-protocol-version"]); | ||
| } | ||
| @@ -179,8 +179,11 @@ public async Task StreamableHttpClient_SendsMcpProtocolVersionHeader_AfterInitia | ||
| Assert.Equal("2025-03-26", mcpClient.NegotiatedProtocolVersion); | ||
| await mcpClient.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken); | ||
| await mcpClient.DisposeAsync(); | ||
| // The header should be included in the GET request, the initialized notification, the tools/list call, and the delete request. | ||
| Assert.NotEmpty(protocolVersionHeaderValues); | ||
| // The DELETE request won't be sent for Stateless mode due to the lack of an Mcp-Session-Id. | ||
| Assert.Equal(Stateless ? 3 : 4, protocolVersionHeaderValues.Count); | ||
| Assert.All(protocolVersionHeaderValues, v => Assert.Equal("2025-03-26", v)); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.