Merge pull request #3298 from airween/v3/sethostnamefix

Fix m_requestHostName variable behavior
This commit is contained in:
Ervin Hegedus
2024-11-19 20:49:00 +00:00
committed by GitHub
2 changed files with 7 additions and 5 deletions

View File

@@ -269,15 +269,15 @@ void perform_unit_test(const ModSecurityTest<RegressionTest> &test,
auto modsec_transaction = context.create_transaction();
if (t->hostname != "") {
modsec_transaction.setRequestHostName(t->hostname);
}
clearAuditLog(modsec_transaction.m_rules->m_auditLog->m_path1);
modsec_transaction.processConnection(t->clientIp.c_str(),
t->clientPort, t->serverIp.c_str(), t->serverPort);
if (t->hostname != "") {
modsec_transaction.setRequestHostName(t->hostname);
}
actions(&r, &modsec_transaction, &context.m_server_log);
modsec_transaction.processURI(t->uri.c_str(), t->method.c_str(),