Changeset 206235 in webkit


Ignore:
Timestamp:
Sep 21, 2016 2:16:15 PM (8 years ago)
Author:
achristensen@apple.com
Message:

URLParser should match URL::parse when parsing data urls with slashes in them
https://bugs.webkit.org/show_bug.cgi?id=162352

Reviewed by Darin Adler.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r206234 r206235  
     12016-09-21  Alex Christensen  <achristensen@webkit.org>
     2
     3        URLParser should match URL::parse when parsing data urls with slashes in them
     4        https://bugs.webkit.org/show_bug.cgi?id=162352
     5
     6        Reviewed by Darin Adler.
     7
     8        Covered by new API tests.
     9
     10        * platform/URLParser.cpp:
     11        (WebCore::URLParser::parse):
     12
    1132016-09-21  Per Arne Vollan  <pvollan@apple.com>
    214
  • trunk/Source/WebCore/platform/URLParser.cpp

    r206231 r206235  
    14311431                m_url.m_queryEnd = m_url.m_pathEnd;
    14321432                state = State::Fragment;
     1433            } else if (*c == '/') {
     1434                m_asciiBuffer.append('/');
     1435                m_url.m_pathAfterLastSlash = m_asciiBuffer.size();
     1436                ++c;
    14331437            } else {
    14341438                utf8PercentEncode<serialized>(*c, m_asciiBuffer, isInSimpleEncodeSet);
  • trunk/Tools/ChangeLog

    r206231 r206235  
     12016-09-21  Alex Christensen  <achristensen@webkit.org>
     2
     3        URLParser should match URL::parse when parsing data urls with slashes in them
     4        https://bugs.webkit.org/show_bug.cgi?id=162352
     5
     6        Reviewed by Darin Adler.
     7
     8        * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
     9        (TestWebKitAPI::TEST_F):
     10
    1112016-09-21  Alex Christensen  <achristensen@webkit.org>
    212
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp

    r206231 r206235  
    221221    checkURL("notspecial:", {"notspecial", "", "", "", 0, "", "", "", "notspecial:"});
    222222    checkURL("notspecial:/", {"notspecial", "", "", "", 0, "/", "", "", "notspecial:/"});
     223    checkURL("data:image/png;base64,encoded-data-follows-here", {"data", "", "", "", 0, "image/png;base64,encoded-data-follows-here", "", "", "data:image/png;base64,encoded-data-follows-here"});
     224    checkURL("data:image/png;base64,encoded/data-with-slash", {"data", "", "", "", 0, "image/png;base64,encoded/data-with-slash", "", "", "data:image/png;base64,encoded/data-with-slash"});
    223225
    224226    // This disagrees with the web platform test for http://:@www.example.com but agrees with Chrome and URL::parse,
Note: See TracChangeset for help on using the changeset viewer.