Closed
Bug 694129
Opened 13 years ago
Closed 12 years ago
Spec and server bug and inconsistency: method not allowed
Categories
(Cloud Services Graveyard :: Server: Sync, defect)
Cloud Services Graveyard
Server: Sync
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: rnewman, Assigned: rfkelly)
Details
(Whiteboard: [qa+])
If you attempt a non-DELETE request to /storage, the server returns a 404. I imagine this is because the URL dispatcher in use clownshoesily is matching (method, path), rather than matching path and then deciding if the method is appropriate. The correct response is 405 Method Not Allowed, with an Allow: DELETE header. The spec is entirely and completely silent on the topic. Both of these should be fixed, and similar inconsistencies addressed within the document and the server code. I am interested to know what the PHP server did in this case. If it differs, this should be flagged as a regression.
Comment 1•13 years ago
|
||
PHP also returned a 404 in this situation (though it would have been much easier to change that code to a 405) Will poke around in Routes to see how to do this. The spec being silent is actually correct here in that it defines acceptable URLs for each method, rather than acceptable methods for each URL. Swapping that around would be interesting.
Reporter | ||
Comment 2•13 years ago
|
||
(In reply to Toby Elliott [:telliott] from comment #1) > The spec being silent is actually correct here in that it defines acceptable > URLs for each method, rather than acceptable methods for each URL. Swapping > that around would be interesting. If by "interesting" you mean "more like HTTP" ;)
Comment 3•13 years ago
|
||
"more like HTTP" and less "how the rest of the world thinks about it" :) Not sure there's a dispatcher out there that doesn't match by (method, path). Which does leave us a nice opening. It's obviously trivial to just route DELETE to a controller that 405s with the appropriate response, but it would be pretty sweet if we could find a clean way to do that on top of Pyramid, rather than as a one-off. (Especially since the one-off would need to be done repeatedly, given that there are like 9 verbs). Adding in Ben, who probably has interest in this, as well as Tarek.
Updated•12 years ago
|
Assignee: nobody → rkelly
Updated•12 years ago
|
Whiteboard: [qa+]
Assignee | ||
Comment 4•12 years ago
|
||
Cornice takes care of this automatically for sync2.0, and no more changes are going in for sync1.1. Marking as fixed.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
Updated•1 year ago
|
Product: Cloud Services → Cloud Services Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•