Changeset 267933 in webkit


Ignore:
Timestamp:
Oct 3, 2020, 2:17:06 PM (5 years ago)
Author:
achristensen@apple.com
Message:

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.

LayoutTests/imported/w3c:

  • 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:

Source/WTF:

  • wtf/URLParser.cpp:

(WTF::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r267931 r267933  
     12020-10-03  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add extra slash after empty host copied from base URL if path is also empty
     4        https://bugs.webkit.org/show_bug.cgi?id=217278
     5
     6        Reviewed by Darin Adler.
     7
     8        * web-platform-tests/url/a-element-expected.txt:
     9        * web-platform-tests/url/a-element-xhtml-expected.txt:
     10        * web-platform-tests/url/url-constructor-expected.txt:
     11
    1122020-10-03  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt

    r267931 r267933  
    565565PASS Parsing: <test-a-colon-b.html> against <a:b>
    566566PASS Parsing: <test-a-colon-slash.html> against <a:/>
    567 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"
     567PASS Parsing: <test-a-colon-slash-slash.html> against <a://>
    568568PASS Parsing: <test-a-colon-slash-b.html> against <a:/b>
    569569PASS Parsing: <test-a-colon-slash-slash-b.html> against <a://b>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt

    r267931 r267933  
    565565PASS Parsing: <test-a-colon-b.html> against <a:b>
    566566PASS Parsing: <test-a-colon-slash.html> against <a:/>
    567 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"
     567PASS Parsing: <test-a-colon-slash-slash.html> against <a://>
    568568PASS Parsing: <test-a-colon-slash-b.html> against <a:/b>
    569569PASS Parsing: <test-a-colon-slash-slash-b.html> against <a://b>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt

    r267931 r267933  
    566566PASS Parsing: <test-a-colon-b.html> against <a:b>
    567567PASS Parsing: <test-a-colon-slash.html> against <a:/>
    568 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"
     568PASS Parsing: <test-a-colon-slash-slash.html> against <a://>
    569569PASS Parsing: <test-a-colon-slash-b.html> against <a:/b>
    570570PASS Parsing: <test-a-colon-slash-slash-b.html> against <a://b>
  • trunk/Source/WTF/ChangeLog

    r267931 r267933  
     12020-10-03  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add extra slash after empty host copied from base URL if path is also empty
     4        https://bugs.webkit.org/show_bug.cgi?id=217278
     5
     6        Reviewed by Darin Adler.
     7
     8        * wtf/URLParser.cpp:
     9        (WTF::URLParser::parse):
     10
    1112020-10-03  Alex Christensen  <achristensen@webkit.org>
    212
  • trunk/Source/WTF/wtf/URLParser.cpp

    r267931 r267933  
    13311331            default:
    13321332                copyURLPartsUntil(base, URLPart::PathAfterLastSlash, c, nonUTF8QueryEncoding);
    1333                 if (currentPosition(c) && parsedDataView(currentPosition(c) - 1) != '/') {
     1333                if ((currentPosition(c) && parsedDataView(currentPosition(c) - 1) != '/')
     1334                    || (base.host().isEmpty() && base.path().isEmpty())) {
    13341335                    appendToASCIIBuffer('/');
    13351336                    m_url.m_pathAfterLastSlash = currentPosition(c);
  • trunk/Tools/ChangeLog

    r267931 r267933  
     12020-10-03  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add extra slash after empty host copied from base URL if path is also empty
     4        https://bugs.webkit.org/show_bug.cgi?id=217278
     5
     6        Reviewed by Darin Adler.
     7
     8        * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
     9
    1102020-10-03  Alex Christensen  <achristensen@webkit.org>
    211
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm

    r267763 r267933  
    368368            data = [NSData dataWithBytes:workerFrameBytes length:strlen(workerFrameBytes)];
    369369        } else {
    370             EXPECT_WK_STREQ("iframe://worker.js", requestURL.absoluteString);
     370            EXPECT_WK_STREQ("iframe:///worker.js", requestURL.absoluteString);
    371371            response = adoptNS([[NSURLResponse alloc] initWithURL:requestURL MIMEType:@"text/javascript" expectedContentLength:0 textEncodingName:nil]);
    372372            data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];
Note: See TracChangeset for help on using the changeset viewer.