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 @@
//
// HTMLForm.cpp
//
// $Id: //poco/1.2/Net/src/HTMLForm.cpp#1 $
// $Id: //poco/1.2/Net/src/HTMLForm.cpp#2 $
//
// Library: Net
// Package: HTML
@@ -288,6 +288,8 @@ void HTMLForm::readMultipart(std::istream& istr, PartHandler& handler)
if (params.has("filename"))
{
handler.handlePart(header, reader.stream());
// Ensure that the complete part has been read.
while (reader.stream().good()) reader.stream().get();
}
else
{

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;

View File

@@ -1,7 +1,7 @@
//
// MultipartReader.cpp
//
// $Id: //poco/1.2/Net/src/MultipartReader.cpp#1 $
// $Id: //poco/1.2/Net/src/MultipartReader.cpp#2 $
//
// Library: Net
// Package: Messages
@@ -106,8 +106,8 @@ int MultipartStreamBuf::readFromDevice(char* buffer, std::streamsize length)
if (ch == '\r')
{
ch = _istr.get(); // '\n'
return 0;
}
return 0;
}
else if (ch == '-' && _istr.peek() == '-')
{

View File

@@ -1,7 +1,7 @@
//
// SocketNotifier.cpp
//
// $Id: //poco/1.2/Net/src/SocketNotifier.cpp#1 $
// $Id: //poco/1.2/Net/src/SocketNotifier.cpp#2 $
//
// Library: Net
// Package: Reactor
@@ -64,7 +64,7 @@ void SocketNotifier::addObserver(SocketReactor* pReactor, const Poco::AbstractOb
else if (observer.accepts(pReactor->_pErrorNotification))
_events.insert(pReactor->_pErrorNotification.get());
else if (observer.accepts(pReactor->_pTimeoutNotification))
_events.insert(pReactor->_pErrorNotification.get());
_events.insert(pReactor->_pTimeoutNotification.get());
}