Ticket #1605: Incorrect parsing FTP-string

ENTRY "example.net" URL "/#ftp:examplenet:5wDJP1B/y@example.net"

When I try connect to it I saw:
"ftpfs: making connection to examplenet"
off course this is failed by timeout.

Fix issue:
Now search for '@' sign.
If present - search for slash at found position
If not present - search at start of string.

Also fixed parce '@' sign into password area of URI.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2009-12-01 16:17:32 +02:00
parent 3c49c19ac0
commit cf8ae36637

View File

@ -279,7 +279,7 @@ struct vfs_class *
vfs_split (char *path, char **inpath, char **op)
{
char *semi;
char *slash;
char *slash, *at_chr;
struct vfs_class *ret;
if (!path)
@ -289,7 +289,12 @@ vfs_split (char *path, char **inpath, char **op)
if (!semi || !path_magic(path))
return NULL;
slash = strchr (semi, PATH_SEP);
at_chr = strrchr (semi, '@');
if (at_chr)
slash = strchr (at_chr, PATH_SEP);
else
slash = strchr (semi, PATH_SEP);
*semi = 0;
if (op)