[REBOL] Re: Reading empty directories via FTP error
From: brett:codeconscious at: 12-Nov-2003 21:56
Hi Gabriele,
> My guess is that the server is sending TWO lines of answer, i.e.:
>
> 226-66555.9 Mbytes free disk space
> 226-File successfully transferred
Spot on.
> but REBOL only expects and picks one. On the subsequent operation,
> it picks the second line, but of course this confuses it because
> it is not the answer it is expecting.
Yes.
> I don't think this has an easy solution, because you have no way
> to know how many lines the server is sending as answer; you can
> patch the protocol for this particular server only by waiting for
> two lines of answer instead of one, but then it won't work on
> other servers.
No, it turns out to be easy.
You may have missed my email with the solution - I didn't get it sent back
to me. But you can see it on the REBOL website list page here:
http://www.rebol.net/list/list-msgs/32665.html
Mulitple lines are indicated by the "-" just after the 3 digit response code
sent back by the server - its like a continuation flag ie "there are more
lines coming". REBOL has the code built-in to handle multiple lines
(net-utils/confirm/mulitple) - it just wasn't turned on.
Regards,
Brett.