Protocol selection fails on POST when REST is enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
WSME |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
With the fix to bug #1419110 it is now impossible to select a protocol other than REST when you do a POST. This simple unit test demonstrates the issue (I put it in wsme/tests/
def test_protocol_
import wsme.rest.protocol
import wsme.protocol
class P(wsme.
name = "test"
def accept(self, r):
root = WSRoot()
from webob import Request
req = Request.
req.method = 'POST'
p = root._select_
assert p.name == "test"
Changed in wsme: | |
status: | New → Confirmed |
Changed in wsme: | |
milestone: | none → 0.8.0 |
status: | Fix Committed → Fix Released |
Hmm, that's unfortunate.
As a short term workaround the test can be made to work by adding the RestProtocol last.
Unfortunately the changes I made for #1419110 raise ClientSideErrors in accept that this appears to break the protcol handling. One option might be to move the media_type_accept call into iter_calls on the RestProtocol and change accept back to how it was before. I'll investigate this.
Is protocol stacking the common way of doing things with WSME?
(BTW none of this is Made Easy from my perspective...)