{"push_id":723540863,"size":1,"distinct_size":1,"ref":"refs/heads/streaming","head":"74d7c3bec74f2852a12cef45208d6254de620b1a","before":"dffdde4e1d8bbf5d0b5fc6d50b4f2b47d9b120f5","commits":[{"sha":"74d7c3bec74f2852a12cef45208d6254de620b1a","author":{"email":"6b0d31c0d563223024da45691584643ac78c96e8@mcav.com","name":"Marcus Cavanaugh"},"message":"Stream attachment downloads.\n\nIMAP downloads attachments one chunk (currently 1MB) at a time using\nFETCH ranges. POP3 just blasts it through to disk (in chunks). On ActiveSync,\nmoz-chunked-arraybuffer lets us handle data as we receive it. (This also\nentailed moving to their \"multipart\" downloading response format, not to\nbe confused with MIME multipart.)\n\nAttachments now flow to IndexedDB in chunks, stored as `{ parts: [...] }`,\nwhere each part is a partial Blob of the incoming file. When the file has\nfinished downloading, we concatenate all the parts into one super-Blob.\n\nIf download fails, we implement `check_download`, telling it to 'moot' the\noperation, so that we don't attempt to repeatedly download a troublesome file.\n\nThis uses the WHATWG Streams reference implementation with one minor tweak,\nas noted in the updated README. While their reference implementation is still\nin flux as the standard is being developed, our use is isolated to a few files,\nwhich should be no problem to update as the spec becomes finalized.\n\nThe Streams implementation supports dealing with backpressure, however this\npatch does not address backpressure. IMAP is the only protocol we could do\nanything about without socket-level support.\n\nDue to performance and implementation concerns about whiteout-io's MimeParser,\nthis patch converts most of our MIME parsing to use jcranmer's jsmime, which was\nfortunately relatively simple, modulo a bunch of refactoring in `imapchew.js`.\n\nWe still, at the moment, use whiteout-io's MimeParser for parsing text bodies.\nSwapping that over could potentially be a followup bug.","distinct":true,"url":"https://api.github.com/repos/mcav/gaia-email-libs-and-more/commits/74d7c3bec74f2852a12cef45208d6254de620b1a"}]}