content-type

Bryan Henderson <[email protected]> 15 Nov 2010 03:15:03 +0000
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
The XML-RPC spec says the HTTP content type of an XML-RPC call or response is
text/xml and, if you squint, says the content-type header field has to be
there.

But what do people think an XML-RPC server ought to do with a call that is
otherwise XML-RPC but lacks the content-type header field or says the content
type is something else, e.g. text/plain?

A comment from long ago in the source code of XML-RPC For C and C++ says the
server should reject the call as malformed for this reason: the server's
network security filters may turn away POST requests of type text/xml with the
intention of stopping XML-RPC calls, so processing a call that doesn't state
text/xml would defeat that filter.  And XML-RPC For C and C++ has in fact
always rejected calls that don't say content-type: text/xml.

On the other hand, being liberal in what you accept is the general rule, and
makes for higher interoperability.  This question came up because I
encountered a supposed XML-RPC client that does in fact indicate content-type:
text/plain .

-- 
Bryan Henderson                                   San Jose, California


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/