> "Ken Boss" <[EMAIL PROTECTED]> writes: > > > I am attempting to automate certain updates to my web server. Data is > > processed on one machine, then needs to be PUT onto the server. My URLs > > are of the form: > > > > $url = > > 'ftp://user:[EMAIL PROTECTED]/usr/local/www/docs/somedir/somereport.html'; > > > > My problem is that LWP doesn't seem to know how to cwd up and out of > > the user home directory that I land in when the ftp session is > > initiated. I can get to directories beneath the user home dir just > > fine. I can even use relative pathing like: > > > > $url = > > 'ftp://user:[EMAIL PROTECTED]/../../usr/local/www/docs/somedir/somereport.ht ml'; > > > > > > but I'm not very happy with that. I've tried things like adding an > > extra '/' between the server name and the path, or a '\' in the same > > place, but to no avail. > > The problem is that LWP's ftp protocol module tries to implement what > RFC 1738 says: > > | For example, the URL <URL:ftp:[EMAIL PROTECTED]/%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:[EMAIL PROTECTED]/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:[EMAIL PROTECTED]//etc/motd>, would "CWD " with a null > | argument, then "CWD etc", and then "RETR motd". > > This does not appear to be what most other browsers do. They appear > to always "cd /" first. It's a pity. It makes ftp URIs less useful than > they might have been. > > Any ideas on what can be done API-wise to make LWP support both ways? > > Regards, > Gisle
Actually, I'd say the problem was my own misconceptions (guesses) as to what might constitute a valid ftp URI. Your implementation appears to be more in line with the RFC than either of the GUI browsers sitting on my Windows desktop. Netscape seems to always want to start from "/", and IE won't let me out of the user home dir even when I use "/%2F". As for ideas for supporting both ways, well, I didn't put "Newbie" in the subject line just because I like to type :) I guess I'd say it's not broken, so why fix it? Many thanks for a killer module, --Ken
