1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
k-9/src/com/fsck/k9
Joe Steele 1d1db50a9f Don't always base64 encode in BinaryTempFileBody.writeTo
Issue 5734 exemplifies the problem:  receive a message with an attachment
of type message/rfc822 that doesn't use base64 encoding for the body of
the attached message.  K-9 Mail incorrectly stores the attached message
locally with its original headers but using base64 encoding for the body.
A discrepancy thus exists between what the headers say about the encoding
of the body versus the actual encoding used.  This is obvious when
attempting to view the attachment (either by using a compatible message
viewer available on the device or by saving the attachment to a file and
viewing the file contents).

The process: When a message with an attached sub-message is received,
Message.parse puts the attachment in a new MimeMessage with the
attachment's body in a BinaryTempFileBody.  LocalFolder.saveAttachment
then calls Message.writeTo (which later calls BinaryTempFileBody.writeTo)
to place the entire attachment (headers and body) in a new file that will
become a LocalAttachmentBody.  Until now,  BinaryTempFileBody.writeTo
could only save the message body using base64 encoding.

This commit implements BinaryTempFileBody.setEncoding and assures that the
body is written out with the same encoding that was found in its  headers.
2013-09-03 19:51:26 -04:00
..
activity Merge branch 'pr/364' 2013-08-29 21:14:04 +02:00
cache Avoid CursorIndexOutOfBoundsException when deleting a message 2013-08-23 04:16:00 +02:00
controller Convert OpenMode from an Enum to static ints for perf improvement. 2013-07-30 21:32:35 -04:00
crypto Converted message view to a fragment 2012-10-05 18:14:07 +02:00
fragment Fix flagging of messages in message list 2013-08-27 16:08:05 -04:00
helper Add setting to toggle colored background of fallback contact pictures 2013-08-16 18:43:00 +02:00
mail Don't always base64 encode in BinaryTempFileBody.writeTo 2013-09-03 19:51:26 -04:00
preferences Use named indices to get values from "visible refile actions" preference 2013-08-25 11:35:14 +01:00
provider Avoid NullPointerException (reported via Play Store) 2013-03-21 23:19:11 +01:00
remotecontrol astyle-d 2011-02-26 18:39:06 -06:00
search Convert OpenMode from an Enum to static ints for perf improvement. 2013-07-30 21:32:35 -04:00
service Convert theme setting value to an enum. 2013-02-08 15:24:03 +01:00
view Return to old style chips for accounts, folders and messages. 2013-08-22 20:56:55 -04:00
Account.java Make sure Account.getDescription() never returns null 2013-08-10 00:08:18 +02:00
AccountStats.java Grey out unavailable accounts. 2011-03-19 12:36:58 -05:00
BaseAccount.java astyle-d 2011-02-26 18:39:06 -06:00
EmailAddressAdapter.java Don't use EmailAddressAdapter as singleton 2012-04-11 03:26:45 +02:00
EmailAddressValidator.java astyle-d 2011-02-26 18:39:06 -06:00
FontSizes.java merge date and time font size preference into one 2013-02-11 13:05:52 +01:00
Identity.java astyle-d 2011-02-26 18:39:06 -06:00
K9.java Fix code style/formatting 2013-08-29 17:34:46 +02:00
NotificationSetting.java astyle-d 2011-02-26 18:39:06 -06:00
Preferences.java Add code to remove references to LocalStore when deleting accounts 2013-08-30 03:02:50 +02:00
PRNGFixes.java add notes about the reason for https://github.com/k9mail/k-9/pull/367 2013-08-27 14:57:21 -04:00