diff --git a/src/common/cstr.h b/src/common/cstr.h index 89a84206..6d481974 100644 --- a/src/common/cstr.h +++ b/src/common/cstr.h @@ -51,6 +51,7 @@ DEF_CSTR(fileu, "file://"); DEF_CSTR(fmtime, "fmtime"); DEF_CSTR(ipath, "ipath"); DEF_CSTR(iso_8859_1, "ISO-8859-1"); +DEF_CSTR(md5, "md5"); DEF_CSTR(mimetype, "mimetype"); DEF_CSTR(minwilds, "*?["); DEF_CSTR(newline, "\n"); diff --git a/src/internfile/mh_exec.cpp b/src/internfile/mh_exec.cpp index 536c583f..40a8caf4 100644 --- a/src/internfile/mh_exec.cpp +++ b/src/internfile/mh_exec.cpp @@ -165,7 +165,7 @@ void MimeHandlerExec::finaldetails() string md5, xmd5, reason; if (MD5File(m_fn, md5, &reason)) { - m_metaData["md5"] = MD5HexPrint(md5, xmd5); + m_metaData[cstr_md5] = MD5HexPrint(md5, xmd5); } else { LOGERR(("MimeHandlerExec: cant compute md5 for [%s]: %s\n", m_fn.c_str(), reason.c_str())); diff --git a/src/internfile/mh_execm.cpp b/src/internfile/mh_execm.cpp index 1c77ce1b..c40d5494 100644 --- a/src/internfile/mh_execm.cpp +++ b/src/internfile/mh_execm.cpp @@ -268,13 +268,13 @@ bool MimeHandlerExecMultiple::next_document() m_metaData[cstr_mimetype] = mtype; string md5, xmd5; MD5String(m_metaData[cstr_content], md5); - m_metaData["md5"] = MD5HexPrint(md5, xmd5); + m_metaData[cstr_md5] = MD5HexPrint(md5, xmd5); } else { m_metaData[cstr_mimetype] = mtype.empty() ? "text/html" : mtype; m_metaData.erase(cstr_ipath); string md5, xmd5, reason; if (MD5File(m_fn, md5, &reason)) { - m_metaData["md5"] = MD5HexPrint(md5, xmd5); + m_metaData[cstr_md5] = MD5HexPrint(md5, xmd5); } else { LOGERR(("MimeHandlerExecM: cant compute md5 for [%s]: %s\n", m_fn.c_str(), reason.c_str())); diff --git a/src/internfile/mh_html.cpp b/src/internfile/mh_html.cpp index 80277cf1..237caf8a 100644 --- a/src/internfile/mh_html.cpp +++ b/src/internfile/mh_html.cpp @@ -56,7 +56,7 @@ bool MimeHandlerHtml::set_document_string(const string& htext) // We want to compute the md5 now because we may modify m_html later string md5, xmd5; MD5String(htext, md5); - m_metaData["md5"] = MD5HexPrint(md5, xmd5); + m_metaData[cstr_md5] = MD5HexPrint(md5, xmd5); return true; } diff --git a/src/internfile/mh_mail.cpp b/src/internfile/mh_mail.cpp index 6520e768..814f3bcf 100644 --- a/src/internfile/mh_mail.cpp +++ b/src/internfile/mh_mail.cpp @@ -100,7 +100,7 @@ bool MimeHandlerMail::set_document_file(const string &fn) // the md5 computation to the mime analysis, but ... string md5, xmd5, reason; if (MD5File(fn, md5, &reason)) { - m_metaData["md5"] = MD5HexPrint(md5, xmd5); + m_metaData[cstr_md5] = MD5HexPrint(md5, xmd5); } else { LOGERR(("MimeHandlerMail: cant compute md5 for [%s]: %s\n", fn.c_str(), reason.c_str())); @@ -132,7 +132,7 @@ bool MimeHandlerMail::set_document_string(const string &msgtxt) string md5, xmd5; MD5String(msgtxt, md5); - m_metaData["md5"] = MD5HexPrint(md5, xmd5); + m_metaData[cstr_md5] = MD5HexPrint(md5, xmd5); m_stream = new stringstream(msgtxt); delete m_bincdoc; diff --git a/src/internfile/mh_text.cpp b/src/internfile/mh_text.cpp index ed3f260f..0d6ddf5f 100644 --- a/src/internfile/mh_text.cpp +++ b/src/internfile/mh_text.cpp @@ -81,7 +81,7 @@ bool MimeHandlerText::set_document_file(const string &fn) string md5, xmd5; MD5String(m_text, md5); - m_metaData["md5"] = MD5HexPrint(md5, xmd5); + m_metaData[cstr_md5] = MD5HexPrint(md5, xmd5); m_havedoc = true; return true; } @@ -91,7 +91,7 @@ bool MimeHandlerText::set_document_string(const string& otext) m_text = otext; string md5, xmd5; MD5String(m_text, md5); - m_metaData["md5"] = MD5HexPrint(md5, xmd5); + m_metaData[cstr_md5] = MD5HexPrint(md5, xmd5); m_havedoc = true; return true; }