[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:18:20 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit dff98663bf336de9b33d8da4e401aac3839be3e7
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 11 23:30:30 2003 +0000
Reviewed by Chris.
<rdar://problem/3507859>: Status text should only include "OK", not full "HTTP/1.0 200 OK" status line
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::getStatusText): Include only the status
text, not the full status line.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6db8fda..b80379e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2003-12-11 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Chris.
+
+ <rdar://problem/3507859>: Status text should only include "OK", not full "HTTP/1.0 200 OK" status line
+
+ * khtml/ecma/xmlhttprequest.cpp:
+ (KJS::XMLHttpRequest::getStatusText): Include only the status
+ text, not the full status line.
+
=== Safari-117 ===
2003-12-11 David Hyatt <hyatt at apple.com>
diff --git a/WebCore/khtml/ecma/xmlhttprequest.cpp b/WebCore/khtml/ecma/xmlhttprequest.cpp
index fd6023c..34593e0 100644
--- a/WebCore/khtml/ecma/xmlhttprequest.cpp
+++ b/WebCore/khtml/ecma/xmlhttprequest.cpp
@@ -445,8 +445,16 @@ Value XMLHttpRequest::getStatusText() const
int endOfLine = responseHeaders.find("\n");
QString firstLine = endOfLine == -1 ? responseHeaders : responseHeaders.left(endOfLine);
+ int codeStart = firstLine.find(" ");
+ int codeEnd = firstLine.find(" ", codeStart + 1);
+
+ if (codeStart == -1 || codeEnd == -1) {
+ return Undefined();
+ }
+
+ QString statusText = firstLine.mid(codeEnd + 1, endOfLine - (codeEnd + 1)).stripWhiteSpace();
- return String(firstLine);
+ return String(statusText);
}
#if APPLE_CHANGES
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list