Explanation: Fixes URL.host to match the behavior before the Swift URL implementation:
If the host was percent-encoded, return the percent-decoded host
If the host was IDNA-encoded (or not encoded at all), return that host string
Scope: Only impacts deprecated (but still used) URL.host for URLs with an encoded host, restoring previous behavior
Original PR:https://github.com/swiftlang/swift-foundation/pull/875Risk: Low - minimal scope, one line change to restore behavior
Testing: Local, swift-ci, stable in main, release/6.0
Reviewer: @parkera @jmschonfeld
Original 6.0 cherry-pick: https://github.com/swiftlang/swift-foundation/pull/902 Description from that cherry-pick:
Explanation: Fixes
URL.host
to match the behavior before the Swift URL implementation:Scope: Only impacts deprecated (but still used)
URL.host
for URLs with an encoded host, restoring previous behavior Original PR: https://github.com/swiftlang/swift-foundation/pull/875 Risk: Low - minimal scope, one line change to restore behavior Testing: Local, swift-ci, stable in main, release/6.0 Reviewer: @parkera @jmschonfeld