remove trailing slashes as per #3622

This commit is contained in:
Neil Johnson 2019-02-04 18:05:55 +00:00
parent 142b2cddf0
commit 1847435e80
3 changed files with 6 additions and 6 deletions

View file

@ -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,

View file

@ -366,7 +366,7 @@ class FederationSendServlet(BaseFederationServlet):
class FederationEventServlet(BaseFederationServlet):
PATH = "/event/(?P<event_id>[^/]*)/"
PATH = "/event/(?P<event_id>[^/]*)"
# 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<context>[^/]*)/"
PATH = "/state/(?P<context>[^/]*)"
# 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<room_id>[^/]*)/"
PATH = "/state_ids/(?P<room_id>[^/]*)"
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<context>[^/]*)/"
PATH = "/backfill/(?P<context>[^/]*)"
def on_GET(self, origin, content, query, context):
versions = [x.decode('ascii') for x in query[b"v"]]

View file

@ -190,7 +190,7 @@ class GroupCategoriesServlet(RestServlet):
"""Get all group categories
"""
PATTERNS = client_v2_patterns(
"/groups/(?P<group_id>[^/]*)/categories/$"
"/groups/(?P<group_id>[^/]*)/categories$"
)
def __init__(self, hs):