summaryrefslogtreecommitdiff
path: root/client/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/leap')
-rw-r--r--client/src/leap/soledad/client/http_target/send_protocol.py2
-rw-r--r--client/src/leap/soledad/client/http_target/support.py8
2 files changed, 8 insertions, 2 deletions
diff --git a/client/src/leap/soledad/client/http_target/send_protocol.py b/client/src/leap/soledad/client/http_target/send_protocol.py
index c72c6d13..b93a4284 100644
--- a/client/src/leap/soledad/client/http_target/send_protocol.py
+++ b/client/src/leap/soledad/client/http_target/send_protocol.py
@@ -39,7 +39,7 @@ class DocStreamProducer(object):
yield call[0](*call[1:])
while self.producer and not self.stop:
if self.pause:
- yield self.sleep(0.01)
+ yield self.sleep(0.001)
continue
call = self.producer.pop(0)
yield call[0](*call[1:])
diff --git a/client/src/leap/soledad/client/http_target/support.py b/client/src/leap/soledad/client/http_target/support.py
index fe91c5b1..c066331c 100644
--- a/client/src/leap/soledad/client/http_target/support.py
+++ b/client/src/leap/soledad/client/http_target/support.py
@@ -169,7 +169,13 @@ class RequestBody(object):
:return: length of the entry after JSON dumps
:rtype: int
"""
- entry = json.dumps(entry_dict)
+ if 'content' in entry_dict:
+ content = entry_dict['content'] or ''
+ del entry_dict['content']
+ entry = json.dumps(entry_dict)
+ entry = entry + ',\r\n' + content
+ else:
+ entry = json.dumps(entry_dict)
self.entries.append(entry)
def pop(self, amount=10):