Moves string related functions from utils' to utils/string'

This commit is contained in:
Felipe Zimmerle
2016-11-01 14:59:06 -03:00
parent 9733cacd4d
commit 73c4d69174
25 changed files with 403 additions and 236 deletions

View File

@@ -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;