ftp scheme (cont.)
[1/5] from: brett:codeconscious at: 17-Nov-2003 17:33
Hi again,
It would be great if Ashley and Carl could run this new test against their
servers. This one is in source code form rather than a patch.
---What I've done
Romano wrote (some days back):
> If LIST is not implemented, the server should return an error, not an
empty list of files.
I think this is entirely reasonable, so in this latest FTP scheme I've
changed the logic to use NLST only if parsing of LIST results fails. That
is, if nothing is returned successfully I consider that an empty directory,
if something is returned but our parse rules fail then I use NLST. Because
it is simpler, NLST is unlikely to fail (if it is implemented on the
server). If by chance both do actually fail, then I raise an error. I've
also factored out the common logic as I see it into a separate function to
see how LIST and NLST are so similiar.
I've also merged the various patches added a little more network logging and
changed [error? catch value ] sequences to [error? try [catch value]]
pending Romano's comments on this error handling strategy.
do http://www.codeconscious.com/ftp-testing/ftp-proposed.r
trace/net true
read ftp://....
Regards,
Brett.
[2/5] from: rotenca:telvia:it at: 17-Nov-2003 16:06
Hi Brett,
> It would be great if Ashley and Carl could run this new test against their
> servers. This one is in source code form rather than a patch.
You come to my side about patches :-)
I did not want to rewrite by scratch the whole ftp protocol, only to
reorganize the code to do better and wider patches.
> I think this is entirely reasonable, so in this latest FTP scheme I've
> changed the logic to use NLST only if parsing of LIST results fails. That
<<quoted lines omitted: 4>>
> also factored out the common logic as I see it into a separate function to
> see how LIST and NLST are so similiar.
Could be, the problem is:
1) user ask a dir read ftp://aaa.bbb.ccc/pub/ the dir is [a/ b/ c d]
2) LIST fails
3) NLIST does not fail
4) user copy is [a b c d]
5) user thinks these are 4 files (he can't know that LIST has failed)
I prefer the custom approach, so the user knows what he is doing and what he
receives.
But now i have another idea: to use the NLST only for file retrieve not for
dir list.
A problem i know with this approach is:
>> probe info? ftp://rtfm.mit.edu/pub/usenet
make object! [
size: none
date: none
type: 'file
]
but usenet is a directory.
> I've also merged the various patches added a little more network logging and
> changed [error? catch value ] sequences to [error? try [catch value]]
> pending Romano's comments on this error handling strategy.
Try [catch blk]
catches almost any throwed or maked errors in my test.
There are only 2 general cases i know in which it does not work, but they are
not presents (AFAIK) in the protocols, so we can almost sure.
---
Ciao
Romano
[3/5] from: atruter:labyrinth:au at: 18-Nov-2003 9:45
> It would be great if Ashley and Carl could run this new test against
> their servers.
Jackpot! This seems to have corrected all the issues I had on "my" two
servers. Well done.
Regards,
Ashley
[4/5] from: carl:cybercraft at: 24-Dec-2003 22:48
On 17-Nov-03, Brett Handley wrote:
> Hi again,
> It would be great if Ashley and Carl could run this new test against
> their servers. This one is in source code form rather than a patch.
Works fine with all my three servers Brett. Good work. So, should I
make this my perminant ftp patch? I'm losing track of which is
which. :)
Carl.
> ---What I've done
> Romano wrote (some days back):
<<quoted lines omitted: 19>>
> Regards,
> Brett.
--
Carl Read
[5/5] from: brett:codeconscious at: 18-Nov-2003 17:59
> > It would be great if Ashley and Carl could run this new test against
> > their servers. This one is in source code form rather than a patch.
>
> Works fine with all my three servers Brett. Good work. So, should I
> make this my perminant ftp patch? I'm losing track of which is
> which. :)
Ah good.
It incorporates all the others, but I'd like to see bits of mine welded onto
Romano's so that result becomes the patch to use. Stay tuned :-)
Regards,
Brett.
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted