Обновить зависимости проекта
This commit is contained in:
@@ -641,24 +641,23 @@ async fn mcp_post(
|
||||
);
|
||||
}
|
||||
|
||||
if let Some(session_id) = headers.get(HEADER_MCP_SESSION_ID) {
|
||||
if let Ok(session_id) = session_id.to_str() {
|
||||
let session = match state.sessions.get(session_id).await {
|
||||
Ok(session) => session,
|
||||
Err(_) => {
|
||||
return with_request_id_header(
|
||||
StatusCode::INTERNAL_SERVER_ERROR.into_response(),
|
||||
&transport_request_id,
|
||||
);
|
||||
}
|
||||
};
|
||||
if let Some(session) = session {
|
||||
if let Err(status) =
|
||||
validate_session_protocol_version(&headers, &session.protocol_version)
|
||||
{
|
||||
return with_request_id_header(status.into_response(), &transport_request_id);
|
||||
}
|
||||
if let Some(session_id) = headers.get(HEADER_MCP_SESSION_ID)
|
||||
&& let Ok(session_id) = session_id.to_str()
|
||||
{
|
||||
let session = match state.sessions.get(session_id).await {
|
||||
Ok(session) => session,
|
||||
Err(_) => {
|
||||
return with_request_id_header(
|
||||
StatusCode::INTERNAL_SERVER_ERROR.into_response(),
|
||||
&transport_request_id,
|
||||
);
|
||||
}
|
||||
};
|
||||
if let Some(session) = session
|
||||
&& let Err(status) =
|
||||
validate_session_protocol_version(&headers, &session.protocol_version)
|
||||
{
|
||||
return with_request_id_header(status.into_response(), &transport_request_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user