diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index 8e2be218e2..4e8919d657 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -167,7 +167,7 @@ class TransportLayerClient(object): # generated by the json_data_callback. json_data = transaction.get_dict() - path = _create_v1_path("/send/%s/", transaction.transaction_id) + path = _create_v1_path("/send/%s", transaction.transaction_id) response = yield self.client.put_json( transaction.destination, diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py index 67ae0212c3..131c67b933 100644 --- a/synapse/federation/transport/server.py +++ b/synapse/federation/transport/server.py @@ -366,7 +366,7 @@ class FederationSendServlet(BaseFederationServlet): class FederationEventServlet(BaseFederationServlet): - PATH = "/event/(?P[^/]*)/" + PATH = "/event/(?P[^/]*)" # This is when someone asks for a data item for a given server data_id pair. def on_GET(self, origin, content, query, event_id): @@ -374,7 +374,7 @@ class FederationEventServlet(BaseFederationServlet): class FederationStateServlet(BaseFederationServlet): - PATH = "/state/(?P[^/]*)/" + PATH = "/state/(?P[^/]*)" # This is when someone asks for all data for a given context. def on_GET(self, origin, content, query, context): @@ -386,7 +386,7 @@ class FederationStateServlet(BaseFederationServlet): class FederationStateIdsServlet(BaseFederationServlet): - PATH = "/state_ids/(?P[^/]*)/" + PATH = "/state_ids/(?P[^/]*)" def on_GET(self, origin, content, query, room_id): return self.handler.on_state_ids_request( @@ -397,7 +397,7 @@ class FederationStateIdsServlet(BaseFederationServlet): class FederationBackfillServlet(BaseFederationServlet): - PATH = "/backfill/(?P[^/]*)/" + PATH = "/backfill/(?P[^/]*)" def on_GET(self, origin, content, query, context): versions = [x.decode('ascii') for x in query[b"v"]] diff --git a/synapse/rest/client/v2_alpha/groups.py b/synapse/rest/client/v2_alpha/groups.py index 21e02c07c0..251e09fab1 100644 --- a/synapse/rest/client/v2_alpha/groups.py +++ b/synapse/rest/client/v2_alpha/groups.py @@ -190,7 +190,7 @@ class GroupCategoriesServlet(RestServlet): """Get all group categories """ PATTERNS = client_v2_patterns( - "/groups/(?P[^/]*)/categories/$" + "/groups/(?P[^/]*)/categories$" ) def __init__(self, hs):