Working Compiling Version

This commit is contained in:
Brad Arant committed 2021-08-07 11:47:01 -07:00
1 parent 78cb2fdd10
commit ff4d818f8b
4 files changed
+16 -11

No files matched your search

+6 -6
View File
@@ -5,22 +5,22 @@
#include "Log.h"
namespace coreutils {
IMFMessage::IMFMessage() : ZString() {
}
IMFMessage::IMFMessage(ZString &in) : ZString(in) {
while (!in.ifNext((char *)"\r\n")) {
headers.emplace_back(in);
}
ZString type = getHeader((char *)"Content-Type");
int len = getHeader((char *)"Content-Length").asInteger();
if(len > 0) {
ZString block = in.readBlock(len);
if(type.equals((char *)"multipart/form-data"))
body = new IMFMultipart(block, getHeaderKeyPairValue((char *)"Content-Type", (char *)"boundary"));
if(type.equals((char *)"multipart/form-data"))
body = new IMFMultipart(block, getHeaderKeyPairValue((char *)"Content-Type", (char *)"boundary"));
else if(type.equals((char *)"text/plain"))
body = new IMFPlainText(block);
else