Changeset 208087 in webkit
- Timestamp:
- Oct 28, 2016, 5:20:38 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208083 r208087 1 2016-10-28 Alex Christensen <achristensen@webkit.org> 2 3 Partially revert 207805 after resolution in URL spec issue 87 4 https://bugs.webkit.org/show_bug.cgi?id=164142 5 6 Reviewed by Andy Estes. 7 8 * fast/url/path-expected.txt: 9 * fetch/fetch-url-serialization-expected.txt: 10 1 11 2016-10-28 Chris Dumez <cdumez@apple.com> 2 12 -
trunk/LayoutTests/fast/url/path-expected.txt
r207805 r208087 15 15 PASS canonicalize('http://example.com/foo/../../..') is 'http://example.com/' 16 16 PASS canonicalize('http://example.com/foo/../../../ton') is 'http://example.com/ton' 17 FAIL canonicalize('http://example.com/foo/%2e') should be http://example.com/foo/. Was http://example.com/foo/%2e. 17 PASS canonicalize('http://example.com/foo/%2e') is 'http://example.com/foo/' 18 18 FAIL canonicalize('http://example.com/foo/%2e%2') should be http://example.com/foo/.%2. Was http://example.com/foo/%2e%2. 19 FAIL canonicalize('http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar') should be http://example.com/..bar. Was http://example.com/ foo/%2e./%2e%2e/.%2e/%2e.bar.19 FAIL canonicalize('http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar') should be http://example.com/..bar. Was http://example.com/%2e.bar. 20 20 PASS canonicalize('http://example.com////../..') is 'http://example.com//' 21 21 PASS canonicalize('http://example.com/foo/bar//../..') is 'http://example.com/foo/' -
trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt
r207995 r208087 124 124 PASS Testing Request url 'http://example.com/foo/../../..' with base 'about:blank' 125 125 PASS Testing Request url 'http://example.com/foo/../../../ton' with base 'about:blank' 126 FAIL Testing Request url 'http://example.com/foo/%2e' with base 'about:blank' assert_equals: expected "http://example.com/foo/" but got "http://example.com/foo/%2e" 126 PASS Testing Request url 'http://example.com/foo/%2e' with base 'about:blank' 127 127 FAIL Testing Request url 'http://example.com/foo/%2e%2' with base 'about:blank' assert_equals: expected "http://example.com/foo/.%2" but got "http://example.com/foo/%2e%2" 128 FAIL Testing Request url 'http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar' with base 'about:blank' assert_equals: expected "http://example.com/..bar" but got "http://example.com/ foo/%2e./%2e%2e/.%2e/%2e.bar"128 FAIL Testing Request url 'http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar' with base 'about:blank' assert_equals: expected "http://example.com/..bar" but got "http://example.com/%2e.bar" 129 129 PASS Testing Request url 'http://example.com////../..' with base 'about:blank' 130 130 PASS Testing Request url 'http://example.com/foo/bar//../..' with base 'about:blank' … … 156 156 PASS Testing Request url 'http://192.0x00A80001' with base 'about:blank' 157 157 FAIL Testing Request url 'http://www/foo%2Ehtml' with base 'about:blank' assert_equals: expected "http://www/foo.html" but got "http://www/foo%2Ehtml" 158 FAIL Testing Request url 'http://www/foo/%2E/html' with base 'about:blank' assert_equals: expected "http://www/foo/html" but got "http://www/foo/%2E/html" 158 PASS Testing Request url 'http://www/foo/%2E/html' with base 'about:blank' 159 159 PASS Testing Request url 'http://user:pass@/' with base 'about:blank' 160 160 PASS Testing Request url 'http://%25DOMAIN:foobar@foodomain.com/' with base 'about:blank' -
trunk/LayoutTests/imported/w3c/ChangeLog
r208057 r208087 1 2016-10-28 Alex Christensen <achristensen@webkit.org> 2 3 Partially revert 207805 after resolution in URL spec issue 87 4 https://bugs.webkit.org/show_bug.cgi?id=164142 5 6 Reviewed by Andy Estes. 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 1 12 2016-10-28 Youenn Fablet <youenn@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt
r207995 r208087 127 127 PASS Parsing: <http://example.com/foo/../../..> against <about:blank> 128 128 PASS Parsing: <http://example.com/foo/../../../ton> against <about:blank> 129 FAIL Parsing: <http://example.com/foo/%2e> against <about:blank> assert_equals: href expected "http://example.com/foo/" but got "http://example.com/foo/%2e" 129 PASS Parsing: <http://example.com/foo/%2e> against <about:blank> 130 130 FAIL Parsing: <http://example.com/foo/%2e%2> against <about:blank> assert_equals: href expected "http://example.com/foo/.%2" but got "http://example.com/foo/%2e%2" 131 FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/ foo/%2e./%2e%2e/.%2e/%2e.bar"131 FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/%2e.bar" 132 132 PASS Parsing: <http://example.com////../..> against <about:blank> 133 133 PASS Parsing: <http://example.com/foo/bar//../..> against <about:blank> … … 159 159 PASS Parsing: <http://192.0x00A80001> against <about:blank> 160 160 FAIL Parsing: <http://www/foo%2Ehtml> against <about:blank> assert_equals: href expected "http://www/foo.html" but got "http://www/foo%2Ehtml" 161 FAIL Parsing: <http://www/foo/%2E/html> against <about:blank> assert_equals: href expected "http://www/foo/html" but got "http://www/foo/%2E/html" 161 PASS Parsing: <http://www/foo/%2E/html> against <about:blank> 162 162 PASS Parsing: <http://user:pass@/> against <about:blank> 163 163 PASS Parsing: <http://%25DOMAIN:foobar@foodomain.com/> against <about:blank> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt
r207995 r208087 127 127 PASS Parsing: <http://example.com/foo/../../..> against <about:blank> 128 128 PASS Parsing: <http://example.com/foo/../../../ton> against <about:blank> 129 FAIL Parsing: <http://example.com/foo/%2e> against <about:blank> assert_equals: href expected "http://example.com/foo/" but got "http://example.com/foo/%2e" 129 PASS Parsing: <http://example.com/foo/%2e> against <about:blank> 130 130 FAIL Parsing: <http://example.com/foo/%2e%2> against <about:blank> assert_equals: href expected "http://example.com/foo/.%2" but got "http://example.com/foo/%2e%2" 131 FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/ foo/%2e./%2e%2e/.%2e/%2e.bar"131 FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/%2e.bar" 132 132 PASS Parsing: <http://example.com////../..> against <about:blank> 133 133 PASS Parsing: <http://example.com/foo/bar//../..> against <about:blank> … … 159 159 PASS Parsing: <http://192.0x00A80001> against <about:blank> 160 160 FAIL Parsing: <http://www/foo%2Ehtml> against <about:blank> assert_equals: href expected "http://www/foo.html" but got "http://www/foo%2Ehtml" 161 FAIL Parsing: <http://www/foo/%2E/html> against <about:blank> assert_equals: href expected "http://www/foo/html" but got "http://www/foo/%2E/html" 161 PASS Parsing: <http://www/foo/%2E/html> against <about:blank> 162 162 PASS Parsing: <http://user:pass@/> against <about:blank> 163 163 PASS Parsing: <http://%25DOMAIN:foobar@foodomain.com/> against <about:blank> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt
r207995 r208087 131 131 PASS Parsing: <http://example.com/foo/../../..> against <about:blank> 132 132 PASS Parsing: <http://example.com/foo/../../../ton> against <about:blank> 133 FAIL Parsing: <http://example.com/foo/%2e> against <about:blank> assert_equals: href expected "http://example.com/foo/" but got "http://example.com/foo/%2e" 133 PASS Parsing: <http://example.com/foo/%2e> against <about:blank> 134 134 FAIL Parsing: <http://example.com/foo/%2e%2> against <about:blank> assert_equals: href expected "http://example.com/foo/.%2" but got "http://example.com/foo/%2e%2" 135 FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/ foo/%2e./%2e%2e/.%2e/%2e.bar"135 FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/%2e.bar" 136 136 PASS Parsing: <http://example.com////../..> against <about:blank> 137 137 PASS Parsing: <http://example.com/foo/bar//../..> against <about:blank> … … 163 163 PASS Parsing: <http://192.0x00A80001> against <about:blank> 164 164 FAIL Parsing: <http://www/foo%2Ehtml> against <about:blank> assert_equals: href expected "http://www/foo.html" but got "http://www/foo%2Ehtml" 165 FAIL Parsing: <http://www/foo/%2E/html> against <about:blank> assert_equals: href expected "http://www/foo/html" but got "http://www/foo/%2E/html" 165 PASS Parsing: <http://www/foo/%2E/html> against <about:blank> 166 166 PASS Parsing: <http://user:pass@/> against <about:blank> 167 167 PASS Parsing: <http://%25DOMAIN:foobar@foodomain.com/> against <about:blank> -
trunk/Source/WebCore/ChangeLog
r208086 r208087 1 2016-10-28 Alex Christensen <achristensen@webkit.org> 2 3 Partially revert 207805 after resolution in URL spec issue 87 4 https://bugs.webkit.org/show_bug.cgi?id=164142 5 6 Reviewed by Andy Estes. 7 8 Covered by updated layout tests and API tests. 9 10 * platform/URLParser.cpp: 11 (WebCore::URLParser::isSingleDotPathSegment): 12 (WebCore::URLParser::isDoubleDotPathSegment): 13 (WebCore::URLParser::consumeSingleDotPathSegment): 14 (WebCore::URLParser::consumeDoubleDotPathSegment): 15 Treat %2e%2e as .. and %2e as . but only if it is entirety of the path segment. 16 There are tests for URLs like http://host/abc%2edef which have not changed because 17 the %2e is not the entirety of the path segment. 18 1 19 2016-10-28 Alex Christensen <achristensen@webkit.org> 2 20 -
trunk/Source/WebCore/platform/URLParser.cpp
r208086 r208087 892 892 } 893 893 894 static const char dotASCIICode[2] = {'2', 'e'}; 895 894 896 template<typename CharacterType> 895 897 ALWAYS_INLINE bool URLParser::isSingleDotPathSegment(CodePointIterator<CharacterType> c) … … 901 903 return c.atEnd() || isSlashQuestionOrHash(*c); 902 904 } 905 if (*c != '%') 906 return false; 907 advance<CharacterType, ReportSyntaxViolation::No>(c); 908 if (c.atEnd() || *c != dotASCIICode[0]) 909 return false; 910 advance<CharacterType, ReportSyntaxViolation::No>(c); 911 if (c.atEnd()) 912 return false; 913 if (toASCIILower(*c) == dotASCIICode[1]) { 914 advance<CharacterType, ReportSyntaxViolation::No>(c); 915 return c.atEnd() || isSlashQuestionOrHash(*c); 916 } 903 917 return false; 904 918 } … … 913 927 return isSingleDotPathSegment(c); 914 928 } 929 if (*c != '%') 930 return false; 931 advance<CharacterType, ReportSyntaxViolation::No>(c); 932 if (c.atEnd() || *c != dotASCIICode[0]) 933 return false; 934 advance<CharacterType, ReportSyntaxViolation::No>(c); 935 if (c.atEnd()) 936 return false; 937 if (toASCIILower(*c) == dotASCIICode[1]) { 938 advance<CharacterType, ReportSyntaxViolation::No>(c); 939 return isSingleDotPathSegment(c); 940 } 915 941 return false; 916 942 } … … 920 946 { 921 947 ASSERT(isSingleDotPathSegment(c)); 922 advance(c); 923 if (!c.atEnd()) { 924 if (*c == '/' || *c == '\\') 925 advance(c); 926 else 927 ASSERT(*c == '?' || *c == '#'); 948 if (*c == '.') { 949 advance(c); 950 if (!c.atEnd()) { 951 if (*c == '/' || *c == '\\') 952 advance(c); 953 else 954 ASSERT(*c == '?' || *c == '#'); 955 } 956 } else { 957 ASSERT(*c == '%'); 958 advance(c); 959 ASSERT(*c == dotASCIICode[0]); 960 advance(c); 961 ASSERT(toASCIILower(*c) == dotASCIICode[1]); 962 advance(c); 963 if (!c.atEnd()) { 964 if (*c == '/' || *c == '\\') 965 advance(c); 966 else 967 ASSERT(*c == '?' || *c == '#'); 968 } 928 969 } 929 970 } … … 933 974 { 934 975 ASSERT(isDoubleDotPathSegment(c)); 935 advance(c); 976 if (*c == '.') 977 advance(c); 978 else { 979 ASSERT(*c == '%'); 980 advance(c); 981 ASSERT(*c == dotASCIICode[0]); 982 advance(c); 983 ASSERT(toASCIILower(*c) == dotASCIICode[1]); 984 advance(c); 985 } 936 986 consumeSingleDotPathSegment(c); 937 987 } -
trunk/Tools/ChangeLog
r208086 r208087 1 2016-10-28 Alex Christensen <achristensen@webkit.org> 2 3 Partially revert 207805 after resolution in URL spec issue 87 4 https://bugs.webkit.org/show_bug.cgi?id=164142 5 6 Reviewed by Andy Estes. 7 8 * TestWebKitAPI/Tests/WebCore/URLParser.cpp: 9 (TestWebKitAPI::TEST_F): 10 1 11 2016-10-28 Alex Christensen <achristensen@webkit.org> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp
r208086 r208087 597 597 {"http", "", "", "127.0.0.1", 0, "/", "", "", "http://127.0.0.1/"}, 598 598 {"http", "", "", "127.0.0.01", 0, "/", "", "", "http://127.0.0.01/"}); 599 checkURL("http://example.com/path1/.%2e", {"http", "", "", "example.com", 0, "/path1/.%2e", "", "", "http://example.com/path1/.%2e"}); 600 checkURL("http://example.com/path1/.%2E", {"http", "", "", "example.com", 0, "/path1/.%2E", "", "", "http://example.com/path1/.%2E"}); 601 checkURL("http://example.com/path1/.%2E/", {"http", "", "", "example.com", 0, "/path1/.%2E/", "", "", "http://example.com/path1/.%2E/"}); 602 checkURL("http://example.com/path1/%2e.", {"http", "", "", "example.com", 0, "/path1/%2e.", "", "", "http://example.com/path1/%2e."}); 603 checkURL("http://example.com/path1/%2E%2e", {"http", "", "", "example.com", 0, "/path1/%2E%2e", "", "", "http://example.com/path1/%2E%2e"}); 604 checkURL("http://example.com/path1/%2e", {"http", "", "", "example.com", 0, "/path1/%2e", "", "", "http://example.com/path1/%2e"}); 605 checkURL("http://example.com/path1/%2E", {"http", "", "", "example.com", 0, "/path1/%2E", "", "", "http://example.com/path1/%2E"}); 606 checkURL("http://example.com/path1/%2E/", {"http", "", "", "example.com", 0, "/path1/%2E/", "", "", "http://example.com/path1/%2E/"}); 607 checkURL("http://example.com/path1/path2/%2e?query", {"http", "", "", "example.com", 0, "/path1/path2/%2e", "query", "", "http://example.com/path1/path2/%2e?query"}); 608 checkURL("http://example.com/path1/path2/%2e%2e?query", {"http", "", "", "example.com", 0, "/path1/path2/%2e%2e", "query", "", "http://example.com/path1/path2/%2e%2e?query"}); 609 checkURL("http://example.com/path1/path2/%2e#fragment", {"http", "", "", "example.com", 0, "/path1/path2/%2e", "", "fragment", "http://example.com/path1/path2/%2e#fragment"}); 610 checkURL("http://example.com/path1/path2/%2e%2e#fragment", {"http", "", "", "example.com", 0, "/path1/path2/%2e%2e", "", "fragment", "http://example.com/path1/path2/%2e%2e#fragment"}); 599 checkURLDifferences("http://example.com/path1/.%2e", 600 {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"}, 601 {"http", "", "", "example.com", 0, "/path1/.%2e", "", "", "http://example.com/path1/.%2e"}); 602 checkURLDifferences("http://example.com/path1/.%2E", 603 {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"}, 604 {"http", "", "", "example.com", 0, "/path1/.%2E", "", "", "http://example.com/path1/.%2E"}); 605 checkURLDifferences("http://example.com/path1/.%2E/", 606 {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"}, 607 {"http", "", "", "example.com", 0, "/path1/.%2E/", "", "", "http://example.com/path1/.%2E/"}); 608 checkURLDifferences("http://example.com/path1/%2e.", 609 {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"}, 610 {"http", "", "", "example.com", 0, "/path1/%2e.", "", "", "http://example.com/path1/%2e."}); 611 checkURLDifferences("http://example.com/path1/%2E%2e", 612 {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"}, 613 {"http", "", "", "example.com", 0, "/path1/%2E%2e", "", "", "http://example.com/path1/%2E%2e"}); 614 checkURLDifferences("http://example.com/path1/%2e", 615 {"http", "", "", "example.com", 0, "/path1/", "", "", "http://example.com/path1/"}, 616 {"http", "", "", "example.com", 0, "/path1/%2e", "", "", "http://example.com/path1/%2e"}); 617 checkURLDifferences("http://example.com/path1/%2E", 618 {"http", "", "", "example.com", 0, "/path1/", "", "", "http://example.com/path1/"}, 619 {"http", "", "", "example.com", 0, "/path1/%2E", "", "", "http://example.com/path1/%2E"}); 620 checkURLDifferences("http://example.com/path1/%2E/", 621 {"http", "", "", "example.com", 0, "/path1/", "", "", "http://example.com/path1/"}, 622 {"http", "", "", "example.com", 0, "/path1/%2E/", "", "", "http://example.com/path1/%2E/"}); 623 checkURLDifferences("http://example.com/path1/path2/%2e?query", 624 {"http", "", "", "example.com", 0, "/path1/path2/", "query", "", "http://example.com/path1/path2/?query"}, 625 {"http", "", "", "example.com", 0, "/path1/path2/%2e", "query", "", "http://example.com/path1/path2/%2e?query"}); 626 checkURLDifferences("http://example.com/path1/path2/%2e%2e?query", 627 {"http", "", "", "example.com", 0, "/path1/", "query", "", "http://example.com/path1/?query"}, 628 {"http", "", "", "example.com", 0, "/path1/path2/%2e%2e", "query", "", "http://example.com/path1/path2/%2e%2e?query"}); 629 checkURLDifferences("http://example.com/path1/path2/%2e#fragment", 630 {"http", "", "", "example.com", 0, "/path1/path2/", "", "fragment", "http://example.com/path1/path2/#fragment"}, 631 {"http", "", "", "example.com", 0, "/path1/path2/%2e", "", "fragment", "http://example.com/path1/path2/%2e#fragment"}); 632 checkURLDifferences("http://example.com/path1/path2/%2e%2e#fragment", 633 {"http", "", "", "example.com", 0, "/path1/", "", "fragment", "http://example.com/path1/#fragment"}, 634 {"http", "", "", "example.com", 0, "/path1/path2/%2e%2e", "", "fragment", "http://example.com/path1/path2/%2e%2e#fragment"}); 635 checkURL("http://example.com/path1/path2/A%2e%2e#fragment", {"http", "", "", "example.com", 0, "/path1/path2/A%2e%2e", "", "fragment", "http://example.com/path1/path2/A%2e%2e#fragment"}); 611 636 checkURLDifferences("file://[0:a:0:0:b:c:0:0]/path", 612 637 {"file", "", "", "[0:a::b:c:0:0]", 0, "/path", "", "", "file://[0:a::b:c:0:0]/path"},
Note:
See TracChangeset
for help on using the changeset viewer.