mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Moves string related functions from utils' to
utils/string'
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
#include "modsecurity/collection/collections.h"
|
||||
#include "modsecurity/rules.h"
|
||||
#include "src/utils.h"
|
||||
#include "utils/msc_string.h"
|
||||
|
||||
using modsecurity::utils::String;
|
||||
|
||||
namespace modsecurity {
|
||||
namespace RequestBodyProcessor {
|
||||
@@ -716,7 +719,7 @@ int Multipart::process_part_header(std::string *error) {
|
||||
}
|
||||
|
||||
new_value = std::string(data);
|
||||
chomp(&new_value);
|
||||
String::chomp(&new_value);
|
||||
|
||||
/* update the header value in the table */
|
||||
header_value = m_mpp->m_headers.at(m_mpp->m_last_header_name);
|
||||
@@ -766,7 +769,7 @@ int Multipart::process_part_header(std::string *error) {
|
||||
data++;
|
||||
}
|
||||
header_value = std::string(data);
|
||||
chomp(&header_value);
|
||||
String::chomp(&header_value);
|
||||
|
||||
/* error if the name already exists */
|
||||
if (m_mpp->m_headers.count(header_name) > 0) {
|
||||
@@ -1036,7 +1039,7 @@ int Multipart::multipart_complete(std::string *error) {
|
||||
|
||||
|
||||
int Multipart::count_boundary_params(const std::string& str_header_value) {
|
||||
std::string lower = tolower(str_header_value);
|
||||
std::string lower = String::tolower(str_header_value);
|
||||
const char *header_value = lower.c_str();
|
||||
char *duplicate = NULL;
|
||||
char *s = NULL;
|
||||
|
Reference in New Issue
Block a user