forked from MirrorHub/synapse
Remove trailing slashes from outbound federation requests
This commit is contained in:
parent
39e57f9728
commit
525dd02bbe
1 changed files with 7 additions and 7 deletions
|
@ -51,7 +51,7 @@ class TransportLayerClient(object):
|
|||
logger.debug("get_room_state dest=%s, room=%s",
|
||||
destination, room_id)
|
||||
|
||||
path = _create_v1_path("/state/%s/", room_id)
|
||||
path = _create_v1_path("/state/%s", room_id)
|
||||
return self.client.get_json(
|
||||
destination, path=path, args={"event_id": event_id},
|
||||
)
|
||||
|
@ -73,7 +73,7 @@ class TransportLayerClient(object):
|
|||
logger.debug("get_room_state_ids dest=%s, room=%s",
|
||||
destination, room_id)
|
||||
|
||||
path = _create_v1_path("/state_ids/%s/", room_id)
|
||||
path = _create_v1_path("/state_ids/%s", room_id)
|
||||
return self.client.get_json(
|
||||
destination, path=path, args={"event_id": event_id},
|
||||
)
|
||||
|
@ -95,7 +95,7 @@ class TransportLayerClient(object):
|
|||
logger.debug("get_pdu dest=%s, event_id=%s",
|
||||
destination, event_id)
|
||||
|
||||
path = _create_v1_path("/event/%s/", event_id)
|
||||
path = _create_v1_path("/event/%s", event_id)
|
||||
return self.client.get_json(destination, path=path, timeout=timeout)
|
||||
|
||||
@log_function
|
||||
|
@ -121,7 +121,7 @@ class TransportLayerClient(object):
|
|||
# TODO: raise?
|
||||
return
|
||||
|
||||
path = _create_v1_path("/backfill/%s/", room_id)
|
||||
path = _create_v1_path("/backfill/%s", room_id)
|
||||
|
||||
args = {
|
||||
"v": event_tuples,
|
||||
|
@ -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,
|
||||
|
@ -959,7 +959,7 @@ def _create_v1_path(path, *args):
|
|||
|
||||
Example:
|
||||
|
||||
_create_v1_path("/event/%s/", event_id)
|
||||
_create_v1_path("/event/%s", event_id)
|
||||
|
||||
Args:
|
||||
path (str): String template for the path
|
||||
|
@ -980,7 +980,7 @@ def _create_v2_path(path, *args):
|
|||
|
||||
Example:
|
||||
|
||||
_create_v2_path("/event/%s/", event_id)
|
||||
_create_v2_path("/event/%s", event_id)
|
||||
|
||||
Args:
|
||||
path (str): String template for the path
|
||||
|
|
Loading…
Reference in a new issue