mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 04:54:17 +02:00
Fixes #3097 When using FastMCP.from_openapi() with APIs that require specific Content-Type headers (e.g., application/vnd.api+json), the transport connection's content-type: application/json was being injected into downstream API requests, causing HTTP 415 (Unsupported Media Type) errors. This change adds content-type to the exclude_headers set in get_http_headers(), similar to how accept is already excluded. The MCP transport's content type has no relevance to downstream API calls and should not be forwarded. Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| client | ||
| contrib | ||
| deprecated | ||
| experimental | ||
| fs | ||
| integration_tests | ||
| prompts | ||
| resources | ||
| server | ||
| telemetry | ||
| tools | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_apps.py | ||
| test_json_schema_generation.py | ||
| test_mcp_config.py | ||