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

-requestWithMethod:path:parameters: with 'GET' method fails in version 0.3.0 #79

Closed
plasmabal opened this issue Aug 30, 2013 · 0 comments

Comments

@plasmabal
Copy link

I updated AFOAuth1Client to 0.3.0 and find my program failed with signature error from server. I tried to diagnose the problem today and found the cause is reversion 6bda44463131755f4a7d88e86d718a67c622dc5f.

The method checks if Content-Type header is application/x-www-form-urlencoded to decide whether the parameter argument is used for signature. And since it is not set for GET method, authorizationParameters is always nil, hence the signature is always wrong.

I've read RFC 5849, Section 3.4.1.3.1, and I believe the author missed the first item:

The query component of the HTTP request URI as defined by
[RFC3986], Section 3.4. The query component is parsed into a list
of name/value pairs by treating it as an
"application/x-www-form-urlencoded" string, separating the names
and values and decoding them as defined by
[W3C.REC-html40-19980424], Section 17.13.4.

I'm not sure what's the correct way to fix, hence I'll let the author to worry about it.

@mattt mattt closed this as completed in 6c189cf Sep 9, 2013
mattt added a commit that referenced this issue Sep 9, 2013
Fixes #79. Don't ignore parameters on GET requests.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant