Skip to content

Commit e6c22b5

Browse files
Also remove percent encoding from url.host
- This fixes the default behavior with Swift 6.0.0 which was to not remove the percent encoding.
1 parent 18a112e commit e6c22b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/AMQPClient/AMQPConnectionConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public extension AMQPConnectionConfiguration {
9898
guard let scheme = UrlScheme(rawValue: url.scheme ?? "") else { throw AMQPConnectionError.invalidUrlScheme }
9999

100100
// there is no such thing as a "" host
101-
let host = url.host?.isEmpty == true ? nil : url.host
101+
let host = url.host?.isEmpty == true ? nil : url.host?.removingPercentEncoding
102102
//special path magic for vhost interpretation (see https://www.rabbitmq.com/uri-spec.html)
103103
var vhost = url.path.isEmpty ? nil : String(url.path.removingPercentEncoding?.dropFirst() ?? "")
104104

0 commit comments

Comments
 (0)