mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-15 17:12:14 +03:00
Added const reported by cppcheck 2.14
This commit is contained in:
committed by
Eduardo Arias
parent
d053ec6de6
commit
bbef22b3b5
@@ -1175,7 +1175,7 @@ int Transaction::processResponseBody() {
|
||||
int Transaction::appendResponseBody(const unsigned char *buf, size_t len) {
|
||||
int current_size = this->m_responseBody.tellp();
|
||||
|
||||
std::set<std::string> &bi = \
|
||||
const std::set<std::string> &bi = \
|
||||
this->m_rules->m_responseBodyTypeToBeInspected.m_value;
|
||||
auto t = bi.find(m_variableResponseContentType.m_value);
|
||||
if (t == bi.end() && bi.empty() == false) {
|
||||
@@ -1677,7 +1677,7 @@ std::string Transaction::toJSON(int parts) {
|
||||
strlen("components"));
|
||||
|
||||
yajl_gen_array_open(g);
|
||||
for (auto a : m_rules->m_components) {
|
||||
for (const auto &a : m_rules->m_components) {
|
||||
yajl_gen_string(g,
|
||||
reinterpret_cast<const unsigned char*>
|
||||
(a.c_str()), a.length());
|
||||
@@ -2197,7 +2197,7 @@ extern "C" void msc_intervention_cleanup(ModSecurityIntervention *it) {
|
||||
* @retval NULL Nothing was updated.
|
||||
*
|
||||
*/
|
||||
extern "C" const char *msc_get_response_body(Transaction *transaction) {
|
||||
extern "C" const char *msc_get_response_body(const Transaction *transaction) {
|
||||
return transaction->getResponseBody();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user