XMLRPC and Content-Type
Posted: Mon Jun 26, 2006 7:35 pm
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
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