|laziness, impatience, and hubris|
Revising Net::FTP, and URI::ftpby EvanCarroll (Chaplain)
|on Oct 09, 2009 at 20:06 UTC||Need Help??|
I just found a long running bug in some of my FTP libraries. I believe it was caused by some common confusion I had; and, I bet isn't all too unique to me. I'd like to mention it and collect some ideas on the issues. It now appears to me that the URIs are not unique in implementation for the ftp schema. Let's examine:
What do you think URI::ftp, will return for ->host, and ->path? At first, the results seem logical.
Unfortunately, though, that's not too logical because the leading forward-slash is highly ambiguous: is it referring to the origin being (a) root of the ftp-server, or (b) root of the ftp drop point? A server can drop you in a folder called /home/ecarroll, but that server might have its root set at "/".
How then do you address something from the ftp drop point if the root "/"? How do you address something from the root of the server, if the drop point is "/"?
Firefox, seems to trim out the leading "/" issuing a CWD to "foo/baz", while my client using Net::FTP issued the CWD to "/foo/baz". I suppose anyone that implements URI::ftp needs to do the same. I like the idea of making every file accessible on the server addressable with URI so the only right way, in my eyes, would be to create a URI syntax for ftp that permits me to specify whether the root for the purpose of the path is relative to the server, or the home (drop point).
The most respected person in the whole perl community.