Skip to content

Commit

Permalink
Fix comments. v0.99.2 -> v0.99.3
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Mar 20, 2019
1 parent 551ea11 commit c69df5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions synapse/http/matrixfederationclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _send_request_with_optional_trailing_slash(
):
"""Wrapper for _send_request which can optionally retry the request
upon receiving a combination of a 400 HTTP response code and a
'M_UNRECOGNIZED' errcode. This is a workaround for Synapse <=v0.99.2
'M_UNRECOGNIZED' errcode. This is a workaround for Synapse <= v0.99.3
due to #3622.
Args:
Expand Down Expand Up @@ -237,7 +237,7 @@ def _send_request_with_optional_trailing_slash(

# Retry with a trailing slash if we received a 400 with
# 'M_UNRECOGNIZED' which some endpoints can return when omitting a
# trailing slash on Synapse <= v0.99.2.
# trailing slash on Synapse <= v0.99.3.
# Enable backoff if initially disabled
send_request_args["backoff_on_404"] = backoff_on_404

Expand Down Expand Up @@ -560,7 +560,7 @@ def put_json(self, destination, path, args={}, data={},
requests).
try_trailing_slash_on_400 (bool): True if on a 400 M_UNRECOGNIZED
response we should try appending a trailing slash to the end
of the request. Workaround for #3622 in Synapse <=v0.99.2. This
of the request. Workaround for #3622 in Synapse <= v0.99.3. This
will be attempted before backing off if backing off has been
enabled.
Expand Down Expand Up @@ -593,7 +593,7 @@ def put_json(self, destination, path, args={}, data={},
"timeout": timeout,
"ignore_backoff": ignore_backoff,
# Do not backoff on the initial request if we're trying again with
# trailing slashes Otherwise we may end up waiting to contact a
# trailing slashes. Otherwise we may end up waiting to contact a
# server that is actually up
"backoff_on_404": False if try_trailing_slash_on_400 else backoff_on_404,
}
Expand Down Expand Up @@ -681,7 +681,7 @@ def get_json(self, destination, path, args=None, retry_on_dns_fail=True,
and try the request anyway.
try_trailing_slash_on_400 (bool): True if on a 400 M_UNRECOGNIZED
response we should try appending a trailing slash to the end of
the request. Workaround for #3622 in Synapse <=v0.99.2.
the request. Workaround for #3622 in Synapse <= v0.99.3.
Returns:
Deferred[dict|list]: Succeeds when we get a 2xx HTTP response. The
result will be the decoded JSON body.
Expand Down
2 changes: 1 addition & 1 deletion tests/http/test_fedclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def test_client_requires_trailing_slashes(self):
"""
If a connection is made to a client but the client rejects it due to
requiring a trailing slash. We need to retry the request with a
trailing slash. Workaround for Synapse <= v0.99.2, explained in #3622.
trailing slash. Workaround for Synapse <= v0.99.3, explained in #3622.
"""
d = self.cl.get_json(
"testserv:8008", "foo/bar", try_trailing_slash_on_400=True,
Expand Down

0 comments on commit c69df5d

Please sign in to comment.