Replaces lower case implementation

This commit is contained in:
Felipe Zimmerle 2019-03-20 13:59:30 -03:00
parent 1d33015934
commit 69d1112da3
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
2 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,8 @@
v3.x.y - YYYY-MMM-DD (to be released)
-------------------------------------
-------------------------------------
- Replaced t:lowerCase backend for a better performance.
[@zimmerle]
- More structured rules dump. Better supporting debugging.
[@zimmerle]
- Added the basics for supporting better error/warning handling while

View File

@ -30,11 +30,8 @@ namespace transformations {
void LowerCase::execute(Transaction *t,
ModSecString &in,
ModSecString &out) {
std::locale loc;
out.resize(in.size());
for (std::string::size_type i=0; i < in.size(); ++i) {
out[i] = std::tolower(in[i], loc);
}
std::transform(in.begin(), in.end(), out.begin(), ::tolower);
}