swiftlang / swift-foundation

The Foundation project
Apache License 2.0
2.36k stars 150 forks source link

[6.0.0] URLComponents: support http(s)+unix schemes #913

Closed jrflat closed 1 week ago

jrflat commented 1 week ago

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

Explanation: Percent-encode the host (instead of IDNA-encoding) for URLs with the http+unix or https+unix scheme, supporting the common representation of a "HTTP over Unix socket" URL. This fixes http(s)+unix-related regressions in clients such as Vapor and AsyncHTTPClient (see https://github.com/apple/swift-foundation/issues/863 and https://github.com/swift-server/async-http-client/issues/767) Scope: Only impacts http+unix and https+unix URLs, adds them to the set of schemesToPercentEncodeHost Original PR: https://github.com/apple/swift-foundation/pull/883 Risk: Low - narrow scope, added special casing of two schemes to a larger set that has been well tested Testing: Local, swift-ci, stable in main for 2 weeks, verified to fix https://github.com/swift-server/async-http-client/issues/767 Reviewer: @parkera

jrflat commented 1 week ago

@swift-ci please test