File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,6 @@ import AsyncHTTPClient
99let DASHDASH = "--"
1010let CRLF = "\r\n"
1111
12- extension CharacterSet {
13- static let rfc3986Unreserved = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~")
14- }
15-
1612open class Client {
1713
1814 // MARK: Properties
@@ -218,8 +214,8 @@ open class Client {
218214 }
219215
220216 return output.addingPercentEncoding(
221- withAllowedCharacters: .rfc3986Unreserved
222- ) ?? ""
217+ withAllowedCharacters: .urlHostAllowed
218+ )?.replacingOccurrences(of: "+", with: "%2B") ?? ""
223219 }
224220
225221 ///
Original file line number Diff line number Diff line change @@ -9,10 +9,6 @@ import AsyncHTTPClient
99let DASHDASH = "--"
1010let CRLF = "\r\n"
1111
12- extension CharacterSet {
13- static let rfc3986Unreserved = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~")
14- }
15-
1612open class Client {
1713
1814 // MARK: Properties
@@ -195,8 +191,8 @@ open class Client {
195191 }
196192
197193 return output.addingPercentEncoding(
198- withAllowedCharacters: .rfc3986Unreserved
199- ) ?? ""
194+ withAllowedCharacters: .urlHostAllowed
195+ )?.replacingOccurrences(of: "+", with: "%2B") ?? ""
200196 }
201197
202198 ///
You can’t perform that action at this time.
0 commit comments