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

Change isEqualToString to hasPrefix. #77

Merged
merged 1 commit into from
Aug 28, 2013
Merged

Change isEqualToString to hasPrefix. #77

merged 1 commit into from
Aug 28, 2013

Conversation

mlight3
Copy link

@mlight3 mlight3 commented Aug 23, 2013

I replace my library with AFOAuth1Client.
During migration, I have a "Invalid token" error.

I searched whole day and finally figure out "Authorization" header does not include oauth_verifier, oauth_callback.

In requestWithMethod:path:paramters: method,
authorizationParameters will be nil if Content-Type is not EQUAL "application/x-www-form-urlencoded".

Because AFHttpClient set Content-Type "application/x-www-form-urlencoded; charset=utf-8", authorizationParameters always be nil, and header does not verifier and callback.

So I changed isEqualToString -> hasPrefix, in requestWithMethod:path:parameters and multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock methods.

mattt added a commit that referenced this pull request Aug 28, 2013
Change isEqualToString to hasPrefix.
@mattt mattt merged commit d37fb04 into AFNetworking:master Aug 28, 2013
@mattt
Copy link
Contributor

mattt commented Aug 28, 2013

Looks good. Sorry for the difficulty there. Thanks for the patch!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants