mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Change our technique for sending \r\n at the end of smtp commands to
deal with a weird failure on honeycomb
This commit is contained in:
parent
9ad258381b
commit
c7a3b28289
@ -395,12 +395,7 @@ public class SmtpTransport extends Transport {
|
|||||||
* only ASCII characters are allowed in SMTP commands i.e. this string
|
* only ASCII characters are allowed in SMTP commands i.e. this string
|
||||||
* will never contain multi-byte characters.
|
* will never contain multi-byte characters.
|
||||||
*/
|
*/
|
||||||
int len = s.length();
|
byte[] data = (s.concat("\r\n")).getBytes();
|
||||||
byte[] data = new byte[len + 2];
|
|
||||||
s.getBytes(0, len, data, 0);
|
|
||||||
data[len+0] = '\r';
|
|
||||||
data[len+1] = '\n';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Important: Send command + CRLF using just one write() call. Using
|
* Important: Send command + CRLF using just one write() call. Using
|
||||||
* multiple calls will likely result in multiple TCP packets and some
|
* multiple calls will likely result in multiple TCP packets and some
|
||||||
|
Loading…
Reference in New Issue
Block a user