Accept header not set
Brought to you by:
alain-couthures
In submission replace='instance' the accept header is not set except in certain conditions:
if \(method == "get" || method == "delete"\) \{ if \(media == XFSubmission.SOAP\_\) \{ req.setRequestHeader\("Accept", mt\); \} req.send\(null\); \} else \{ req.setRequestHeader\("Content-Type", mt\); if \(media == XFSubmission.SOAP\_\) \{ req.setRequestHeader\("SOAPAction", this.soapAction\); \} req.send\(Core.saveXML\(node\)\); \}
So it looks like the submission/mediatype is used to set the accept header in SOAP GET and DELETE requests, defaulting to application/xml, but it's not set at all in POST or PUT.
I propose that at least if subm.replace=="instance" that GET, PUT, and POST have Accept default to application/xml. It can be overridden using the XForms 1.1 headers element.
Simple patch to make non-soap case use accept: application/xml,text/xml