Changeset 206158 in webkit
- Timestamp:
- Sep 20, 2016 11:31:27 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206157 r206158 1 2016-09-20 Alex Christensen <achristensen@webkit.org> 2 3 URLParser: Fix parsing relative URLs with one slash after the scheme: 4 https://bugs.webkit.org/show_bug.cgi?id=162294 5 6 Reviewed by Tim Horton. 7 8 This fixes the relatively-obscure case where a relative URL has the same special scheme as the base, 9 but there is only one slash after the scheme: at the beginning of the relative URL. According to spec, 10 this should be interpreted the same as if the scheme: were not there. 11 For example, parsing "http:/example.com/" relative to "http://example.org/foo/bar" should be the same as 12 parsing "/example.com/" relative to "http://example.org/foo/bar". 13 14 Covered by a new API test. 15 16 * platform/URLParser.cpp: 17 (WebCore::URLParser::parse): 18 1 19 2016-09-20 Alex Christensen <achristensen@webkit.org> 2 20 -
trunk/Source/WebCore/platform/URLParser.cpp
r206157 r206158 1064 1064 state = State::SpecialAuthorityIgnoreSlashes; 1065 1065 ++c; 1066 } 1066 } else 1067 state = State::RelativeSlash; 1067 1068 } else 1068 1069 state = State::Relative; -
trunk/Tools/ChangeLog
r206157 r206158 1 2016-09-20 Alex Christensen <achristensen@webkit.org> 2 3 URLParser: Fix parsing relative URLs with one slash after the scheme: 4 https://bugs.webkit.org/show_bug.cgi?id=162294 5 6 Reviewed by Tim Horton. 7 8 * TestWebKitAPI/Tests/WebCore/URLParser.cpp: 9 (TestWebKitAPI::TEST_F): 10 1 11 2016-09-20 Alex Christensen <achristensen@webkit.org> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp
r206157 r206158 475 475 {"http", "", "", "", 0, "", "", "", "http:"}, 476 476 {"http", "", "", "", 0, "/", "", "", "http:/"}); 477 checkRelativeURLDifferences("http:/example.com/", "http://example.org/foo/bar", 478 {"http", "", "", "example.org", 0, "/example.com/", "", "", "http://example.org/example.com/"}, 479 {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"}); 477 480 478 481 // This behavior matches Chrome and Firefox, but not WebKit using URL::parse.
Note: See TracChangeset
for help on using the changeset viewer.