Skip to content

Commit 7264336

Browse files
committed
fixed GH#155: MailOutputStream mangles consecutive newline sequences
1 parent 6f863fe commit 7264336

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Net/src/MailStream.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ int MailStreamBuf::writeToDevice(char c)
176176
}
177177
else if (_state == ST_CR_LF_DOT)
178178
{
179-
_pOstr->write("\r\n..", 4);
179+
// buffer contains one or more CR-LF pairs
180+
_pOstr->write(_buffer.data(), (std::streamsize) _buffer.length());
181+
_pOstr->write("..", 2);
180182
_state = ST_DATA;
181183
_buffer.clear();
182184
}

0 commit comments

Comments
 (0)