fix: return header mismatch for missing protocol header (#1083)
Co-authored-by: mrcs64 <9069178+mrcs64@users.noreply.github.com>
This commit is contained in:
parent
596a7e1e0d
commit
f3c786706a
1 changed files with 34 additions and 2 deletions
|
|
@ -473,9 +473,9 @@ fn validate_request_protocol_version_meta(
|
|||
.get(HEADER_MCP_PROTOCOL_VERSION)
|
||||
.and_then(|value| value.to_str().ok())
|
||||
else {
|
||||
return Err(invalid_request_jsonrpc_response(
|
||||
return Err(header_mismatch_jsonrpc_response(
|
||||
Some(request.id.clone()),
|
||||
"Invalid Request: request _meta protocolVersion requires MCP-Protocol-Version header",
|
||||
"request _meta protocolVersion requires MCP-Protocol-Version header",
|
||||
));
|
||||
};
|
||||
if header_version != meta_version.as_str() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue