Skip to content

[6.0.1] URL.host should not return percent-encoded host #938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jrflat
Copy link
Contributor

@jrflat jrflat commented Sep 23, 2024

Original 6.0 cherry-pick: #902
Description from that cherry-pick:

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: #875
Risk: Low - minimal scope, one line change to restore behavior
Testing: Local, swift-ci, stable in main, release/6.0
Reviewer: @parkera @jmschonfeld

@jrflat
Copy link
Contributor Author

jrflat commented Sep 23, 2024

@swift-ci please test

@shahmishal shahmishal merged commit 6864318 into swiftlang:release/6.0.0 Sep 23, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants