mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-28 18:22:07 +02:00
* fix: stop passing follow_redirects to httpx_client_factory
Remove the `follow_redirects=True` kwarg that was being forced onto
custom httpx_client_factory calls with a type: ignore suppression.
The McpHttpClientFactory protocol does not include follow_redirects,
so this was a protocol violation. httpx already strips Authorization
headers on cross-origin redirects via its _redirect_headers mechanism.
🤖 Co-authored-by: Claude <noreply@anthropic.com>
* fix: restore follow_redirects=True for custom httpx client factories
httpx already strips Authorization headers on cross-origin redirects,
so follow_redirects is safe to keep. Removing it broke redirect
handling for users providing custom factories.
* fix: remove vacuous test that never invoked connect_session
The test asserted on received_kwargs but never called connect_session,
so the factory was never invoked and the assertion was a no-op.
* fix: use AsyncClient with transport= instead of monkey-patching _transport
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_memory_transport.py | ||
| test_no_redirect.py | ||
| test_transports.py | ||
| test_uv_transport.py | ||