mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
bugfixes for upcoming 1.2.2 release
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -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() == '-')
|
||||
{
|
||||
|
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user