mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-17 11:09:11 +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> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_bearer_auth_backend.py | ||
| test_custom_routes.py | ||
| test_http_auth_middleware.py | ||
| test_http_dependencies.py | ||
| test_http_middleware.py | ||
| test_stale_access_token.py | ||