Improves macro expansion speed and variable set attribution

This commit is contained in:
Felipe Zimmerle
2017-03-08 17:49:12 -03:00
parent f17da09fc0
commit 5e59d19121
3 changed files with 83 additions and 74 deletions

View File

@@ -38,6 +38,14 @@ class MacroExpansion {
modsecurity::Rule *r, Transaction *transaction);
static std::string expandKeepOriginal(const std::string& input,
Transaction *transaction);
static inline bool compareStrNoCase(const std::string &a, const std::string &b) {
return a.size() == b.size()
&& std::equal(a.begin(), a.end(), b.begin(),
[](char aa, char bb) {
return toupper(aa) == bb;
});
};
};