mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Testing performance enhancements by enabling transformations cache
Also reduce the utilization of dynamic cast.
This commit is contained in:
@@ -31,7 +31,9 @@ namespace Variables {
|
||||
|
||||
Variable::Variable(std::string name)
|
||||
: m_name(name),
|
||||
m_collectionName("") {
|
||||
m_collectionName(""),
|
||||
m_isExclusion(false),
|
||||
m_isCount(false) {
|
||||
|
||||
if (m_name.at(0) == '\\') {
|
||||
m_type = RegularExpression;
|
||||
@@ -53,7 +55,9 @@ Variable::Variable(std::string name)
|
||||
Variable::Variable(std::string name, VariableKind kind)
|
||||
: m_name(name),
|
||||
m_collectionName(""),
|
||||
m_kind(kind) {
|
||||
m_kind(kind),
|
||||
m_isExclusion(false),
|
||||
m_isCount(false) {
|
||||
|
||||
if (m_name.at(0) == '\\') {
|
||||
m_type = RegularExpression;
|
||||
|
@@ -74,6 +74,8 @@ class Variable {
|
||||
|
||||
VariableType m_type;
|
||||
VariableKind m_kind;
|
||||
bool m_isExclusion;
|
||||
bool m_isCount;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -34,7 +34,8 @@ class Exclusion : public Variable {
|
||||
public:
|
||||
explicit Exclusion(Variable *v)
|
||||
: Variable(v->m_name),
|
||||
var(v) { }
|
||||
var(v)
|
||||
{ m_isExclusion = true; }
|
||||
|
||||
std::list<transaction::Variable *> *
|
||||
evaluate(Assay *assay) override;
|
||||
|
Reference in New Issue
Block a user