Latest updates.

This commit is contained in:
Brad Arant committed 2021-08-26 22:57:47 -07:00
1 parent c10b760903
commit deb88cb14d
5 files changed
+12 -12

No files matched your search

+6 -6
View File
@@ -11,17 +11,17 @@ namespace coreutils {
IMFMessage::IMFMessage(ZString &in) : ZString(in) {
while (!in.ifNext((char *)"\r\n")) {
while (!in.ifNext("\r\n")) {
headers.emplace_back(in);
}
ZString type = getHeader((char *)"Content-Type");
int len = getHeader((char *)"Content-Length").asInteger();
ZString type = getHeader("Content-Type");
int len = getHeader("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"));
else if(type.equals((char *)"text/plain"))
if(type.equals("multipart/form-data"))
body = new IMFMultipart(block, getHeaderKeyPairValue("Content-Type", "boundary"));
else if(type.equals("text/plain"))
body = new IMFPlainText(block);
else
body = new IMFBody(block);