Re: content-type

John Wilson <[email protected]> Mon, 15 Nov 2010 09:11:05 +0000
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
On 15 Nov 2010, at 03:15, Bryan Henderson wrote:

> 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 .

My view is that the server should ignore content-type.

In practice you have to disregard part of the meaning of content-type: text/xml anyway. The charset parameter is omitted so you are supposed use US-ASCII (http://www.ietf.org/rfc/rfc3023 section 3.1) as the character encoding and nobody does that.

I think the firewall example is very unconvincing. Anybody who used that rule and expected to stop XML-RPC calls would get what they deserved.

Nice to see a question on XML-RPC implementation, the first in (literally) years :)

John Wilsom

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

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/