bugfixes for upcoming 1.2.2 release

This commit is contained in:
Guenter Obiltschnig
2006-08-31 09:33:39 +00:00
parent 7dc7c657f3
commit 81ddac4ead
8 changed files with 74 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
//
// MailMessage.cpp
//
// $Id: //poco/1.2/Net/src/MailMessage.cpp#1 $
// $Id: //poco/1.2/Net/src/MailMessage.cpp#2 $
//
// Library: Net
// Package: Mail
@@ -405,20 +405,29 @@ void MailMessage::readPart(std::istream& istr, const MessageHeader& header, Part
if (icompare(encoding, CTE_QUOTED_PRINTABLE) == 0)
{
QuotedPrintableDecoder decoder(istr);
handler.handlePart(header, decoder);
handlePart(decoder, header, handler);
}
else if (icompare(encoding, CTE_BASE64) == 0)
{
Base64Decoder decoder(istr);
handler.handlePart(header, decoder);
handlePart(decoder, header, handler);
}
else
{
handler.handlePart(header, istr);
handlePart(istr, header, handler);
}
}
void MailMessage::handlePart(std::istream& istr, const MessageHeader& header, PartHandler& handler)
{
handler.handlePart(header, istr);
// Read remaining characters from stream in case
// the handler failed to read the complete stream.
while (istr.good()) istr.get();
}
void MailMessage::setRecipientHeaders(MessageHeader& headers) const
{
std::string to;