Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

PUT requests not handled correctly by the REST library #429

Closed
gotwarlost opened this issue Aug 24, 2012 · 8 comments
Closed

PUT requests not handled correctly by the REST library #429

gotwarlost opened this issue Aug 24, 2012 · 8 comments
Assignees
Milestone

Comments

@gotwarlost
Copy link

from rest.common.js:

                if ('GET' === method) {
                    if (-1 === url.indexOf('?')) {
                        url += '?' + params;
                    } else {
                        url += '&' + params;
                    }
                } else if ('POST' === method) { /* WHAT ABOUT PUT? */
                    ioConfig.data = params;
                }

This bug is not present in 0.3.26 and was introduced in 0.3.27. It is affecting our capability to move forward since we need PUT requests to a backend webservice to work.

@rwaldura
Copy link
Contributor

@rwaldura
Copy link
Contributor

Next Sprint candidate. Sprint's already pretty full though -- might get bumped. How critical is this? What's it blocking?

@mojit0
Copy link
Contributor

mojit0 commented Aug 24, 2012

A proper REST implementation should support GET, POST, PUT, and DELETE. For performance reasons it's sometimes useful to also support HEAD requests. As part of that support HTTP status codes other than 200 can indicate success and should be properly handled. We may want to open a separate issue for full REST support so we can focus this bug on only what's being blocked at the moment tho.

@gotwarlost
Copy link
Author

agree with @mojit0 - currently we are unable to move forward with our mojito dependency and have to pin ourselves to v0.3.26

This particular fix should be a one-line change (i.e. add a clause for PUT in addition to POST) - the effort is more on writing a unit test for this.

@rwaldura
Copy link
Contributor

Next Sprint, S41.

@mridgway
Copy link
Collaborator

Looks like this regression was added by #196 which was a fix for a YUI 3.5.1 regression. If we're upgrading to YUI 3.6 we can roll back #196 because it was fixed with IO.

@mridgway
Copy link
Collaborator

Upgrade to YUI 3.6 is blocked by a regression, so we're waiting until 3.6.1 or 3.7.0 before we upgrade. Therefore, I am fixing this in place as it is now. PR incoming.

mridgway pushed a commit to mridgway/mojito that referenced this issue Aug 29, 2012
mridgway added a commit that referenced this issue Aug 29, 2012
Fixed Issue #429: Added params to body for PUT requests
@mridgway
Copy link
Collaborator

Fixed in #450.

@ghost ghost assigned mridgway Aug 29, 2012
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

4 participants