[Cosmo-dev] CMP 204 responses
Travis Vachon
travis at osafoundation.org
Thu Feb 1 16:42:10 PST 2007
Hi folks
We've run into a problem on the webui side of things with CMP.
In short: Safari and Internet Explorer 6/7 can't deal with 204
responses. Even if the 204 response has a body (which is against spec
for a 204), neither Safari nor IE handle it correctly. To be a bit
more specific, Safari treats it as an error with an undefined status
code, and both IEs think it has a status code of "1223".
If this were the only problem with 204s I would be very hesitant to
suggest that we change the protocol because of bad browser behavior.
However, Brian suggested on IRC that returning 200s with updated
representations of the resources we are working on would actually be
more RESTful behavior (correct me if I paraphrased incorrectly..).
As such, I would like to propose the we replace all 204 responses
with 200s. This would probably be in the 0.7 timeframe. The following
calls would need to change:
Modify User (PUT /cmp/user/<username>)
Delete Account (DELETE /cmp/user/<username>)
Delete Multiple Accounts (POST /cmp/user/delete)
Activate Account (POST /cmp/activate/<username>)
Modify Account (PUT /cmp/account)
In the case of the two "modify" actions, we would return the updated
user representation.
For the other three, I imagine we would return 200s with empty
bodies. I'm by no means set in that opinion however, so other
suggestions would be welcome.
This would probably impact all cmp clients (though I believe our
webui code actually wouldn't need any modifications), and would
probably be difficult to support backwards-compatibility-wise unless
we changed the url scheme when we changed the responses.
Comments, questions, concerns?
-Travis
More information about the cosmo-dev
mailing list