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
Initializing a URL from an IPv6 address in Swift 6 on Linux now does not strip enclosing square-brackets. In earlier Swift versions and on macOS the square-brackets are removed.
As well as being a behavior change this can cause issues when passing the host component on e.g. to inet_pton which doesn't tolerate the square braces.
On Linux Swift 5.10:
1> import Foundation
2> let u = Foundation.URL(string: "http://[::1]")
[snip]
3> print(u!.host)
Optional("::1")
On Linux Swift 6.0.1:
1> import Foundation
2> let u = Foundation.URL(string: "http://[::1]")
[snip]
3> print(u!.host)
Optional("[::1]")