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
9
9
let DASHDASH = "--"
10
10
let CRLF = "\r\n"
11
11
12
- extension CharacterSet {
13
- static let rfc3986Unreserved = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~")
14
- }
15
-
16
12
open class Client {
17
13
18
14
// MARK: Properties
@@ -218,8 +214,8 @@ open class Client {
218
214
}
219
215
220
216
return output.addingPercentEncoding(
221
- withAllowedCharacters: .rfc3986Unreserved
222
- ) ?? ""
217
+ withAllowedCharacters: .urlHostAllowed
218
+ )?.replacingOccurrences(of: "+", with: "%2B") ?? ""
223
219
}
224
220
225
221
///
Original file line number Diff line number Diff line change @@ -9,10 +9,6 @@ import AsyncHTTPClient
9
9
let DASHDASH = "--"
10
10
let CRLF = "\r\n"
11
11
12
- extension CharacterSet {
13
- static let rfc3986Unreserved = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~")
14
- }
15
-
16
12
open class Client {
17
13
18
14
// MARK: Properties
@@ -195,8 +191,8 @@ open class Client {
195
191
}
196
192
197
193
return output.addingPercentEncoding(
198
- withAllowedCharacters: .rfc3986Unreserved
199
- ) ?? ""
194
+ withAllowedCharacters: .urlHostAllowed
195
+ )?.replacingOccurrences(of: "+", with: "%2B") ?? ""
200
196
}
201
197
202
198
///
You can’t perform that action at this time.
0 commit comments