Add initial task extension conformance coverage (#1734)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7c99928c-a943-49f4-9a63-8b04a0e4d18b
This commit is contained in:
Pranav Senthilnathan 2026-07-24 17:16:20 -07:00 • committed by GitHub
commit 83523b0a42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -592,7 +592,8 @@ internal sealed partial class StreamableHttpClientSessionTransport : TransportBa
headers.Add(McpHttpHeaders.Method, method);
// Add Mcp-Name header for methods that target a specific named resource
string? name = message switch
#pragma warning disable MCPEXP002
string? name = message.Context?.RoutingName ?? message switch
{
JsonRpcRequest { Method: RequestMethods.ToolsCall or RequestMethods.PromptsGet } request
=> GetParamsStringProperty(request.Params, "name"),
@ -600,6 +601,7 @@ internal sealed partial class StreamableHttpClientSessionTransport : TransportBa
=> GetParamsStringProperty(request.Params, "uri"),
_ => null,
};
#pragma warning restore MCPEXP002
if (name is not null)
{