Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Convert query escapes to stringByAddingPercentEncodingWithAllowedCharacters #2908

Merged
merged 1 commit into from Aug 19, 2015

Conversation

kcharwood
Copy link
Contributor

Since watchOS requires us to use stringByAddingPercentEncodingWithAllowedCharacters, we've migrated over to that. We're also using the logic that has been baked in to AlamoFire.

Note this does have one backwards compatible issue. / and ? are no longer encoded in the query parameters, per RFC 3986.

 In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
 query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
 should be percent-escaped in the query string.
    - parameter string: The string to be percent-escaped.
    - returns: The percent-escaped string.

@cnoon want to take a look?

@kcharwood kcharwood added this to the 2.6.0 milestone Aug 19, 2015
@cnoon
Copy link
Member

cnoon commented Aug 19, 2015

This looks good to me dude! 👍🏼

kcharwood added a commit that referenced this pull request Aug 19, 2015
…ng_update

Convert query escapes to `stringByAddingPercentEncodingWithAllowedCharacters`
@kcharwood kcharwood merged commit 2cf77ad into master Aug 19, 2015
shawnjk pushed a commit to toopher/BDBOAuth1Manager that referenced this pull request Sep 1, 2015
AFNetworking 2.6 removed those characters from its encoded character
list. See AFNetworking/AFNetworking#2908
shawnjk pushed a commit to shawnjk/BDBOAuth1Manager that referenced this pull request Sep 1, 2015
AFNetworking 2.6 removed those characters from its encoded character
list. See AFNetworking/AFNetworking#2908
bdbergeron pushed a commit to bdbergeron/BDBOAuth1Manager that referenced this pull request Sep 23, 2015
AFNetworking 2.6 removed those characters from its encoded character
list. See AFNetworking/AFNetworking#2908
@onmyway133
Copy link

It would be better if we can have a flag for that :)

@kcharwood kcharwood deleted the url_query_parameter_encoding_update branch October 19, 2015 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants