You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://bugs.webkit.org/show_bug.cgi?id=310982
Reviewed by Alex Christensen.
There were two issues with encodeHostName():
1. mapHostNames() would return early for ASCII-only input, even when
that input contains %.
2. mapHostName() checked the wrong variable for %.
3. Fixing (1) meant URLs containing % could now reach the host-range
detection code, which doesn't understand bracketed IPv6 syntax:
for http://[::1]/path%20x it would pick '[' as the host, which
then failed UIDNA. Skip IDN processing for host ranges starting
with '[' in collectRangesThatNeedMapping().
We also fix various trivial issues in the URL code:
1. protocolIsFile() is redundant with hasSpecialScheme().
2. Some type mismatches.
3. A redundant call to codePointAt(i).
Test: Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm
Canonical link: https://commits.webkit.org/314167@main
0 commit comments