Mac vs. Windows

Ben Rubinstein benr_mc at cogapp.com
Sun Oct 5 16:36:54 EDT 2008


Chipp Walters wrote:
> I use the @ sign all the time when accessing ftp on Windows XP and Vista.
> I'm not sure what your problem is.

I think the problem is that the '@' sign is used in a convention that allows 
the username and password to be folded into the ftp URL; ie

	ftp://username:password@machine/path

In Ton's case, the username includes an @ sign.  The code has to parse the 
string into those five parts (protocol, username, password, machine, path). 
If there are two '@' signs in the string, that's ambiguous.

Arguably the surprise isn't that it throws things off on Windows; it's more 
surprising that it works on Mac.  Certainly I think it's surprising that it's 
different on the two platforms, you'd think that this parsing would be in the 
libURL transcript code, rather than in some platform-specific engine code.

But at any rate, the solution is to urlEncode the username and password when 
constructing such a URL (which will have the effect of replacing ":" with 
"%3A", and "@" with "%40").

- Ben




More information about the use-livecode mailing list