From 0de7c907cf856be0c243c9cc48145ff358bd0a4d Mon Sep 17 00:00:00 2001 From: cora32 Date: Sat, 4 Apr 2015 10:37:53 +0300 Subject: [PATCH] Lower case fix. --- finder.cpp | 17 +++++++++-------- negatives.txt | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/finder.cpp b/finder.cpp index c4ee6c2..7c083bb 100644 --- a/finder.cpp +++ b/finder.cpp @@ -369,38 +369,39 @@ int ContentFilter(const char *buff, int port, const char *ip, char *cp, int sz) if(buff != NULL) { QTextCodec *codec; - QString strf; + QString strLower; if (strstri(cp, "shift_jis") != NULL) { codec = QTextCodec::codecForName("Shift-JIS"); - strf = codec->toUnicode(buff).toLower(); + strLower = codec->toUnicode(buff); } else if (strstri(cp, "utf") != NULL) { codec = QTextCodec::codecForName("UTF-8"); - strf = codec->toUnicode(buff).toLower(); + strLower = codec->toUnicode(buff); } else if (strstri(cp, "cp") != NULL || strstri(cp, "windows") != NULL) { codec = QTextCodec::codecForName("Windows-1251"); - strf = codec->toUnicode(buff).toLower(); + strLower = codec->toUnicode(buff); } - else strf = QString(buff); + else strLower = QString(buff); + strLower = strLower.toLower(); int res = 0; if(sz <= 500) { - res = _mainFinderFirst(strf.toLocal8Bit().data(), 1, port, ip, sz); + res = _mainFinderFirst(strLower.toLocal8Bit().data(), 1, port, ip, sz); } else if((sz > 500 && sz <= 3500) || sz > 180000) { - res = _mainFinderFirst(strf.toLocal8Bit().data(), 0, port, ip, sz); + res = _mainFinderFirst(strLower.toLocal8Bit().data(), 0, port, ip, sz); } else if(sz > 3500 && sz <= 180000) { - res = _mainFinderSecond(strf.toLocal8Bit().data(), port, ip); + res = _mainFinderSecond(strLower.toLocal8Bit().data(), port, ip); }; return res; diff --git a/negatives.txt b/negatives.txt index 557fafc..9d7e4f8 100644 --- a/negatives.txt +++ b/negatives.txt @@ -1,4 +1,6 @@ +403 forbidden êóïèòü +X-Adblock-Key エラー pagerror Error report @@ -77,7 +79,6 @@ Herzlich Web-Based Configurator Willkommen! Error 503 -403 forbidden not found 504 gateway timeout Defaultpage @@ -684,7 +685,7 @@ dir320 Access denied for user underconstr test page -This IP has been banned +has been banned the best place the best search the leading