mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
Remove trailing slashes from outbound federation requests and retry on 400 (#4840)
As per #3622, we remove trailing slashes from outbound federation requests. However, to ensure that we remain backwards compatible with previous versions of Synapse, if we receive a HTTP 400 with `M_UNRECOGNIZED`, then we are likely talking to an older version of Synapse in which case we retry with a trailing slash appended to the request path.
This commit is contained in:
commit
7bef97dfb7
5 changed files with 191 additions and 17 deletions
|
@ -192,6 +192,7 @@ class TypingNotificationsTestCase(unittest.HomeserverTestCase):
|
|||
json_data_callback=ANY,
|
||||
long_retries=True,
|
||||
backoff_on_404=True,
|
||||
try_trailing_slash_on_400=True,
|
||||
)
|
||||
|
||||
def test_started_typing_remote_recv(self):
|
||||
|
@ -269,6 +270,7 @@ class TypingNotificationsTestCase(unittest.HomeserverTestCase):
|
|||
json_data_callback=ANY,
|
||||
long_retries=True,
|
||||
backoff_on_404=True,
|
||||
try_trailing_slash_on_400=True,
|
||||
)
|
||||
|
||||
self.assertEquals(self.event_source.get_current_key(), 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue