This commit is contained in:
Andrew Morgan 2019-03-20 14:08:57 +00:00
parent cd36a1283b
commit bb52a2e653
2 changed files with 7 additions and 3 deletions

View file

@ -219,7 +219,9 @@ class MatrixFederationHttpClient(object):
Deferred[Dict]: Parsed JSON response body. Deferred[Dict]: Parsed JSON response body.
""" """
try: try:
response = yield self._send_request(request, backoff_on_404=backoff_on_404, **send_request_args) response = yield self._send_request(
request, backoff_on_404=backoff_on_404, **send_request_args,
)
except HttpResponseException as e: except HttpResponseException as e:
# Received an HTTP error > 300. Check if it meets the requirements # Received an HTTP error > 300. Check if it meets the requirements
# to retry with a trailing slash # to retry with a trailing slash
@ -234,7 +236,9 @@ class MatrixFederationHttpClient(object):
# trailing slash on Synapse <= v0.99.3. # trailing slash on Synapse <= v0.99.3.
request.path += "/" request.path += "/"
response = yield self._send_request(request, backoff_on_404=backoff_on_404, **send_request_args) response = yield self._send_request(
request, backoff_on_404=backoff_on_404, **send_request_args,
)
defer.returnValue(response) defer.returnValue(response)

View file

@ -365,7 +365,7 @@ class FederationClientTests(HomeserverTestCase):
self.assertEqual(conn.value(), b"") self.assertEqual(conn.value(), b"")
# We should get a 404 failure response # We should get a 404 failure response
r = self.failureResultOf(d) self.failureResultOf(d)
def test_client_sends_body(self): def test_client_sends_body(self):
self.cl.post_json( self.cl.post_json(