Lower case fix.

This commit is contained in:
cora32 2015-04-04 10:37:53 +03:00
parent cc1e51e2a8
commit 0de7c907cf
2 changed files with 12 additions and 10 deletions

View File

@ -369,38 +369,39 @@ int ContentFilter(const char *buff, int port, const char *ip, char *cp, int sz)
if(buff != NULL) if(buff != NULL)
{ {
QTextCodec *codec; QTextCodec *codec;
QString strf; QString strLower;
if (strstri(cp, "shift_jis") != NULL) if (strstri(cp, "shift_jis") != NULL)
{ {
codec = QTextCodec::codecForName("Shift-JIS"); codec = QTextCodec::codecForName("Shift-JIS");
strf = codec->toUnicode(buff).toLower(); strLower = codec->toUnicode(buff);
} }
else if (strstri(cp, "utf") != NULL) else if (strstri(cp, "utf") != NULL)
{ {
codec = QTextCodec::codecForName("UTF-8"); codec = QTextCodec::codecForName("UTF-8");
strf = codec->toUnicode(buff).toLower(); strLower = codec->toUnicode(buff);
} }
else if (strstri(cp, "cp") != NULL || strstri(cp, "windows") != NULL) else if (strstri(cp, "cp") != NULL || strstri(cp, "windows") != NULL)
{ {
codec = QTextCodec::codecForName("Windows-1251"); 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; int res = 0;
if(sz <= 500) 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) 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) else if(sz > 3500 && sz <= 180000)
{ {
res = _mainFinderSecond(strf.toLocal8Bit().data(), port, ip); res = _mainFinderSecond(strLower.toLocal8Bit().data(), port, ip);
}; };
return res; return res;

View File

@ -1,4 +1,6 @@
403 forbidden
êóïèòü êóïèòü
X-Adblock-Key
エラー エラー
pagerror pagerror
Error report Error report
@ -77,7 +79,6 @@ Herzlich
Web-Based Configurator Web-Based Configurator
Willkommen! Willkommen!
Error 503 Error 503
403 forbidden
not found not found
504 gateway timeout 504 gateway timeout
Defaultpage Defaultpage
@ -684,7 +685,7 @@ dir320
Access denied for user Access denied for user
underconstr underconstr
test page test page
This IP has been banned has been banned
the best place the best place
the best search the best search
the leading the leading