Refactor handle_delete to use extract_session_id
## Motivation and Context `handle_post` and `handle_get` already use this helper, but `handle_delete` inlined `request.env["HTTP_MCP_SESSION_ID"]`. This aligns all three handlers consistently. ## How Has This Been Tested? It has passed existing tests. ## Breaking Changes None.
This commit is contained in:
parent
d17cc51c20
commit
999f8b3f39
1 changed files with 1 additions and 1 deletions
|
|
@ -426,7 +426,7 @@ module MCP
|
|||
return success_response
|
||||
end
|
||||
|
||||
return missing_session_id_response unless (session_id = request.env["HTTP_MCP_SESSION_ID"])
|
||||
return missing_session_id_response unless (session_id = extract_session_id(request))
|
||||
return session_not_found_response unless session_exists?(session_id)
|
||||
|
||||
protocol_version_error = validate_protocol_version_header(request)
|
||||
|
|
|
|||
Loading…
Reference in a new issue