When choosing a suffix for a temp file, ensure that we only use the first entry in mimemap for a given MIME type. Avoids exotic suffixes confusing apps

This commit is contained in:
Jean-Francois Dockes
2018-05-17 11:05:05 +02:00
parent d69d2abbde
commit 1c55eeda31
4 changed files with 53 additions and 12 deletions
+1
View File
@@ -415,6 +415,7 @@ int ConfSimple::i_set(const std::string& nm, const std::string& value,
// During the initial construction, just append:
CONFDEB("ConfSimple::i_set: init true: append\n");
m_order.push_back(ConfLine(ConfLine::CFL_VAR, nm));
m_order.back().m_value = value;
return 1;
}
+1
View File
@@ -71,6 +71,7 @@ public:
enum Kind {CFL_COMMENT, CFL_SK, CFL_VAR, CFL_VARCOMMENT};
Kind m_kind;
std::string m_data;
std::string m_value;
std::string m_aux;
ConfLine(Kind k, const std::string& d, std::string a = std::string())
: m_kind(k), m_data(d), m_aux(a) {