Go to file
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
assets SingleMessageView cleanup 2012-04-04 10:04:57 +02:00
compile-only-libs upgrade our android-support library in the hopes that the newer version 2013-07-17 18:36:31 -04:00
docs Added diagram that visualizes activity interactions 2011-10-27 19:13:13 +02:00
images Change appearance of unread widget 2013-03-16 01:57:21 +01:00
libs upgraded Mime4J 0.7-SNAPSHOT -> 0.7.2 (fixes MimeMultipart parser bug) 2012-08-15 01:47:57 +02:00
plugins Update ckChangeLog to v1.0.0 2013-07-23 20:28:16 +02:00
res Merge pull request #373 2013-09-02 22:23:56 +02:00
src Don't always base64 encode in BinaryTempFileBody.writeTo 2013-09-03 19:51:26 -04:00
tests Simplify Eclipse setup. 2013-05-31 18:00:45 -04:00
tools Add script to sync localized strings.xml files with the master file 2013-07-09 17:16:23 +02:00
.gitignore Ignore Atlassian config from IntelliJ 2013-07-16 14:55:37 -07:00
.gitmodules Kill our use of submodules dead. They're too painful for new contributors 2012-11-24 17:15:01 -05:00
.project Simplify Eclipse setup. 2013-05-31 18:00:45 -04:00
ActionBarSherlock.iml IntelliJ IDEA: Update android support version per e796468256. 2013-01-09 13:24:30 -08:00
Android-PullToRefresh.iml IntelliJ IDEA: 12.0 updates. 2012-12-18 15:11:47 -08:00
Android.mk Merge ashleywillis' changes in https://github.com/k9mail/k-9/pull/97. 2011-11-14 14:00:15 -08:00
AndroidManifest.xml Bumped manifest to 4.511 2013-08-31 11:57:59 -04:00
HTMLCLEANER_LICENSE Merge ashleywillis' changes in https://github.com/k9mail/k-9/pull/97. 2011-11-14 14:00:15 -08:00
HoloColorPicker.iml Add pom and IntelliJ configuration for HoloColorPicker 2013-01-17 02:16:24 -08:00
MODULE_LICENSE_APACHE2 Initial commit - This source code should be EXACTLY what the current version of the 'Email' application in the android repo looks like as of this date. 2008-10-28 01:04:44 +00:00
NOTICE Initial commit - This source code should be EXACTLY what the current version of the 'Email' application in the android repo looks like as of this date. 2008-10-28 01:04:44 +00:00
ant.properties Upgrade to SDK 15 2012-03-11 14:31:35 -05:00
build.gradle Update gradle version as required for Android Studio 0.2.x 2013-07-16 15:42:07 +02:00
build.xml Fixes for automated change log publication 2013-08-27 20:28:06 -04:00
build_common.xml fixed location of ant-contrib.jar in build_common.xml when running ant from tests/. 2012-06-07 22:57:41 -05:00
ckChangeLog.iml IntelliJ IDEA: Project updates to drag in ckChangeLog. 2013-01-09 13:26:42 -08:00
k9mail.iml Add pom and IntelliJ configuration for HoloColorPicker 2013-01-17 02:16:24 -08:00
k9mail.ipr Add pom and IntelliJ configuration for HoloColorPicker 2013-01-17 02:16:24 -08:00
proguard.cfg Upgrade us to android-14 infrastructure 2011-10-27 12:41:24 -04:00
project.properties Update targetSdkVersion to 17 2013-05-24 22:33:09 +02:00
settings.gradle Add initial Gradle support 2013-06-28 23:59:08 +02:00