Special characters in ftp
[1/3] from: swhite::ci::bloomington::mn::us at: 25-Aug-2006 9:33
I want to ftp something between two computers on our internal network. Normally this
would be a one-liner and easy, and I have done it before.
Now, the user ID that I must use (so says the network administrator) contains the "-"
character, or, alternatively, I can use one that contains the "/" character. In either
case, the ftp does not work. Of course I would expect it not to, because of the special
characters.
The question is, I thought I read somewhere, in the distant past, that it was possible
to use special characters in the ftp url with some sort of escape character, or something.
Does anyone know if this is possible?
Thank you.
Steven White
City of Bloomington
1800 W Old Shakopee Rd
Bloomington MN 55431-3096
USA
952-563-4882 (voice)
952-563-4672 (fax)
steven.white-ci.bloomington.mn.us
[2/3] from: greggirwin:mindspring at: 25-Aug-2006 9:19
Hi Steven,
SW> I want to ftp something between two computers on our internal network. SW> Normally
this would be a one-liner and easy, and I have done it before.
SW> Now, the user ID that I must use (so says the network administrator) SW> contains
the "-" character, or, alternatively, I can use one that contains SW> the "/" character.
In either case, the ftp does not work. Of course I SW> would expect it not to, because
of the special characters.
This comes up from time to time. There are two answers:
1) Use a scheme block
read [
scheme: 'ftp
host: domain.com
user: user-domain.com
pass: "password"
]
2) Use a patch to the net-utils/url-parser (Thanks Pekr!)
net-utils/url-parser/user-char: union net-utils/url-parser/user-char make bitset! #"-"
net-utils/url-parser/path-char: union net-utils/url-parser/path-char make bitset! #"#"
HTH!
-- Gregg
[3/3] from: swhite:ci:bloomington:mn:us at: 25-Aug-2006 11:58
Thank you. Things seem to be working. I used the scheme.
At one point in the past, I actually did read the REBOL CORE manual, but I didn't understand
this "schemes" business, and still am not too handy with the networking, so I didn't
understand the significance of what I was reading, and so forgot about it.
Unfortunately, I just re-read that part of the documentation, and I still don't understand
it. I am beginning to think it is just me. I soldier on.
Elapsed time from question to solution: 46 minutes. How long would I have waited on
hold at a major vendor's help line, if there even was such a thing.
>>> Gregg Irwin <greggirwin-mindspring.com> 8/25/2006 10:19 AM >>>
Hi Steven,
SW> I want to ftp something between two computers on our internal network. SW> Normally
this would be a one-liner and easy, and I have done it before.
SW> Now, the user ID that I must use (so says the network administrator) SW> contains
the "-" character, or, alternatively, I can use one that contains SW> the "/" character.
In either case, the ftp does not work. Of course I SW> would expect it not to, because
of the special characters.
This comes up from time to time. There are two answers:
1) Use a scheme block
read [
scheme: 'ftp
host: domain.com
user: user-domain.com
pass: "password"
]
2) Use a patch to the net-utils/url-parser (Thanks Pekr!)
net-utils/url-parser/user-char: union net-utils/url-parser/user-char make bitset! #"-"
net-utils/url-parser/path-char: union net-utils/url-parser/path-char make bitset! #"#"
HTH!
-- Gregg