mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Warming up to the remote collections support
Huge refactoring to have the code in shape to later support the remote collections with different backends.
This commit is contained in:
@@ -28,14 +28,14 @@ namespace modsecurity {
|
||||
namespace Variables {
|
||||
|
||||
void Duration::evaluateInternal(Transaction *transaction,
|
||||
std::vector<const transaction::Variable *> *l) {
|
||||
std::vector<const collection::Variable *> *l) {
|
||||
std::string res;
|
||||
|
||||
double e = cpu_seconds() - transaction->m_creationTimeStamp;
|
||||
|
||||
res = std::to_string(e);
|
||||
|
||||
l->push_back(new transaction::Variable("DURATION", std::string(res)));
|
||||
l->push_back(new collection::Variable("DURATION", std::string(res)));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user