fix: unsupported header takes precedence over header mismatch (#293)

This commit is contained in:
Yuan Teoh 2026-05-20 01:38:31 -07:00 • committed by GitHub
commit 0371b188bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -403,7 +403,7 @@ export class ServerStatelessScenario implements ClientScenario {
const responseAbsent = await sendRpc(
'server/discover',
{ _meta: headerMismatchMeta },
{ 'MCP-Protocol-Version': 'mismatch.version' },
{ 'MCP-Protocol-Version': DRAFT_PROTOCOL_VERSION },
302
).catch(() => null);
const resAbsent: any = responseAbsent?.res ?? null;