Skip to content
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

[6.0.x] Restore URL.host bracket stripping for compatibility #1023

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

jrflat
Copy link
Contributor

@jrflat jrflat commented Oct 29, 2024

Explanation: Strips the square brackets from IP literal hosts when calling URL.host. This restores previous behavior and prevents bincompat issues for clients who take IPv6 addresses from URL.host and pass them directly to APIs like inet_pton(3).
Scope: Only impacts URL.host and URL.host() when the host is an IP literal.
Original PR: #1008
Risk: Low - Small change to restore previous behavior.
Testing: Added unit test, swift-ci, stable in main
Reviewer: @parkera

Resolves #957 for release/6.0

@jrflat
Copy link
Contributor Author

jrflat commented Oct 29, 2024

@swift-ci please test

@jrflat jrflat requested a review from parkera October 29, 2024 13:48
@jrflat jrflat merged commit 26f4864 into swiftlang:release/6.0 Nov 4, 2024
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