Skip to content

Commit

Permalink
encoding: Fix an an issue with NSCharacterSets
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonycastelli committed May 3, 2018
1 parent 8eb91b2 commit fa9442d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/S3Storage/S3 Signer/String+AWSEncoding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ struct AWSEncoding {

extension String {
func awsStringEncoding(_ type: String) -> String? {
let allowed = NSMutableCharacterSet.alphanumeric()
allowed.addCharacters(in: type)
return self.addingPercentEncoding(withAllowedCharacters: allowed as CharacterSet)
var allowed = CharacterSet.alphanumerics
allowed.insert(charactersIn: type)
return self.addingPercentEncoding(withAllowedCharacters: allowed)
}
}

0 comments on commit fa9442d

Please sign in to comment.