summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad/client/http_target/send.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-09-16 21:43:35 -0400
committerdrebs <drebs@leap.se>2016-12-12 09:11:59 -0200
commitd7740272be029db6229ec5372f277d2934815e98 (patch)
tree65be67cae50f9cb86c5411b7227bb38ce334080e /client/src/leap/soledad/client/http_target/send.py
parent510c0ba3a0c0ade334090a1c36dab9ccae0ba1b4 (diff)
[refactor] adapt fetcher to decryptor
Diffstat (limited to 'client/src/leap/soledad/client/http_target/send.py')
-rw-r--r--client/src/leap/soledad/client/http_target/send.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/http_target/send.py b/client/src/leap/soledad/client/http_target/send.py
index 86744ec2..6f5893b1 100644
--- a/client/src/leap/soledad/client/http_target/send.py
+++ b/client/src/leap/soledad/client/http_target/send.py
@@ -109,7 +109,10 @@ class HTTPDocSender(object):
if doc.is_tombstone():
defer.returnValue((doc, None))
else:
- defer.returnValue((doc, self._crypto.encrypt_doc(doc)))
+ # TODO -- for blobs, should stream the doc raw content
+ # TODO -- get rid of this json encoding
+ content = yield self._crypto.encrypt_doc(doc)
+ defer.returnValue((doc, content.getvalue()))
def _emit_send_status(user_data, idx, total):