diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-03-12 11:37:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 11:37:57 -0500 |
commit | 55da8df0782f80c43d127cd563cfbb89106319db (patch) | |
tree | 655b690a5e7bf6d564bd47d3bd0c8924d7360851 /synapse/http | |
parent | Reject concurrent transactions (#9597) (diff) | |
download | synapse-55da8df0782f80c43d127cd563cfbb89106319db.tar.xz |
Fix additional type hints from Twisted 21.2.0. (#9591)
Diffstat (limited to 'synapse/http')
-rw-r--r-- | synapse/http/client.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index 8f3da486b3..d4ab3a2732 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -57,7 +57,13 @@ from twisted.web.client import ( ) from twisted.web.http import PotentialDataLoss from twisted.web.http_headers import Headers -from twisted.web.iweb import UNKNOWN_LENGTH, IAgent, IBodyProducer, IResponse +from twisted.web.iweb import ( + UNKNOWN_LENGTH, + IAgent, + IBodyProducer, + IPolicyForHTTPS, + IResponse, +) from synapse.api.errors import Codes, HttpResponseException, SynapseError from synapse.http import QuieterFileBodyProducer, RequestTimedOutError, redact_uri @@ -870,6 +876,7 @@ def encode_query_args(args: Optional[Mapping[str, Union[str, List[str]]]]) -> by return query_str.encode("utf8") +@implementer(IPolicyForHTTPS) class InsecureInterceptableContextFactory(ssl.ContextFactory): """ Factory for PyOpenSSL SSL contexts which accepts any certificate for any domain. |