Page 1 of 1

XMLRPC and Content-Type

Posted: Mon Jun 26, 2006 7:35 pm
by pilif
Hi there,

I noticed that the XML-RPC API sends out the wrong content-type: Actually, it sends no such header at all, making PHP send out the default text/html. There are quite many blogging applications (I used the TextMate blogging bundle) that refuse to work correctly if the right content-type is not used.

I worked around the problem by adding "header('Content-Type: text/xml');" to serendipity_xmlrpc.php (it felt better setting the header there instead of in the plugin, but this breaks the error-message displayed if the plugin is not installed).

I frankly don't have a clue what the clean solution for this would be, but my "hack" fixed my problems with the blogging bundle of TextMate (MarsEdit still doesn't work, btw).

Philip

Re: XMLRPC and Content-Type

Posted: Mon Jun 26, 2006 10:07 pm
by garvinhicking
Hi!

Are you sure about that? Because the XML-RPC PEAR API actually should send the Content-Type and Content-Length header together with the returned XML...

Which s9y version and plugin version are you using? And are you using the XML-RPC PEAR files shipped with the plugin or custom ones?

Best regards,
Garvin