[REBOL] Re: read ftp:// error - "Juin" -> "Jun" ?
From: gjones05:mail:orion at: 5-Jun-2001 8:30
> After looking at the "PORT .,.,.,.,.,." command in the scheme I was
> to open a second data port and use it. (And I saw that "get" is
> But after realizing, that I could send simple commands through
> port/locals/cmd-port, I try now to mate both concepts. At the moment I
> searching for a place/variable in the port scheme to store information
> regarding the ascii/binary mode for reuse.
> If you are interested, I can send my version.
I thought I was going to be able to leave it alone, but, alas, once
bitten, I find it hard to shake an idea. I worked on it several more
hours last night!
I looked more closely at the FTP scheme and have a pretty good feel for
the way that RT manages the different facets of the scheme. They've
instituted some very clever ways of reusing data and ports, or so it
appears. I hacked a lot on their version in order to understand the
flow. I enabled a custom refinement for ftp, like the http uses for
managing POST responses. Then with read/custom, the scheme knows to
use the custom hook. In several different ways, I was able to get the
command port to insert the commands, like you mentioned, with the
cmd-port, then I captured the ftp server output with the second channel
. I mainly only tried LIST and NLST and was successful.
(Side note: I used the custom refinement as a way to let the current ftp
scheme do its thing, then hijack the set-up at the point where I could
start intercepting the second port directly.)
Before I did any research, I assumed that ls, get, put, etc were all a
part of the specification. Ignorance is bliss, just like not knowing
that two ports are used in ftp. Where I need to do more research, and
maybe you already know this, is through what command are the more
refined commands passed through? Like one of the ones I need the most
is "ls -alR". Maybe you know, or maybe I can find it later today.
I think having a clean scheme is the way to go. Although RT's scheme is
remarkably versatile at a higher level of abstraction, the neat features
become cruft in a "down and dirty" interactive ftp version (or so I
discovered last night). They have some neat code for managing active
versus passive modes, and it would be nice to reuse some of that code.
Yes, I am interested in seeing what you have and see how you have done
it, either on the list or off (which ever suits you better). Of course,
I am happy to share my shameless hacks, but they are very dirty,
rudimentary so far (as I said, I was mainly using them as a way of
understanding how to do it).
I believe you are on to something really neat here for a more
interactive and configurable ftp scheme. Thanks for throwing out the