Skip to content

Refactor handle_delete to use extract_session_id#357

Open
koic wants to merge 1 commit into
modelcontextprotocol:mainfrom
koic:refactor_handle_delete_to_use_helper_methods
Open

Refactor handle_delete to use extract_session_id#357
koic wants to merge 1 commit into
modelcontextprotocol:mainfrom
koic:refactor_handle_delete_to_use_helper_methods

Conversation

@koic
Copy link
Copy Markdown
Member

@koic koic commented May 21, 2026

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.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants