Fixed and optimized a test of issue #22526.
Closes #22586: clarify meaning of allow_fragments in urlparse.
Merge heads