Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: FTP User Error

From: petr:krenzelok:trz:cz at: 18-Oct-2004 16:45

thomas wrote:
>Please let me explain the problem with these simple script: > >user: ask "Username? " >pass: ask "Password? " >ftp-host: www.example.de > >read join ftp:// [user ":" pass "@" ftp-host "/"] > >--> IF the Username is an emailadress like [name--example--de] the ftp command >use at the login only the left part of the userstring (name) as User-ID and >the right part as ftp-path. So my problem is how can I use an email string >as User-ID >
use following patch at user.r or in your script directly. The trick is to allow url parser to accept @ char. The problem is, that URL RFC does not allow usage of such char or so, but well, it is being used pretty frequently, so I hope we get someday RT to make the patch permanent .... net-utils/url-parser/user-char: union net-utils/url-parser/user-char make bitset! #"@" or you can use scheme aproach, something like: user_: ask .... pass_: ask .... read [scheme: 'ftp host: "www.example.cz" user: user_ pass: pass_] maybe it can be done some easier way, dunno right now ... -pekr-