Menu

#40 Accept header not set

open
None
6
2010-08-17
2010-08-17
No

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.

Discussion

  • Leigh L. Klotz, Jr.

    • assigned_to: nobody --> alain-couthures
    • priority: 5 --> 6
     
  • Leigh L. Klotz, Jr.

    Simple patch to make non-soap case use accept: application/xml,text/xml

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.