I've been coding up some xml-rpc in three places using xmlrpc.inc.
- Server side PHP
- Client side PHP
- Client side Delphi (using the codepunk lib).

It's mostly gone smoothly, but I've been hitting a couple of problems
related to char sets. Judging by the XML-RPC list, I'm not the only one!

It seems that xmlrpc.inc is a bit touchy about white space. Back in the
summer I hit this working against Manila as they were formatting the XML
with tabs and carriage returns. I think that got dealt with. My problem
now is that any content with multiple consecutive CRLF causes xmlrpcresp
to barf with:- 

Fault: Code: 2 Reason 'Invalid return payload: enabling debugging to
examine incoming payload'

This whole effort is all to do with blogger.com and the api which
provides an easy way to see the problem. Enter a blog item with two
carriage returns. Then use xmlrpc.inc to call blogger.getPost or

Looking at the incoming xml, You can see the fragment causing the
<member><name>content</name><value>hello world 2 newlines

and there they were</value></member>
This looks like perfectly valid XML, so I think the problem is with

Where I've got control over both ends, I'm using nl2br() to insert <br
/> before CRLF which sorts it, but I don't think I should have to. And
then of course there's the problem of whether it's LFLF or CRLFCRLF but
I've tested this both on a Win platform and on *nix with the same

PHP 4.06
xmlrpc.inc 1.01  

Julian Bond    email: [EMAIL PROTECTED]
CV/Resume:         http://www.voidstar.com/cv/
WebLog:               http://www.voidstar.com/
M: +44 (0)77 5907 2173  T: +44 (0)192 0412 433
ICQ:33679568 tag:So many words, so little time

For information about how to subscribe and unsubscribe from this list
visit http://xmlrpc.usefulinc.com/list.html

Reply via email to