Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit b3baf04

Browse files
committed
improved URL encoding
1 parent 8c99df9 commit b3baf04

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Docs/QuickStart.zip

316 Bytes
Binary file not shown.

Just/Just.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,9 @@ public final class HTTP: NSObject, NSURLSessionDelegate, JustAdaptor {
714714
if originalObject is NSNull {
715715
return "null"
716716
} else {
717-
return "\(originalObject)".stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet()) ?? ""
717+
let reserved = NSCharacterSet.URLQueryAllowedCharacterSet().mutableCopy() as! NSMutableCharacterSet
718+
reserved.removeCharactersInString(":#[]@!$&'()*+,;=")
719+
return "\(originalObject)".stringByAddingPercentEncodingWithAllowedCharacters(reserved) ?? ""
718720
}
719721
}
720722

0 commit comments

Comments
 (0)