mirror of
https://github.com/element-hq/synapse.git
synced 2026-03-31 21:25:48 +00:00
Completed: - Created NativeSimpleHttpClient with a HomeServer-compatible constructor that accepts both hs and explicit params - Made session creation lazy (deferred to first use) to avoid "no running event loop" during homeserver init - Updated get_file to return dict[bytes, list[bytes]] headers for backward compatibility - Added SimpleHttpClient = NativeSimpleHttpClient alias for drop-in replacement - Wired into server.py: get_simple_http_client(), get_proxied_http_client(), get_proxied_blocklisted_http_client() all return NativeSimpleHttpClient - Updated all imports: url_previewer.py, appservice/api.py, identity.py, module_api/__init__.py, matrixfederationclient.py - Fixed handlers/oidc.py to use aiohttp response API (.status, .reason, .read(), plain dict headers) - Updated test mock tests/test_utils/oidc.py to use plain dict headers and NativeFakeResponse - Created NativeFakeResponse test utility class Still using Twisted HTTP client: - ReplicationClient — routes to worker instances via TCP/UNIX sockets - matrixfederationclient.py — federation agent with SRV resolution, well-known lookup, TLS verification - connectproxyclient.py — CONNECT proxy protocol implementation - Various test files using FakeResponse (old Twisted version)