[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/kioslave/http
From: Nickolai Shaforostoff <shafff () ukr ! net>
Date: 2007-02-09 17:27:17
Message-ID: 1171042037.836484.29165.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 631982 by shaforo:
decode auth message properly, for sites like lib.homelinux.org (backport)
M +10 -2 http.cc
--- branches/KDE/3.5/kdelibs/kioslave/http/http.cc #631981:631982
@@ -5068,13 +5068,21 @@
while( (*p == ' ') || (*p == ',') || (*p == '\t') ) { p++; }
if ( strncasecmp( p, "realm=", 6 ) == 0 )
{
+ //for sites like lib.homelinux.org
+ QTextCodec* oldCodec=QTextCodec::codecForCStrings();
+ if (KGlobal::locale()->language().contains("ru"))
+ QTextCodec::setCodecForCStrings(QTextCodec::codecForName("CP1251"));
+
p += 6;
if (*p == '"') p++;
while( p[i] && p[i] != '"' ) i++;
if( isForProxy )
- m_strProxyRealm = QString::fromLatin1( p, i );
+ m_strProxyRealm = QString::fromAscii( p, i );
else
- m_strRealm = QString::fromLatin1( p, i );
+ m_strRealm = QString::fromAscii( p, i );
+
+ QTextCodec::setCodecForCStrings(oldCodec);
+
if (!p[i]) break;
}
p+=(i+1);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic