Skip to content

fix: request identity encoding for streamable HTTP#2650

Closed
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/streamable-http-identity-encoding
Closed

fix: request identity encoding for streamable HTTP#2650
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/streamable-http-identity-encoding

Conversation

@he-yufeng

Copy link
Copy Markdown

Summary

  • send Accept-Encoding: identity on streamable HTTP client requests
  • keep the MCP Accept and Content-Type request headers overriding client defaults
  • add coverage that the actual server-visible request headers use identity encoding

Fixes #2649.

To verify

  • uv run pytest tests/shared/test_streamable_http.py::test_streamable_http_client_mcp_headers_override_defaults tests/shared/test_streamable_http.py::test_streamable_http_client_preserves_custom_with_mcp_headers -q --basetemp .tmp/pytest
  • uv run pytest tests/shared/test_streamable_http.py::test_streamable_http_client_json_response -q --basetemp .tmp/pytest-json
  • uv run ruff check src/mcp/client/streamable_http.py tests/shared/test_streamable_http.py
  • uv run python -m py_compile src/mcp/client/streamable_http.py tests/shared/test_streamable_http.py
  • git diff --check

@he-yufeng

Copy link
Copy Markdown
Author

Closing this during backlog cleanup. The python-sdk queue has too many open PRs, and this older/no-human-signal item is lower priority than the remaining PRs that have recent validation, review discussion, or clearer current value. I can reopen or refresh it if maintainers want this specific change.

@he-yufeng he-yufeng closed this Jun 10, 2026
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.

streamable HTTP client parses zstd-compressed JSON response bytes as JSON

1 participant