[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
trey
trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:21:44 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 02570ac2777ac45ca651cee5cd277db949df303b
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 24 18:40:28 2003 +0000
I ran our KURL tests and found that my previous fix for "localhost" urls, fixed too much.
This now passes all the tests.
Reviewed by Darin.
* kwq/KWQKURL.mm:
(KURL::parse): Use different logic for deciding to add //authority to the URL
and stripping localhost off of file URLs.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 7cfcc94..fa583c1 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-01-23 Trey Matteson <trey at apple.com>
+
+ I ran our KURL tests and found that my previous fix for "localhost" urls, fixed too much.
+ This now passes all the tests.
+
+ Reviewed by Darin.
+
+ * kwq/KWQKURL.mm:
+ (KURL::parse): Use different logic for deciding to add //authority to the URL
+ and stripping localhost off of file URLs.
+
2003-01-24 Darin Adler <darin at apple.com>
Reviewed by John.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7cfcc94..fa583c1 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-01-23 Trey Matteson <trey at apple.com>
+
+ I ran our KURL tests and found that my previous fix for "localhost" urls, fixed too much.
+ This now passes all the tests.
+
+ Reviewed by Darin.
+
+ * kwq/KWQKURL.mm:
+ (KURL::parse): Use different logic for deciding to add //authority to the URL
+ and stripping localhost off of file URLs.
+
2003-01-24 Darin Adler <darin at apple.com>
Reviewed by John.
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index e275525..6a246c2 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -974,17 +974,7 @@ void KURL::parse(const char *url, const QString *originalString)
&& tolower(url[3]) == 'p'
&& (url[4] == ':'
|| (tolower(url[4]) == 's' && url[5] == ':'));
-
- bool isFILENeedsHostPart = pathStart != pathEnd
- && tolower(url[0]) == 'f'
- && tolower(url[1]) == 'i'
- && tolower(url[2]) == 'l'
- && tolower(url[3]) == 'e'
- && url[4] == ':'
- && !(pathStart + 2 == pathEnd
- && url[pathStart] == '/'
- && url[pathStart+1] == '/');
-
+
bool hostIsLocalHost = portEnd - userStart == 9
&& tolower(url[userStart]) == 'l'
&& tolower(url[userStart+1]) == 'o'
@@ -995,16 +985,34 @@ void KURL::parse(const char *url, const QString *originalString)
&& tolower(url[userStart+6]) == 'o'
&& tolower(url[userStart+7]) == 's'
&& tolower(url[userStart+8]) == 't';
+
+ bool isFile = tolower(url[0]) == 'f'
+ && tolower(url[1]) == 'i'
+ && tolower(url[2]) == 'l'
+ && tolower(url[3]) == 'e'
+ && url[4] == ':';
+
+ // File URLs need a host part unless it is just file:// or file://localhost
+ bool degenFilePath = pathStart == pathEnd
+ && (hostStart == hostEnd
+ || hostIsLocalHost);
bool haveNonHostAuthorityPart = userStart != userEnd || passwordStart != passwordEnd || portStart != portEnd;
// add ":" after scheme
*p++ = ':';
- // if we have at least one authority part or a file URL - add "//"
- if (isFILENeedsHostPart || haveNonHostAuthorityPart || hostStart != hostEnd)
- {
- *p++ = '/';
+ // if we have at least one authority part or a file URL - add "//" and authority
+ if (isFile ? !degenFilePath
+ : (haveNonHostAuthorityPart || hostStart != hostEnd)) {
+
+//if ((isFile && !degenFilePath) || haveNonHostAuthorityPart || hostStart != hostEnd) {
+// still adds // for file://localhost, file://
+
+//if (!(isFile && degenFilePath) && (haveNonHostAuthorityPart || hostStart != hostEnd)) {
+//doesn't add // for things like file:///foo
+
+ *p++ = '/';
*p++ = '/';
userStartPos = p - buffer;
@@ -1034,7 +1042,7 @@ void KURL::parse(const char *url, const QString *originalString)
}
// copy in the host, except in the case of a file URL with authority="localhost"
- if (!(isFILENeedsHostPart && hostIsLocalHost && !haveNonHostAuthorityPart)) {
+ if (!(isFile && hostIsLocalHost && !haveNonHostAuthorityPart)) {
strPtr = url + hostStart;
const char *hostEndPtr = url + hostEnd;
while (strPtr < hostEndPtr) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list