summaryrefslogtreecommitdiffstats
path: root/khtml/ecma/xmlhttprequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'khtml/ecma/xmlhttprequest.cpp')
-rw-r--r--khtml/ecma/xmlhttprequest.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp
index f821d7b95..7b88477f0 100644
--- a/khtml/ecma/xmlhttprequest.cpp
+++ b/khtml/ecma/xmlhttprequest.cpp
@@ -395,7 +395,7 @@ void XMLHttpRequest::send(const TQString& _body)
// through setRequestHeader. NOTE: the user can still disable
// this feature at the protocol level (kio_http).
// ### does find() ever succeed? the headers are stored in lower case!
- if (requestHeaders.tqfind("Referer") == requestHeaders.end()) {
+ if (requestHeaders.find("Referer") == requestHeaders.end()) {
KURL documentURL(doc->URL());
documentURL.setPass(TQString::null);
documentURL.setUser(TQString::null);
@@ -489,7 +489,7 @@ void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &val
TQStringList bannedHeaders = TQStringList::split(',',
TQString::tqfromLatin1(BANNED_HTTP_HEADERS));
- if (bannedHeaders.tqcontains(name))
+ if (bannedHeaders.contains(name))
return; // Denied
requestHeaders[name] = value.stripWhiteSpace();
@@ -501,7 +501,7 @@ Value XMLHttpRequest::getAllResponseHeaders() const
return Undefined();
}
- int endOfLine = responseHeaders.tqfind("\n");
+ int endOfLine = responseHeaders.find("\n");
if (endOfLine == -1) {
return Undefined();
@@ -535,7 +535,7 @@ Value XMLHttpRequest::getResponseHeader(const TQString& name) const
return Undefined();
}
- int endOfLine = responseHeaders.tqfind("\n", headerLinePos + matchLength);
+ int endOfLine = responseHeaders.find("\n", headerLinePos + matchLength);
return String(responseHeaders.mid(headerLinePos + matchLength, endOfLine - (headerLinePos + matchLength)).stripWhiteSpace());
}
@@ -546,10 +546,10 @@ static Value httpStatus(const TQString& response, bool textStatus = false)
return Undefined();
}
- int endOfLine = response.tqfind("\n");
+ int endOfLine = response.find("\n");
TQString firstLine = (endOfLine == -1) ? response : response.left(endOfLine);
- int codeStart = firstLine.tqfind(" ");
- int codeEnd = firstLine.tqfind(" ", codeStart + 1);
+ int codeStart = firstLine.find(" ");
+ int codeEnd = firstLine.find(" ", codeStart + 1);
if (codeStart == -1 || codeEnd == -1) {
return Undefined();
@@ -643,9 +643,9 @@ void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data)
// NOTE: Replace a 304 response with a 200! Both IE and Mozilla do this.
// Problem first reported through bug# 110272.
- int codeStart = responseHeaders.tqfind("304");
+ int codeStart = responseHeaders.find("304");
if ( codeStart != -1) {
- int codeEnd = responseHeaders.tqfind("\n", codeStart+3);
+ int codeEnd = responseHeaders.find("\n", codeStart+3);
if (codeEnd != -1)
responseHeaders.replace(codeStart, (codeEnd-codeStart), "200 OK");
}
@@ -659,13 +659,13 @@ void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data)
#endif
if ( decoder == NULL ) {
- int pos = responseHeaders.tqfind("content-type:", 0, false);
+ int pos = responseHeaders.find("content-type:", 0, false);
if ( pos > -1 ) {
pos += 13;
- int index = responseHeaders.tqfind('\n', pos);
+ int index = responseHeaders.find('\n', pos);
TQString type = responseHeaders.mid(pos, (index-pos));
- index = type.tqfind (';');
+ index = type.find (';');
if (index > -1)
encoding = TQString(type.mid( index+1 ).remove(TQRegExp("charset[ ]*=[ ]*", false))).stripWhiteSpace();
}