k-9/src/com/fsck
cketti 6fb59467b7 Changed SmtpTransport.writeLine() to only use one OutputStream.write() call. Apparently some servers got the "be liberal in what you accept from others" part of the robustness principle wrong. When we used multiple calls in writeLine() (command + CR + LF) a separate TCP packet was send each time. It appears that those broken servers accepted the DATA command after DATA + CR and interpreted the LF as part of the actual data. This caused our headers to become part of the body because that LF was interpreted as the empty line that separates headers and body.
As a side effect of this fix sending mail could be slightly faster now due to less packets being sent.

Big thanks to Kevin Newland of Michigan Technological University for organizing a test account.

Fixes issue 799
2010-03-02 02:48:52 +00:00
..
k9 Changed SmtpTransport.writeLine() to only use one OutputStream.write() call. Apparently some servers got the "be liberal in what you accept from others" part of the robustness principle wrong. When we used multiple calls in writeLine() (command + CR + LF) a separate TCP packet was send each time. It appears that those broken servers accepted the DATA command after DATA + CR and interpreted the LF as part of the actual data. This caused our headers to become part of the body because that LF was interpreted as the empty line that separates headers and body. 2010-03-02 02:48:52 +00:00