-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PUT Implementation Broken #70
Comments
We use PUT in the SimpleGeo client. Works fine. Can you write a test or show some example code that exercises this issue you're experiencing? |
Working GET request:
Working POST request:
Failing PUT request with no change to headers (API receives and processes as GET):
Failing PUT request with change to headers (API returns 401 Unauthorized):
|
Sorry, forgot about the calling method...
|
With the assistance of Joslyn Esser at Assistly, I have tracked down the issue and submitted a pull request (issue #71). |
When signing the OAuth request, it seems that PUT requests are not properly signed. I am able to properly authenticate to any number of APIs via GET and POST, but PUT fails to authenticate properly.
This is a function of the API that I am accessing, but reproducing with the Assistly API is something like this:
PUT requests are seen as GET requests (specifically when updating an object). When the form-urlencoded header is manually added, the API sees the request as PUT, but throws a 401 Unauthorized error, indicating that the signing is incorrect, because a GET request right before that PUT with the same OAuth credentials succeeds.
The text was updated successfully, but these errors were encountered: