mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Adds support to the RESPONSE_PROTOCOL variable
This commit is contained in:
@@ -291,7 +291,7 @@ void perform_unit_test(ModSecurityTest<RegressionTest> *test,
|
||||
headers.second.c_str());
|
||||
}
|
||||
|
||||
modsec_transaction->processResponseHeaders(r.status, "HTTP 1.1");
|
||||
modsec_transaction->processResponseHeaders(r.status, t->response_protocol);
|
||||
actions(&r, modsec_transaction);
|
||||
#if 0
|
||||
if (r.status != 200) {
|
||||
|
@@ -169,6 +169,9 @@ RegressionTest *RegressionTest::from_yajl_node(const yajl_val &node) {
|
||||
if (strcmp(key2, "body") == 0) {
|
||||
u->response_body = yajl_array_to_str(val2);
|
||||
}
|
||||
if (strcmp(key2, "protocol") == 0) {
|
||||
u->response_protocol = YAJL_GET_STRING(val2);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strcmp(key, "expected") == 0) {
|
||||
|
@@ -48,6 +48,7 @@ class RegressionTest {
|
||||
std::unordered_map<std::string, std::string> response_headers;
|
||||
std::string request_body;
|
||||
std::string response_body;
|
||||
std::string response_protocol;
|
||||
|
||||
std::string audit_log;
|
||||
std::string debug_log;
|
||||
|
Reference in New Issue
Block a user