mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Merge branch 'develop' into request_logging
Conflicts: synapse/config/logger.py
This commit is contained in:
commit
7c06399512
46 changed files with 391 additions and 199 deletions
|
@ -100,7 +100,7 @@ class BaseHttpClient(object):
|
|||
|
||||
retries_left = 5
|
||||
|
||||
endpoint = self._getEndpoint(reactor, destination);
|
||||
endpoint = self._getEndpoint(reactor, destination)
|
||||
|
||||
while True:
|
||||
|
||||
|
@ -185,7 +185,7 @@ class MatrixHttpClient(BaseHttpClient):
|
|||
|
||||
auth_headers = []
|
||||
|
||||
for key,sig in request["signatures"][self.server_name].items():
|
||||
for key, sig in request["signatures"][self.server_name].items():
|
||||
auth_headers.append(bytes(
|
||||
"X-Matrix origin=%s,key=\"%s\",sig=\"%s\"" % (
|
||||
self.server_name, key, sig,
|
||||
|
@ -280,7 +280,6 @@ class MatrixHttpClient(BaseHttpClient):
|
|||
|
||||
defer.returnValue(json.loads(body))
|
||||
|
||||
|
||||
def _getEndpoint(self, reactor, destination):
|
||||
return matrix_endpoint(
|
||||
reactor, destination, timeout=10,
|
||||
|
@ -355,6 +354,7 @@ class IdentityServerHttpClient(BaseHttpClient):
|
|||
|
||||
defer.returnValue(json.loads(body))
|
||||
|
||||
|
||||
class CaptchaServerHttpClient(MatrixHttpClient):
|
||||
"""Separate HTTP client for talking to google's captcha servers"""
|
||||
|
||||
|
@ -388,6 +388,7 @@ class CaptchaServerHttpClient(MatrixHttpClient):
|
|||
else:
|
||||
raise e
|
||||
|
||||
|
||||
def _print_ex(e):
|
||||
if hasattr(e, "reasons") and e.reasons:
|
||||
for ex in e.reasons:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue