Browse Source

Case-insensitive MIME headers

master
François 3 months ago
parent
commit
511e14785b
  1. 19
      src/cpp/Attachment.cpp
  2. 4
      src/cpp/eMailShrinker.cpp

19
src/cpp/Attachment.cpp

@ -297,10 +297,23 @@ Attachment::Attachment (ifstream &mbox, const int &level, const streamoff beginI
// ================================================================================
inline string
cleanString (const string &line) {
cleanString (string line) {
static const regex findVarVal ("(\\s*[a-zA-Z_*-]+=)((\"(\\\\.|[^\\\\])*\")|[^; \t]*;?)");
string result;
smatch m;
while (regex_search (line, m, findVarVal)) {
result += m.prefix ();
string id (m[1]);
toLower (id);
result += id;
result += m[2];
line = m.suffix ();
}
if (!line.empty () && line[line.size() - 1] == '\r')
return line.substr (0, line.size () - 1);
return line;
line = line.substr (0, line.size () - 1);
result += line;
return result;
}
void

4
src/cpp/eMailShrinker.cpp

@ -33,8 +33,8 @@
////////////////////////////////////////////////////////////////////////////
#include "version.hpp"
const std::string kaz::LAST_VERSION_NUM ("2.18");
const std::string kaz::LAST_VERSION_DATE ("2023-10-29");
const std::string kaz::LAST_VERSION_NUM ("2.19");
const std::string kaz::LAST_VERSION_DATE ("2024-02-11");
const std::string kaz::LAST_VERSION (LAST_VERSION_NUM+" "+LAST_VERSION_DATE+" eMailShrinker");
#include <iostream>

Loading…
Cancel
Save