mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Fix regression tests structure : using method instead of protocol
This commit is contained in:
@@ -161,7 +161,7 @@ void perform_unit_test(std::vector<RegressionTest *> *tests,
|
||||
goto end;
|
||||
}
|
||||
|
||||
modsec_assay->processURI(t->uri.c_str(), t->protocol.c_str(),
|
||||
modsec_assay->processURI(t->uri.c_str(), t->method.c_str(),
|
||||
t->httpVersion.c_str());
|
||||
|
||||
actions(&r, modsec_assay);
|
||||
|
@@ -141,8 +141,8 @@ RegressionTest *RegressionTest::from_yajl_node(const yajl_val &node) {
|
||||
if (strcmp(key2, "uri") == 0) {
|
||||
u->uri = YAJL_GET_STRING(val2);
|
||||
}
|
||||
if (strcmp(key2, "protocol") == 0) {
|
||||
u->protocol = YAJL_GET_STRING(val2);
|
||||
if (strcmp(key2, "method") == 0) {
|
||||
u->method = YAJL_GET_STRING(val2);
|
||||
}
|
||||
if (strcmp(key2, "http_version") == 0) {
|
||||
u->httpVersion = YAJL_GET_NUMBER(val2);
|
||||
|
@@ -59,7 +59,7 @@ class RegressionTest {
|
||||
int clientPort;
|
||||
int serverPort;
|
||||
|
||||
std::string protocol;
|
||||
std::string method;
|
||||
std::string httpVersion;
|
||||
std::string uri;
|
||||
|
||||
|
Reference in New Issue
Block a user