Skip to content

Commit 491c278

Browse files
gh-action-runnergh-action-runner
authored andcommitted
Squashed 'apollo-ios/' changes from bf71e9c73..4375ddb3d
4375ddb3d Percent encode semicolons when using GET (#840) git-subtree-dir: apollo-ios git-subtree-split: 4375ddb3df1bf9b01155b76d284adf6823391b29
1 parent c9ef407 commit 491c278

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Apollo/GraphQLGETTransformer.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ public struct GraphQLGETTransformer {
4949
components.queryItems = queryItems
5050
}
5151

52+
let allowedCharacters = CharacterSet(charactersIn: "+;").inverted
5253
components.percentEncodedQuery =
53-
components.percentEncodedQuery?.replacingOccurrences(of: "+", with: "%2B")
54+
components.percentEncodedQuery?.addingPercentEncoding(withAllowedCharacters: allowedCharacters)
5455

5556
return components.url
5657
}

0 commit comments

Comments
 (0)