diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-10-13 11:49:40 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-10-13 11:49:55 +0100 |
commit | 10ef8e6e4bb9d50fd2c636cfbb66d3dd6d6f94e9 (patch) | |
tree | 926a1e70d4009d9435d483bf6ca8d834488ef6f0 /synapse/federation/transport.py | |
parent | Merge branch 'develop' into server2server_signing (diff) | |
download | synapse-10ef8e6e4bb9d50fd2c636cfbb66d3dd6d6f94e9.tar.xz |
SYN-75 sign at the request level rather than the transaction level
Diffstat (limited to 'synapse/federation/transport.py')
-rw-r--r-- | synapse/federation/transport.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/synapse/federation/transport.py b/synapse/federation/transport.py index 1f864f5fa7..48fc9fbf5e 100644 --- a/synapse/federation/transport.py +++ b/synapse/federation/transport.py @@ -163,27 +163,15 @@ class TransportLayer(object): if transaction.destination == self.server_name: raise RuntimeError("Transport layer cannot send to itself!") - if json_data_callback is None: - def json_data_callback(): - return transaction.get_dict() - - # FIXME (erikj): This is a bit of a hack to make the Pdu age - # keys work - def cb(destination, method, path_bytes, producer): - json_data = json_data_callback() - del json_data["destination"] - del json_data["transaction_id"] - producer.reset(json_data) - + # FIXME: This is only used by the tests. The actual json sent is + # generated by the json_data_callback. json_data = transaction.get_dict() - del json_data["destination"] - del json_data["transaction_id"] code, response = yield self.client.put_json( transaction.destination, path=PREFIX + "/send/%s/" % transaction.transaction_id, data=json_data, - on_send_callback=cb, + json_data_callback=json_data_callback, ) logger.debug( |