mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Cosmetics: fix some cppcheck complains to please QA
This commit is contained in:
@@ -42,11 +42,14 @@ void process_special_request (int j) {
|
||||
msc_process_uri(transaction,
|
||||
"http://www.modsecurity.org/test?foo=herewego",
|
||||
"GET", "1.1");
|
||||
msc_add_request_header(transaction, "User-Agent",
|
||||
"Basic ModSecurity example");
|
||||
msc_add_request_header(transaction,
|
||||
(const unsigned char *) "User-Agent",
|
||||
(const unsigned char *) "Basic ModSecurity example");
|
||||
msc_process_request_headers(transaction);
|
||||
msc_process_request_body(transaction);
|
||||
msc_add_response_header(transaction, "Content-type", "text/html");
|
||||
msc_add_response_header(transaction,
|
||||
(const unsigned char *) "Content-type",
|
||||
(const unsigned char *) "text/html");
|
||||
msc_process_response_headers(transaction, 200, "HTTP 1.0");
|
||||
msc_process_response_body(transaction);
|
||||
msc_process_logging(transaction);
|
||||
@@ -70,11 +73,14 @@ void process_request (int j) {
|
||||
msc_process_uri(transaction,
|
||||
"http://www.modsecurity.org/test?key1=value1&key2=value2&key3=value3",
|
||||
"GET", "1.1");
|
||||
msc_add_request_header(transaction, "User-Agent",
|
||||
"Basic ModSecurity example");
|
||||
msc_add_request_header(transaction,
|
||||
(const unsigned char *) "User-Agent",
|
||||
(const unsigned char *) "Basic ModSecurity example");
|
||||
msc_process_request_headers(transaction);
|
||||
msc_process_request_body(transaction);
|
||||
msc_add_response_header(transaction, "Content-type", "text/html");
|
||||
msc_add_response_header(transaction,
|
||||
(const unsigned char *) "Content-type",
|
||||
(const unsigned char *) "text/html");
|
||||
msc_process_response_headers(transaction, 200, "HTTP 1.0");
|
||||
msc_process_response_body(transaction);
|
||||
msc_process_logging(transaction);
|
||||
|
@@ -29,8 +29,8 @@ int main(int argc, char **argv) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*(argv++);
|
||||
std::string rules(*argv);
|
||||
char *rule = *(argv++);
|
||||
std::string rules(rule);
|
||||
ReadingLogsViaRuleMessage rlvrm(request_header, request_uri, request_body,
|
||||
response_headers, response_body, ip, rules);
|
||||
rlvrm.process();
|
||||
|
@@ -133,9 +133,8 @@ int main(int argc, char **argv) {
|
||||
std::cout << std::endl << std::endl;
|
||||
return -1;
|
||||
}
|
||||
*(argv++);
|
||||
|
||||
std::string rules_arg(*argv);
|
||||
char *rule = *(argv++);
|
||||
std::string rules_arg(rule);
|
||||
|
||||
/**
|
||||
* ModSecurity initial setup
|
||||
|
Reference in New Issue
Block a user