diff options
-rw-r--r-- | client/src/leap/soledad/client/_pipes.py | 14 | ||||
-rw-r--r-- | server/src/leap/soledad/server/_blobs.py | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/client/src/leap/soledad/client/_pipes.py b/client/src/leap/soledad/client/_pipes.py index 443f4a70..eef3f1f9 100644 --- a/client/src/leap/soledad/client/_pipes.py +++ b/client/src/leap/soledad/client/_pipes.py @@ -39,13 +39,13 @@ class TruncatedTailPipe(object): self._truncate_tail() def _truncate_tail(self): - overflow_size = self.buffer.tell() - self.tail_size - self.buffer.seek(0) - self.output.write(self.buffer.read(overflow_size)) - remaining = self.buffer.read() - self.buffer.seek(0) - self.buffer.write(remaining) - self.buffer.truncate() + overflow_size = self.buffer.tell() - self.tail_size + self.buffer.seek(0) + self.output.write(self.buffer.read(overflow_size)) + remaining = self.buffer.read() + self.buffer.seek(0) + self.buffer.write(remaining) + self.buffer.truncate() def close(self): return self.output diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py index 78b3bddf..d9e40976 100644 --- a/server/src/leap/soledad/server/_blobs.py +++ b/server/src/leap/soledad/server/_blobs.py @@ -118,9 +118,9 @@ class FilesystemBlobsBackend(object): def tag_header(self, user, blob_id, request): with open(self._get_path(user, blob_id)) as doc_file: - doc_file.seek(-16, 2) - tag = base64.urlsafe_b64encode(doc_file.read()) - request.responseHeaders.setRawHeaders('Tag', [tag]) + doc_file.seek(-16, 2) + tag = base64.urlsafe_b64encode(doc_file.read()) + request.responseHeaders.setRawHeaders('Tag', [tag]) def read_blob(self, user, blob_id, request): logger.info('reading blob: %s - %s' % (user, blob_id)) |