mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-15 14:40:13 -04:00
Merge remote-tracking branch 'upstream/release-v1.69'
This commit is contained in:
commit
4b94513ae4
191 changed files with 10356 additions and 2903 deletions
|
@ -36,6 +36,7 @@ from twisted.web.error import SchemeNotSupported
|
|||
from twisted.web.http_headers import Headers
|
||||
from twisted.web.iweb import IAgent, IBodyProducer, IPolicyForHTTPS
|
||||
|
||||
from synapse.http import redact_uri
|
||||
from synapse.http.connectproxyclient import HTTPConnectProxyEndpoint, ProxyCredentials
|
||||
from synapse.types import ISynapseReactor
|
||||
|
||||
|
@ -220,7 +221,11 @@ class ProxyAgent(_AgentBase):
|
|||
self._reactor, parsed_uri.host, parsed_uri.port, **self._endpoint_kwargs
|
||||
)
|
||||
|
||||
logger.debug("Requesting %s via %s", uri, endpoint)
|
||||
logger.debug(
|
||||
"Requesting %s via %s",
|
||||
redact_uri(uri.decode("ascii", errors="replace")),
|
||||
endpoint,
|
||||
)
|
||||
|
||||
if parsed_uri.scheme == b"https":
|
||||
tls_connection_creator = self._policy_for_https.creatorForNetloc(
|
||||
|
|
|
@ -705,7 +705,7 @@ class _ByteProducer:
|
|||
self._request = None
|
||||
|
||||
|
||||
def _encode_json_bytes(json_object: Any) -> bytes:
|
||||
def _encode_json_bytes(json_object: object) -> bytes:
|
||||
"""
|
||||
Encode an object into JSON. Returns an iterator of bytes.
|
||||
"""
|
||||
|
@ -746,7 +746,7 @@ def respond_with_json(
|
|||
return None
|
||||
|
||||
if canonical_json:
|
||||
encoder = encode_canonical_json
|
||||
encoder: Callable[[object], bytes] = encode_canonical_json
|
||||
else:
|
||||
encoder = _encode_json_bytes
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue