# HG changeset patch # User František Kučera # Date 1612655468 -3600 # Node ID 15d9b0ca161a8530795195852f7a3829e82047aa # Parent 47b677177365c5fccc75aad6ed4a18f6a78d9963 references/message-id also in lower case diff -r 47b677177365 -r 15d9b0ca161a src/XMLDocumentConstructor.h --- a/src/XMLDocumentConstructor.h Sun Feb 07 00:33:37 2021 +0100 +++ b/src/XMLDocumentConstructor.h Sun Feb 07 00:51:08 2021 +0100 @@ -94,9 +94,9 @@ std::string fetchBodyBinary(std::shared_ptr body) { std::stringstream result; - vmime::utility::outputStreamAdapter binaryResultAdapter(result); - body->getContents()->extract(binaryResultAdapter); - binaryResultAdapter.flush(); + vmime::utility::outputStreamAdapter resultAdapter(result); + body->getContents()->extract(resultAdapter); + resultAdapter.flush(); return toHex(result.str()); } @@ -104,6 +104,7 @@ element->set_attribute("content-type", format(body->getContentType())); // element->set_attribute("content-type-charset", body->getCharset().getName()); // element->set_attribute("content-transfer-encoding", body->getEncoding().getName()); + // TODO: size of raw data if (body->getPartCount() == 0) { if (body->getContentType().getType() == "text") element->add_child_cdata(fetchBodyText(body)); @@ -191,7 +192,7 @@ field->add_child_text(value->getId()); } else if (auto value = mimeField->getValue()) { for (auto messageId : value->getMessageIdList()) { - xmlpp::Element* messageIdField = field->add_child("Mssage-ID"); // TODO: lower case? + xmlpp::Element* messageIdField = field->add_child("message-id"); messageIdField->add_child_text(messageId->getId()); } } else if (auto value = mimeField->getValue()) {