Implement "application/xcap-error+xml" (and use 409 for errors)
|Assignee:||Klaus Darilion||% Done:||
|Target version:||Next Release|
According to http://tools.ietf.org/html/rfc4825#section-11, if a node selection is "invalid" the server should reply 409 with Content-Type "application/xcap-error+xml" and a body following the according XML schema.
But OpenXCAP returns 404 with a description in "text/plain" (for other errors is uses "text/html").
HTTP/1.1 404 Not Found Content-Type: text/plain The requested node selector /a:ruleset/a:rule[@id='pres_whitelist']/a:conditions/a:identity/a:one matches more than one element
The easier issue to handle is to reply 409 in these cases.
A more complex task is returing a XML according to section 11 of RFC 4825.
Updated by Iñaki Baz Castillo almost 5 years ago
Ops, I've realized that OpenXCAP does implement the request feature in some cases:
HTTP/1.1 409 Conflict Date: Tue, 21 Jul 2009 23:18:58 GMT Content-Length: 175 Content-Type: application/xcap-error+xml;charset=utf-8 Server: OpenXCAP/1.1.0 Connection: close <?xml version="1.0" encoding="UTF-8"?> <xcap-error xmlns="urn:ietf:params:xml:ns:xcap-error"><cannot-insert phrase="PUT request failed GET(PUT(x))==x invariant"/></xcap-error>
However, I expect that in the case I wrote in the initial report, 409 with Content-Type "application/xcap-error+xml" should also be returned.