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
Refine idx adjustment: use newHost.Length directly
The correct adjustment when newHost replaces _string is simply idx = newHost.Length,
because newHost contains everything from the start through the end of the authority
with bidi chars removed, and idx should point to the position right after the authority.
This is more correct than the previous calculation (idx -= length - newHost.Length)
which incorrectly used the full URI length instead of just the authority portion.
Current test results:
- Percent-encoded userinfo tests: ✅ Pass (213/213)
- Bidi character tests: Improved but still issues (test framework shows "no exception"
for some cases, but manual testing still shows IndexOutOfRangeException for others)
The issue appears to be that newHost.Length works for some cases but not others. Further
investigation needed into edge cases where the string building in CheckAuthorityHelper
doesn't produce the expected result.
Co-authored-by: MihaZupan <[email protected]>
0 commit comments