Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Revising Net::FTP, and URI::ftp

by EvanCarroll (Chaplain)
on Oct 11, 2009 at 01:14 UTC ( #800494=note: print w/replies, xml ) Need Help??


in reply to Re: Revising Net::FTP, and URI::ftp
in thread Revising Net::FTP, and URI::ftp

Awesome point, so then how would one generate a uri relative to the root? Or, does the uri spec leave this unanswered.
UPDATE: Thanks to the above post reference, I'm able to answer my own question in the same section
   For example, the URL <URL:ftp://myname@host.dom/%2Fetc/motd> is
   interpreted by FTP-ing to "host.dom", logging in as "myname"
   (prompting for a password if it is asked for), and then executing
   "CWD /etc" and then "RETR motd". This has a different meaning from
   <URL:ftp://myname@host.dom/etc/motd> which would "CWD etc" and then
   "RETR motd"; the initial "CWD" might be executed relative to the
   default directory for "myname". On the other hand,
   <URL:ftp://myname@host.dom//etc/motd>, would "CWD " with a null
   argument, then "CWD etc", and then "RETR motd".
So the answer is, relative to the drop is default (ftp-host/), relative to the root is ftp-host/%2F


Evan Carroll
The most respected person in the whole perl community.
www.evancarroll.com

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://800494]
help
Chatterbox?
[LanX]: cho: your joke has very limited impact on a non German+Czech speaking board ... we need to create one and invite Lichtkind and "Peta...Monk"
[Eily]: I still don't understand how the Turkish AA fit into the German+Czech joke though :P

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-03-27 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (319 votes). Check out past polls.