summaryrefslogtreecommitdiffstats
path: root/kioslave/http
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/http')
-rw-r--r--kioslave/http/http.cc28
-rw-r--r--kioslave/http/kcookiejar/kcookiejar.cpp28
-rw-r--r--kioslave/http/kcookiejar/kcookiewin.cpp2
-rw-r--r--kioslave/http/kcookiejar/tests/kcookiejartest.cpp4
4 files changed, 31 insertions, 31 deletions
diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc
index fa8997eca..3d957aaef 100644
--- a/kioslave/http/http.cc
+++ b/kioslave/http/http.cc
@@ -171,7 +171,7 @@ static TQString sanitizeCustomHTTPHeader(const TQString& _header)
TQString header = (*it).lower();
// Do not allow Request line to be specified and ignore
// the other HTTP headers.
- if (header.tqfind(':') == -1 ||
+ if (header.find(':') == -1 ||
header.startsWith("host") ||
header.startsWith("via"))
continue;
@@ -431,7 +431,7 @@ void HTTPProtocol::setHost( const TQString& host, int port,
m_davHostOk = m_davHostUnsupported = false;
// is it an IPv6 address?
- if (host.tqfind(':') == -1)
+ if (host.find(':') == -1)
{
m_request.hostname = host;
m_request.encoded_hostname = KIDNA::toAscii(host);
@@ -439,7 +439,7 @@ void HTTPProtocol::setHost( const TQString& host, int port,
else
{
m_request.hostname = host;
- int pos = host.tqfind('%');
+ int pos = host.find('%');
if (pos == -1)
m_request.encoded_hostname = '[' + host + ']';
else
@@ -828,8 +828,8 @@ void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method )
int HTTPProtocol::codeFromResponse( const TQString& response )
{
- int firstSpace = response.tqfind( ' ' );
- int secondSpace = response.tqfind( ' ', firstSpace + 1 );
+ int firstSpace = response.find( ' ' );
+ int secondSpace = response.find( ' ', firstSpace + 1 );
return response.mid( firstSpace + 1, secondSpace - firstSpace - 1 ).toInt();
}
@@ -3278,7 +3278,7 @@ try_again:
// path, thus we extract the filename only.
if ( !dispositionFilename.isEmpty() )
{
- int pos = dispositionFilename.tqfindRev( '/' );
+ int pos = dispositionFilename.findRev( '/' );
if( pos > -1 )
dispositionFilename = dispositionFilename.mid(pos+1);
@@ -4680,12 +4680,12 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite)
TQString CEF = m_request.path;
- int p = CEF.tqfind('/');
+ int p = CEF.find('/');
while(p != -1)
{
CEF[p] = separator;
- p = CEF.tqfind('/', p);
+ p = CEF.find('/', p);
}
TQString host = m_request.hostname.lower();
@@ -4875,7 +4875,7 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate)
void HTTPProtocol::createCacheEntry( const TQString &mimetype, time_t expireDate)
{
TQString dir = m_request.cef;
- int p = dir.tqfindRev('/');
+ int p = dir.findRev('/');
if (p == -1) return; // Error.
dir.truncate(p);
@@ -5233,13 +5233,13 @@ bool HTTPProtocol::getAuthorization()
{
bool isStaleNonce = false;
TQString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization;
- int pos = auth.tqfind("stale", 0, false);
+ int pos = auth.find("stale", 0, false);
if ( pos != -1 )
{
pos += 5;
int len = auth.length();
while( pos < len && (auth[pos] == ' ' || auth[pos] == '=') ) pos++;
- if ( pos < len && auth.tqfind("true", pos, false) != -1 )
+ if ( pos < len && auth.find("true", pos, false) != -1 )
{
isStaleNonce = true;
kdDebug(7113) << "(" << m_pid << ") Stale nonce value. "
@@ -5358,13 +5358,13 @@ bool HTTPProtocol::getAuthorization()
else
auth = m_strProxyAuthorization;
- int pos = auth.tqfind("stale", 0, false);
+ int pos = auth.find("stale", 0, false);
if ( pos != -1 )
{
pos += 5;
int len = auth.length();
while( pos < len && (auth[pos] == ' ' || auth[pos] == '=') ) pos++;
- if ( pos < len && auth.tqfind("true", pos, false) != -1 )
+ if ( pos < len && auth.find("true", pos, false) != -1 )
{
info.digestInfo = (m_responseCode == 401) ? m_strAuthorization : m_strProxyAuthorization;
kdDebug(7113) << "(" << m_pid << ") Just a stale nonce value! "
@@ -5880,7 +5880,7 @@ TQString HTTPProtocol::createDigestAuth ( bool isForProxy )
TQCString uri = TQCString(p,i+1);
do
{
- pos = uri.tqfind( ' ', idx );
+ pos = uri.find( ' ', idx );
if ( pos != -1 )
{
KURL u (m_request.url, uri.mid(idx, pos-idx));
diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp
index ca544ac62..136fba0b1 100644
--- a/kioslave/http/kcookiejar/kcookiejar.cpp
+++ b/kioslave/http/kcookiejar/kcookiejar.cpp
@@ -194,14 +194,14 @@ bool KHttpCookie::match(const TQString &fqdn, const TQStringList &domains,
if (fqdn != mHost)
return false;
}
- else if (!domains.tqcontains(mDomain))
+ else if (!domains.contains(mDomain))
{
if (mDomain[0] == '.')
return false;
// Maybe the domain needs an extra dot.
TQString domain = '.' + mDomain;
- if ( !domains.tqcontains( domain ) )
+ if ( !domains.contains( domain ) )
if ( fqdn != mDomain )
return false;
}
@@ -261,7 +261,7 @@ KCookieJar::KCookieJar()
for(TQStringList::ConstIterator it = countries.begin();
it != countries.end(); ++it)
{
- m_twoLevelTLD.tqreplace(*it, (int *) 1);
+ m_twoLevelTLD.replace(*it, (int *) 1);
}
}
@@ -301,7 +301,7 @@ static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePt
it != cookie->windowIds().end(); ++it)
{
long windowId = *it;
- if (windowId && (cookiePtr->windowIds().tqfind(windowId) == cookiePtr->windowIds().end()))
+ if (windowId && (cookiePtr->windowIds().find(windowId) == cookiePtr->windowIds().end()))
{
cookiePtr->windowIds().append(windowId);
}
@@ -337,8 +337,8 @@ TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long w
if (!parseURL(_url, fqdn, path))
return cookieStr;
- bool secureRequest = (_url.tqfind( L1("https://"), 0, false) == 0 ||
- _url.tqfind( L1("webdavs://"), 0, false) == 0);
+ bool secureRequest = (_url.find( L1("https://"), 0, false) == 0 ||
+ _url.find( L1("webdavs://"), 0, false) == 0);
// kdDebug(7104) << "findCookies: URL= " << _url << ", secure = " << secureRequest << endl;
@@ -399,7 +399,7 @@ TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long w
continue;
}
- if (windowId && (cookie->windowIds().tqfind(windowId) == cookie->windowIds().end()))
+ if (windowId && (cookie->windowIds().find(windowId) == cookie->windowIds().end()))
{
cookie->windowIds().append(windowId);
}
@@ -591,7 +591,7 @@ bool KCookieJar::parseURL(const TQString &_url,
// Cookie spoofing protection. Since there is no way a path separator
// or escape encoded character is allowed in the hostname according
// to RFC 2396, reject attempts to include such things there!
- if(_fqdn.tqfind('/') > -1 || _fqdn.tqfind('%') > -1)
+ if(_fqdn.find('/') > -1 || _fqdn.find('%') > -1)
{
return false; // deny everything!!
}
@@ -620,7 +620,7 @@ void KCookieJar::extractDomains(const TQString &_fqdn,
// Return numeric IPv4 addresses as is...
if ((_fqdn.tqat(0) >= TQChar('0')) && (_fqdn.tqat(0) <= TQChar('9')))
{
- if (_fqdn.tqfind(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1)
+ if (_fqdn.find(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1)
{
_domains.append( _fqdn );
return;
@@ -683,7 +683,7 @@ void KCookieJar::extractDomains(const TQString &_fqdn,
*/
static TQString fixupDateTime(const TQString& dt)
{
- const int index = dt.tqfind(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}"));
+ const int index = dt.find(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}"));
if (index > -1)
{
@@ -729,7 +729,7 @@ KHttpCookieList KCookieJar::makeCookies(const TQString &_url,
return KHttpCookieList();
}
TQString defaultPath;
- int i = path.tqfindRev('/');
+ int i = path.findRev('/');
if (i > 0)
defaultPath = path.left(i);
@@ -811,7 +811,7 @@ KHttpCookieList KCookieJar::makeCookies(const TQString &_url,
if(dom.length() > 2 && dom[dom.length()-1] == '.')
dom = dom.left(dom.length()-1);
- if(dom.tqcontains('.') > 1 || dom == ".local")
+ if(dom.contains('.') > 1 || dom == ".local")
lastCookie->mDomain = dom;
}
else if (cName == "max-age")
@@ -1020,7 +1020,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr)
// cross-site cookie injection.
if (!cookiePtr->domain().isEmpty())
{
- if (!domains.tqcontains(cookiePtr->domain()) &&
+ if (!domains.contains(cookiePtr->domain()) &&
!cookiePtr->domain().endsWith("."+cookiePtr->host()))
cookiePtr->fixDomain(TQString::null);
}
@@ -1546,7 +1546,7 @@ void KCookieJar::loadConfig(KConfig *_config, bool reparse )
{
const TQString &value = *it++;
- int sepPos = value.tqfindRev(':');
+ int sepPos = value.findRev(':');
if (sepPos <= 0)
continue;
diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp
index ca8560bf0..50477e40d 100644
--- a/kioslave/http/kcookiejar/kcookiewin.cpp
+++ b/kioslave/http/kcookiejar/kcookiewin.cpp
@@ -115,7 +115,7 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList,
KHttpCookiePtr cookie = cookieList.first();
TQString host (cookie->host());
- int pos = host.tqfind(':');
+ int pos = host.find(':');
if ( pos > 0 )
{
TQString portNum = host.left(pos);
diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
index aa51b2f91..1ce1c4d8f 100644
--- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
+++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
@@ -53,7 +53,7 @@ static void FAIL(const TQString &msg)
static void popArg(TQCString &command, TQCString & line)
{
- int i = line.tqfind(' ');
+ int i = line.find(' ');
if (i != -1)
{
command = line.left(i);
@@ -69,7 +69,7 @@ static void popArg(TQCString &command, TQCString & line)
static void popArg(TQString &command, TQCString & line)
{
- int i = line.tqfind(' ');
+ int i = line.find(' ');
if (i != -1)
{
command = TQString::tqfromLatin1(line.left(i));