From 68949687323b22ea90cae48490ac425b4b8c836c Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Sat, 24 Oct 2020 19:19:57 -0700 Subject: [PATCH] Compiles now. --- IMFMessage.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/IMFMessage.cpp b/IMFMessage.cpp index 8d42032..ef7421a 100644 --- a/IMFMessage.cpp +++ b/IMFMessage.cpp @@ -9,6 +9,7 @@ namespace coreutils { IMFMessage::IMFMessage() {} IMFMessage::IMFMessage(PString &in) { + body = NULL; parse(in); } @@ -17,8 +18,8 @@ namespace coreutils { coreutils::Log(coreutils::LOG_DEBUG_4) << "parse [" << in.str() << "]"; if(in.str() != "") { - headers.emplace_back(in); - return true; + headers.emplace_back(in); + return true; } coreutils::Log(coreutils::LOG_DEBUG_2) << "End of header with Content Type = " << getHeader("Content-Type") << " for " << getHeader("Content-Length") << " bytes."; @@ -26,14 +27,14 @@ namespace coreutils { std::string type = getHeader("Content-Type"); if(type.size() == 0) - type = "text/plain"; + type = "text/plain"; if(type == "multipart/form-data") - body = new IMFMultipart(in, getHeaderKeyPairValue("Content-Type", "boundary")); + body = new IMFMultipart(in, getHeaderKeyPairValue("Content-Type", "boundary")); else if(type == "text/plain") - body = new IMFPlainText(in); + body = new IMFPlainText(in); else - body = new IMFBody(); + body = new IMFBody(); return false; }