fixed GH#155: MailOutputStream mangles consecutive newline sequences

This commit is contained in:
Guenter Obiltschnig 2013-04-22 07:18:23 +02:00
parent 6f863fee09
commit 7264336171

View File

@ -176,7 +176,9 @@ int MailStreamBuf::writeToDevice(char c)
}
else if (_state == ST_CR_LF_DOT)
{
_pOstr->write("\r\n..", 4);
// buffer contains one or more CR-LF pairs
_pOstr->write(_buffer.data(), (std::streamsize) _buffer.length());
_pOstr->write("..", 2);
_state = ST_DATA;
_buffer.clear();
}