Re: [phpxmlrpc] CRLFCRLF

2001-11-29 Thread Edd Dumbill

On Thu, Nov 29, 2001 at 10:10:19AM +, Julian Bond wrote:
> In article <1007020948.30660.4.camel@pingu>, Edd Dumbill
> <[EMAIL PROTECTED]> writes
> >I can't reproduce this simply by creating a return payload with newlines
> >in it, things work OK.  Can you capture and send over the full HTTP
> >response from blogger, so I can see the headers and everything please?
> >
> >On Mon, 2001-11-26 at 17:36, Julian Bond wrote:
> >> Where I've got control over both ends, I'm using nl2br() to insert  >> /> 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
> >> results.

I've found the bug.  I'll release a fix in an hour or two.

-- Edd

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



Re: [phpxmlrpc] CRLFCRLF

2001-11-29 Thread Julian Bond

In article <1007020948.30660.4.camel@pingu>, Edd Dumbill
<[EMAIL PROTECTED]> writes
>I can't reproduce this simply by creating a return payload with newlines
>in it, things work OK.  Can you capture and send over the full HTTP
>response from blogger, so I can see the headers and everything please?
>
>On Mon, 2001-11-26 at 17:36, Julian Bond wrote:
>> Where I've got control over both ends, I'm using nl2br() to insert > /> 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
>> results.

Here's the results with the 2 (3?) newlines.



blogger.getPost


737B19630288858935803B9749822CEBF274DD7D


7414222


jbond23


*




---GOT---
HTTP/1.0 200 
Date: Thu, 29 Nov 2001 10:10:14 GMT
Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_jk
Content-Length: 473
Content-Type: text/xml
Age: 1
Via: HTTP/1.0 ntl_site (Traffic-Server/4.0.15-M [cMsSf ])

userid311127dateCreated20011126T09:1
7:52contenthello world. 2 newlines follow


and there they were.postid7
414222
---END---

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

And without.



blogger.getPost


737B19630288858935803B9749822CEBF274DD7D


7414222


jbond23


*




---GOT---
HTTP/1.0 200 
Date: Thu, 29 Nov 2001 10:14:56 GMT
Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_jk
Content-Length: 472
Content-Type: text/xml
Age: 0
Via: HTTP/1.0 ntl_site (Traffic-Server/4.0.15-M [cMsSf ])

userid311127dateCreated20011126T09:1
7:52contenthello world. 0 newline follows
and there they weren't.postid7414222
---END---

---EVALING---[291 chars]---
new xmlrpcval(array('userid' => new xmlrpcval("311127",
'string'),'dateCreated' => new xmlrpcval("20011126T09:17:52",
'dateTime.iso8601'),'content' => new xmlrpcval("hello world. 0 newline
follows
and there they weren't.", 'string'),'postid' => new xmlrpcval("7414222",
'string')), 'struct');
---END---
Success


I got this value back





userid
311127

dateCreated
20011126T09:17:52

content
hello world. 0 newline follows
and there they weren't.

postid
7414222








-- 
Julian Bondemail: [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



Re: [phpxmlrpc] CRLFCRLF

2001-11-29 Thread Edd Dumbill

I can't reproduce this simply by creating a return payload with newlines
in it, things work OK.  Can you capture and send over the full HTTP
response from blogger, so I can see the headers and everything please?

On Mon, 2001-11-26 at 17:36, Julian Bond wrote:
> Where I've got control over both ends, I'm using nl2br() to insert  /> 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
> results.




msg00055/pgp0.pgp
Description: PGP signature


[phpxmlrpc] CRLFCRLF

2001-11-26 Thread Julian Bond

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

Looking at the incoming xml, You can see the fragment causing the
problem.
-
contenthello world 2 newlines


and there they were
-
This looks like perfectly valid XML, so I think the problem is with
xmlrpc.inc.

Where I've got control over both ends, I'm using nl2br() to insert  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
results.

PHP 4.06
xmlrpc.inc 1.01  

-- 
Julian Bondemail: [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