1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

Fixes Issue 1330

Flush the output stream so that small messages have bodies.  (And
presumably so that the entirety of big messages are sent.)
This commit is contained in:
Daniel Applebaum 2010-03-18 03:23:45 +00:00
parent ec9f395498
commit 76f33ba5ff

View File

@ -1977,9 +1977,10 @@ public class WebDavStore extends Store
out = new ByteArrayOutputStream(); out = new ByteArrayOutputStream();
} }
open(OpenMode.READ_WRITE); open(OpenMode.READ_WRITE);
message.writeTo( EOLConvertingOutputStream msgOut = new EOLConvertingOutputStream(
new EOLConvertingOutputStream( new BufferedOutputStream(out, 1024));
new BufferedOutputStream(out, 1024))); message.writeTo(msgOut);
msgOut.flush();
bodyEntity = new StringEntity(out.toString(), "UTF-8"); bodyEntity = new StringEntity(out.toString(), "UTF-8");
bodyEntity.setContentType("message/rfc822"); bodyEntity.setContentType("message/rfc822");