Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (267932 => 267933)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-10-03 21:14:31 UTC (rev 267932)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-10-03 21:17:06 UTC (rev 267933)
@@ -1,5 +1,16 @@
2020-10-03 Alex Christensen <[email protected]>
+ Add extra slash after empty host copied from base URL if path is also empty
+ https://bugs.webkit.org/show_bug.cgi?id=217278
+
+ Reviewed by Darin Adler.
+
+ * web-platform-tests/url/a-element-expected.txt:
+ * web-platform-tests/url/a-element-xhtml-expected.txt:
+ * web-platform-tests/url/url-constructor-expected.txt:
+
+2020-10-03 Alex Christensen <[email protected]>
+
"http:" should not be a valid URL
https://bugs.webkit.org/show_bug.cgi?id=217250
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt (267932 => 267933)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt 2020-10-03 21:14:31 UTC (rev 267932)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt 2020-10-03 21:17:06 UTC (rev 267933)
@@ -564,7 +564,7 @@
PASS Parsing: <test-a-colon.html> against <a:>
PASS Parsing: <test-a-colon-b.html> against <a:b>
PASS Parsing: <test-a-colon-slash.html> against <a:/>
-FAIL Parsing: <test-a-colon-slash-slash.html> against <a://> assert_equals: href expected "a:///test-a-colon-slash-slash.html" but got "a://test-a-colon-slash-slash.html"
+PASS Parsing: <test-a-colon-slash-slash.html> against <a://>
PASS Parsing: <test-a-colon-slash-b.html> against <a:/b>
PASS Parsing: <test-a-colon-slash-slash-b.html> against <a://b>
PASS Parsing: <http://example.org/test?a#b\0c> against <about:blank>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt (267932 => 267933)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt 2020-10-03 21:14:31 UTC (rev 267932)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt 2020-10-03 21:17:06 UTC (rev 267933)
@@ -564,7 +564,7 @@
PASS Parsing: <test-a-colon.html> against <a:>
PASS Parsing: <test-a-colon-b.html> against <a:b>
PASS Parsing: <test-a-colon-slash.html> against <a:/>
-FAIL Parsing: <test-a-colon-slash-slash.html> against <a://> assert_equals: href expected "a:///test-a-colon-slash-slash.html" but got "a://test-a-colon-slash-slash.html"
+PASS Parsing: <test-a-colon-slash-slash.html> against <a://>
PASS Parsing: <test-a-colon-slash-b.html> against <a:/b>
PASS Parsing: <test-a-colon-slash-slash-b.html> against <a://b>
PASS Parsing: <http://example.org/test?a#b\0c> against <about:blank>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt (267932 => 267933)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt 2020-10-03 21:14:31 UTC (rev 267932)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt 2020-10-03 21:17:06 UTC (rev 267933)
@@ -565,7 +565,7 @@
PASS Parsing: <test-a-colon.html> against <a:>
PASS Parsing: <test-a-colon-b.html> against <a:b>
PASS Parsing: <test-a-colon-slash.html> against <a:/>
-FAIL Parsing: <test-a-colon-slash-slash.html> against <a://> assert_equals: href expected "a:///test-a-colon-slash-slash.html" but got "a://test-a-colon-slash-slash.html"
+PASS Parsing: <test-a-colon-slash-slash.html> against <a://>
PASS Parsing: <test-a-colon-slash-b.html> against <a:/b>
PASS Parsing: <test-a-colon-slash-slash-b.html> against <a://b>
PASS Parsing: <http://example.org/test?a#b\0c> against <about:blank>
Modified: trunk/Source/WTF/ChangeLog (267932 => 267933)
--- trunk/Source/WTF/ChangeLog 2020-10-03 21:14:31 UTC (rev 267932)
+++ trunk/Source/WTF/ChangeLog 2020-10-03 21:17:06 UTC (rev 267933)
@@ -1,5 +1,15 @@
2020-10-03 Alex Christensen <[email protected]>
+ Add extra slash after empty host copied from base URL if path is also empty
+ https://bugs.webkit.org/show_bug.cgi?id=217278
+
+ Reviewed by Darin Adler.
+
+ * wtf/URLParser.cpp:
+ (WTF::URLParser::parse):
+
+2020-10-03 Alex Christensen <[email protected]>
+
"http:" should not be a valid URL
https://bugs.webkit.org/show_bug.cgi?id=217250
Modified: trunk/Source/WTF/wtf/URLParser.cpp (267932 => 267933)
--- trunk/Source/WTF/wtf/URLParser.cpp 2020-10-03 21:14:31 UTC (rev 267932)
+++ trunk/Source/WTF/wtf/URLParser.cpp 2020-10-03 21:17:06 UTC (rev 267933)
@@ -1330,7 +1330,8 @@
break;
default:
copyURLPartsUntil(base, URLPart::PathAfterLastSlash, c, nonUTF8QueryEncoding);
- if (currentPosition(c) && parsedDataView(currentPosition(c) - 1) != '/') {
+ if ((currentPosition(c) && parsedDataView(currentPosition(c) - 1) != '/')
+ || (base.host().isEmpty() && base.path().isEmpty())) {
appendToASCIIBuffer('/');
m_url.m_pathAfterLastSlash = currentPosition(c);
}
Modified: trunk/Tools/ChangeLog (267932 => 267933)
--- trunk/Tools/ChangeLog 2020-10-03 21:14:31 UTC (rev 267932)
+++ trunk/Tools/ChangeLog 2020-10-03 21:17:06 UTC (rev 267933)
@@ -1,5 +1,14 @@
2020-10-03 Alex Christensen <[email protected]>
+ Add extra slash after empty host copied from base URL if path is also empty
+ https://bugs.webkit.org/show_bug.cgi?id=217278
+
+ Reviewed by Darin Adler.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
+
+2020-10-03 Alex Christensen <[email protected]>
+
"http:" should not be a valid URL
https://bugs.webkit.org/show_bug.cgi?id=217250
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm (267932 => 267933)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm 2020-10-03 21:14:31 UTC (rev 267932)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm 2020-10-03 21:17:06 UTC (rev 267933)
@@ -367,7 +367,7 @@
response = adoptNS([[NSURLResponse alloc] initWithURL:requestURL MIMEType:@"text/html" expectedContentLength:0 textEncodingName:nil]);
data = "" dataWithBytes:workerFrameBytes length:strlen(workerFrameBytes)];
} else {
- EXPECT_WK_STREQ("iframe://worker.js", requestURL.absoluteString);
+ EXPECT_WK_STREQ("iframe:///worker.js", requestURL.absoluteString);
response = adoptNS([[NSURLResponse alloc] initWithURL:requestURL MIMEType:@"text/_javascript_" expectedContentLength:0 textEncodingName:nil]);
data = "" dataWithBytes:workerBytes length:strlen(workerBytes)];
}