You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Trasca Virgil <vi...@yahoo.com> on 2010/05/31 17:48:59 UTC

Re: [vfs] - Ftp URL parsing is failing when there is an @ in the userName

FTP URL is correct but is failing in VFS because it contains @ inside the user name(name@widgetdesigns.com). 

With the same URL I am able to connect from FireFox.

The user name from yahoo ftp is like name@widgetdesigns.com

http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/gftp/gftp-09.html

 Thank you,
Virgil
http://java-hobby.blogspot.com/




________________________________
From: Mark Fortner <ph...@gmail.com>
To: Commons Users List <us...@commons.apache.org>
Sent: Mon, May 31, 2010 6:35:10 PM
Subject: Re: [vfs] - Ftp URL parsing is failing when there is an @ in the  userName

I think your FTP URL is wrong.  Try: ftp://name:password@widgetdesigns.com

You'll find more examples of this in the VFS documentation:
http://commons.apache.org/vfs/filesystems.html

Mark Fortner

blog: http://feeds.feedburner.com/jroller/ideafactory


On Mon, May 31, 2010 at 7:25 AM, Trasca Virgil <vi...@yahoo.com>wrote:

> Hi,
>
>     I am trying to connect to yahoo ftp using Commons VFS.
>
> The valid URL for yahoo is like
>
> ftp://name@widgetdesigns.com:password@ftp.widgetdesigns.com
>
> However VFS fails to parse this url because the username contains @.
>
> Is there any workaround to get this working?
>
> http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/gftp/gftp-09.html
>
>  Thank you,
> Doru
>

Re: [vfs] - Ftp URL parsing is failing when there is an @ in the userName

Posted by Trasca Virgil <vi...@yahoo.com>.
Hi,

    Thanks. I will try with encoding. If yahoo is giving this user name ftp then I have to make it working even if is not in the standard. Firefox is able to connect with this strange user name.
     
Thank you,
Virgil
http://java-hobby.blogspot.com/




________________________________
From: Mark Fortner <ph...@gmail.com>
To: Commons Users List <us...@commons.apache.org>
Sent: Mon, May 31, 2010 7:21:53 PM
Subject: Re: [vfs] - Ftp URL parsing is failing when there is an @ in the  userName

Correct.  The username should not have an @ in it.  I believe this is
the standard URI scheme.  http://en.wikipedia.org/wiki/URI_scheme

Delving a little further, according to the FTP URI scheme
http://tools.ietf.org/html/rfc1738 (section 3.1) it says that "The
user name (and password), if present, are followed by a commercial
at-sign "@". Within the user and password field, any ":","@", or "/"
must be encoded."

So there are two possibilities here:

Either drop the "@whatever.com" from your username (which shouldn't be
necessary anyway since the username refers to an account on the ftp
server), or

Encode the @ sign in the username (which I believe is a %40).

Hope this helps,

Mark


On Mon, May 31, 2010 at 8:48 AM, Trasca Virgil <vi...@yahoo.com> wrote:
>
> FTP URL is correct but is failing in VFS because it contains @ inside the user name(name@widgetdesigns.com).
>
> With the same URL I am able to connect from FireFox.
>
> The user name from yahoo ftp is like name@widgetdesigns.com
>
> http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/gftp/gftp-09.html
>
>  Thank you,
> Virgil
> http://java-hobby.blogspot.com/
>
>
>
>
> ________________________________
> From: Mark Fortner <ph...@gmail.com>
> To: Commons Users List <us...@commons.apache.org>
> Sent: Mon, May 31, 2010 6:35:10 PM
> Subject: Re: [vfs] - Ftp URL parsing is failing when there is an @ in the  userName
>
> I think your FTP URL is wrong.  Try: ftp://name:password@widgetdesigns.com
>
> You'll find more examples of this in the VFS documentation:
> http://commons.apache.org/vfs/filesystems.html
>
> Mark Fortner
>
> blog: http://feeds.feedburner.com/jroller/ideafactory
>
>
> On Mon, May 31, 2010 at 7:25 AM, Trasca Virgil <vi...@yahoo.com>wrote:
>
> > Hi,
> >
> >     I am trying to connect to yahoo ftp using Commons VFS.
> >
> > The valid URL for yahoo is like
> >
> > ftp://name@widgetdesigns.com:password@ftp.widgetdesigns.com
> >
> > However VFS fails to parse this url because the username contains @.
> >
> > Is there any workaround to get this working?
> >
> > http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/gftp/gftp-09.html
> >
> >  Thank you,
> > Doru
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org

Re: [vfs] - Ftp URL parsing is failing when there is an @ in the userName

Posted by Mark Fortner <ph...@gmail.com>.
Correct.  The username should not have an @ in it.  I believe this is
the standard URI scheme.  http://en.wikipedia.org/wiki/URI_scheme

Delving a little further, according to the FTP URI scheme
http://tools.ietf.org/html/rfc1738 (section 3.1) it says that "The
user name (and password), if present, are followed by a commercial
at-sign "@". Within the user and password field, any ":","@", or "/"
must be encoded."

So there are two possibilities here:

Either drop the "@whatever.com" from your username (which shouldn't be
necessary anyway since the username refers to an account on the ftp
server), or

Encode the @ sign in the username (which I believe is a %40).

Hope this helps,

Mark


On Mon, May 31, 2010 at 8:48 AM, Trasca Virgil <vi...@yahoo.com> wrote:
>
> FTP URL is correct but is failing in VFS because it contains @ inside the user name(name@widgetdesigns.com).
>
> With the same URL I am able to connect from FireFox.
>
> The user name from yahoo ftp is like name@widgetdesigns.com
>
> http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/gftp/gftp-09.html
>
>  Thank you,
> Virgil
> http://java-hobby.blogspot.com/
>
>
>
>
> ________________________________
> From: Mark Fortner <ph...@gmail.com>
> To: Commons Users List <us...@commons.apache.org>
> Sent: Mon, May 31, 2010 6:35:10 PM
> Subject: Re: [vfs] - Ftp URL parsing is failing when there is an @ in the  userName
>
> I think your FTP URL is wrong.  Try: ftp://name:password@widgetdesigns.com
>
> You'll find more examples of this in the VFS documentation:
> http://commons.apache.org/vfs/filesystems.html
>
> Mark Fortner
>
> blog: http://feeds.feedburner.com/jroller/ideafactory
>
>
> On Mon, May 31, 2010 at 7:25 AM, Trasca Virgil <vi...@yahoo.com>wrote:
>
> > Hi,
> >
> >     I am trying to connect to yahoo ftp using Commons VFS.
> >
> > The valid URL for yahoo is like
> >
> > ftp://name@widgetdesigns.com:password@ftp.widgetdesigns.com
> >
> > However VFS fails to parse this url because the username contains @.
> >
> > Is there any workaround to get this working?
> >
> > http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/gftp/gftp-09.html
> >
> >  Thank you,
> > Doru
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org