Changeset 174712 in webkit
- Timestamp:
- Oct 14, 2014 4:58:34 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r174707 r174712 1 2014-10-14 Dan Bernstein <mitz@apple.com> 2 3 URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior 4 https://bugs.webkit.org/show_bug.cgi?id=137718 5 6 Reviewed by Alexey Proskuryakov. 7 8 * fast/loader/url-parse-1-expected.txt: Updated results. 9 * fast/loader/url-parse-1.html: Added a few test cases. 10 * fast/url/file-http-base-expected.txt: Updated results. 11 * fast/url/host-expected.txt: Ditto. 12 * fast/url/invalid-urls-utf8-expected.txt: Ditto. 13 * fast/url/relative-expected.txt: Ditto. 14 * fast/url/standard-url-expected.txt: Ditto. 15 1 16 2014-10-14 Alexey Proskuryakov <ap@apple.com> 2 17 -
trunk/LayoutTests/fast/loader/url-parse-1-expected.txt
r105307 r174712 25 25 http:// http:/ / 26 26 http:/// http:/ / 27 http://// http:// // 27 http://// http:/ / 28 http:webkit.org http://webkit.org/ webkit.org / 29 http:/webkit.org http://webkit.org/ webkit.org / 30 http://webkit.org http://webkit.org/ webkit.org / 31 http:///webkit.org http://webkit.org/ webkit.org / 32 http:////webkit.org http://webkit.org/ webkit.org / 33 http://///webkit.org http://webkit.org/ webkit.org / 34 http://////webkit.org http://webkit.org/ webkit.org / 35 http:////////////////webkit.org http://webkit.org/ webkit.org / 28 36 http://localhost http://localhost/ localhost / 29 37 http://localhost/ http://localhost/ localhost / -
trunk/LayoutTests/fast/loader/url-parse-1.html
r122687 r174712 68 68 "http:///", 69 69 "http:////", 70 "http:webkit.org", 71 "http:/webkit.org", 72 "http://webkit.org", 73 "http:///webkit.org", 74 "http:////webkit.org", 75 "http://///webkit.org", 76 "http://////webkit.org", 77 "http:////////////////webkit.org", 70 78 "http://localhost", 71 79 "http://localhost/", -
trunk/LayoutTests/fast/url/file-http-base-expected.txt
r105294 r174712 28 28 FAIL canonicalize('//') should be file:///. Was http:/. 29 29 FAIL canonicalize('///') should be file:///. Was http:/. 30 FAIL canonicalize('///test') should be file:///test. Was http:/ test.30 FAIL canonicalize('///test') should be file:///test. Was http://test/. 31 31 PASS canonicalize('file://test') is 'file://test/' 32 32 FAIL canonicalize('file://localhost') should be file://localhost/. Was file:///. -
trunk/LayoutTests/fast/url/host-expected.txt
r149925 r174712 34 34 PASS canonicalize('http://www.lookout.net::80::443/') is 'http://www.lookout.net::80::443/' 35 35 PASS canonicalize('http://\.//') is 'http://.//' 36 FAIL canonicalize('http:////:@//') should be http:////. Was http:// :@//.36 FAIL canonicalize('http:////:@//') should be http:////. Was http:////:@//. 37 37 PASS canonicalize('http://\google.com/foo/') is 'http://google.com/foo/' 38 FAIL canonicalize('http://\\google.com/foo/') should be http://google.com/foo/. Was http:/google.com/foo/. 39 PASS canonicalize('http:////asdf@//') is 'http://asdf@//' 38 PASS canonicalize('http://\\google.com/foo/') is 'http://google.com/foo/' 39 FAIL canonicalize('http:////asdf@//') should be http://asdf@//. Was http:////asdf@//. 40 40 PASS canonicalize('http:////:81/') is 'http://:81/' 41 41 PASS canonicalize('http://:///') is 'http://:///' … … 43 43 PASS canonicalize('http://xxxx:/') is 'http://xxxx/' 44 44 PASS canonicalize('http://.:./') is 'http://.:./' 45 FAIL canonicalize('http://////@google.com//') should be http://google.com//. Was http:////@google.com//. 45 PASS canonicalize('http://////@google.com//') is 'http://google.com//' 46 46 PASS canonicalize('http://@google.com/') is 'http://google.com/' 47 47 PASS successfullyParsed is true -
trunk/LayoutTests/fast/url/invalid-urls-utf8-expected.txt
r129445 r174712 6 6 FAIL src should be http:///. Was http:/. 7 7 FAIL src should be https:///. Was https:/. 8 PASS src is expected 9 PASS src is expected 10 PASS src is expected 11 PASS src is expected 8 FAIL src should be ftp:///. Was ftp://. 9 FAIL src should be gopher:///. Was gopher://. 10 FAIL src should be ws:///. Was ws://. 11 FAIL src should be wss:///. Was wss://. 12 12 PASS src is expected 13 13 PASS src is expected -
trunk/LayoutTests/fast/url/relative-expected.txt
r104414 r174712 53 53 PASS canonicalize('//another') is 'http://another/' 54 54 PASS canonicalize('//another/path?query#ref') is 'http://another/path?query#ref' 55 FAIL canonicalize('///another/path') should be http://another/path. Was http:/another/path. 55 PASS canonicalize('///another/path') is 'http://another/path' 56 56 PASS canonicalize('//Another\\path') is 'http://another/path' 57 57 FAIL canonicalize('//') should be http:. Was http:/. -
trunk/LayoutTests/fast/url/standard-url-expected.txt
r104414 r174712 8 8 PASS canonicalize('http://[www.google.com]/') is 'http://[www.google.com]/' 9 9 PASS canonicalize('http://www.google.com') is 'http://www.google.com/' 10 FAIL canonicalize('http:////////user:@google.com:99?foo') should be http://user@google.com:99/?foo. Was http://////user:@google.com:99?foo. 10 PASS canonicalize('http:////////user:@google.com:99?foo') is 'http://user@google.com:99/?foo' 11 11 FAIL canonicalize('http://192.0x00A80001') should be http://192.168.0.1/. Was http://192.0x00a80001/. 12 12 FAIL canonicalize('http://www/foo%2Ehtml') should be http://www/foo.html. Was http://www/foo%2Ehtml. -
trunk/Source/WebCore/ChangeLog
r174710 r174712 1 2014-10-14 Dan Bernstein <mitz@apple.com> 2 3 URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior 4 https://bugs.webkit.org/show_bug.cgi?id=137718 5 6 Reviewed by Alexey Proskuryakov. 7 8 Added cases to fast/loader/url-parse-1.html. 9 10 * platform/URL.cpp: 11 (WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional 12 slashes after the ://, as prescribed by the authority-ignore-slashes state in the current 13 URL spec. 14 1 15 2014-10-14 Brent Fulgham <bfulgham@apple.com> 2 16 -
trunk/Source/WebCore/platform/URL.cpp
r167480 r174712 248 248 static inline bool isPathSegmentEndChar(UChar c) { return c <= 0xff && (characterClassTable[c] & PathSegmentEndChar); } 249 249 static inline bool isBadChar(unsigned char c) { return characterClassTable[c] & BadChar; } 250 250 251 251 static inline bool isSchemeCharacterMatchIgnoringCase(char character, char schemeCharacter) 252 252 { … … 1141 1141 // FIXME: Authority characters may be scanned twice, and it would be nice to be faster. 1142 1142 1143 if (hierarchical) 1143 if (hierarchical) { 1144 1144 userStart++; 1145 if (hasSecondSlash) 1146 userStart++; 1145 if (hasSecondSlash) { 1146 userStart++; 1147 if (isNonFileHierarchicalScheme(url, schemeEnd)) { 1148 while (url[userStart] == '/') 1149 userStart++; 1150 } 1151 } 1152 } 1153 1147 1154 userEnd = userStart; 1148 1155
Note: See TracChangeset
for help on using the changeset viewer.