Skip to content
Snippets Groups Projects
Commit 66cdb840 authored by Andrew Morgan's avatar Andrew Morgan
Browse files

Or perhaps I was the one who was drunk

parent bec31381
Branches
Tags
No related merge requests found
...@@ -193,7 +193,6 @@ class MatrixFederationHttpClient(object): ...@@ -193,7 +193,6 @@ class MatrixFederationHttpClient(object):
self, self,
request, request,
try_trailing_slash_on_400=False, try_trailing_slash_on_400=False,
backoff_on_404=False,
**kwargs): **kwargs):
"""Wrapper for _send_request which can optionally retry the request """Wrapper for _send_request which can optionally retry the request
upon receiving a combination of a 400 HTTP response code and a upon receiving a combination of a 400 HTTP response code and a
...@@ -205,9 +204,6 @@ class MatrixFederationHttpClient(object): ...@@ -205,9 +204,6 @@ class MatrixFederationHttpClient(object):
try_trailing_slash_on_400 (bool): Whether on receiving a 400 try_trailing_slash_on_400 (bool): Whether on receiving a 400
'M_UNRECOGNIZED' from the server to retry the request with a 'M_UNRECOGNIZED' from the server to retry the request with a
trailing slash appended to the request path. trailing slash appended to the request path.
backoff_on_404 (bool): Whether to backoff on 404 when making a
request with a trailing slash (only affects request if
try_trailing_slash_on_400 is True).
kwargs (Dict): A dictionary of arguments to pass to kwargs (Dict): A dictionary of arguments to pass to
`_send_request()`. `_send_request()`.
...@@ -585,7 +581,7 @@ class MatrixFederationHttpClient(object): ...@@ -585,7 +581,7 @@ class MatrixFederationHttpClient(object):
} }
response = yield self._send_request_with_optional_trailing_slash( response = yield self._send_request_with_optional_trailing_slash(
request, try_trailing_slash_on_400, backoff_on_404, **send_request_args) request, try_trailing_slash_on_400, **send_request_args)
body = yield _handle_json_response( body = yield _handle_json_response(
self.hs.get_reactor(), self.default_timeout, request, response, self.hs.get_reactor(), self.default_timeout, request, response,
...@@ -701,10 +697,11 @@ class MatrixFederationHttpClient(object): ...@@ -701,10 +697,11 @@ class MatrixFederationHttpClient(object):
"retry_on_dns_fail": retry_on_dns_fail, "retry_on_dns_fail": retry_on_dns_fail,
"timeout": timeout, "timeout": timeout,
"ignore_backoff": ignore_backoff, "ignore_backoff": ignore_backoff,
"backoff_on_404": False,
} }
response = yield self._send_request_with_optional_trailing_slash( response = yield self._send_request_with_optional_trailing_slash(
request, try_trailing_slash_on_400, False, **send_request_args) request, try_trailing_slash_on_400, **send_request_args)
body = yield _handle_json_response( body = yield _handle_json_response(
self.hs.get_reactor(), self.default_timeout, request, response, self.hs.get_reactor(), self.default_timeout, request, response,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment