Bug 9147

Summary: wget does not set ftp path correctly
Product: [Retired] Red Hat Linux Reporter: mal
Component: wgetAssignee: Bill Nottingham <notting>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-07 15:43:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mal 2000-02-05 18:15:59 UTC
There is a bug with wget-1.5.3-4
If ftp server sets initial direcory to anything else than /
Example:

$ wget --passive-ftp
ftp://rawhide.redhat.com/pub/rawhide/SRPMS/SRPMS/samba-2.0.6-6.src.rpm
--13:08:41--
ftp://rawhide.redhat.com:21/pub/rawhide/SRPMS/SRPMS/samba-2.0.6-6.src.rpm
           => `samba-2.0.6-6.src.rpm'
Connecting to rawhide.redhat.com:21... connected!
Logging in as anonymous ... Logged in!
==> TYPE I ... done.  ==> CWD pub/rawhide/SRPMS/SRPMS ...
No such directory `pub/rawhide/SRPMS/SRPMS'.
$

The directory exists, but wget misses starting / in pub/rawhide/SRPMS/SRPMS

Vladislav

Comment 1 Nalin Dahyabhai 2000-02-07 11:46:59 UTC
Try specifying the URL as:
ftp://rawhide.redhat.com:21//pub/rawhide/SRPMS/SRPMS/samba-2.0.6-6.src.rpm

Wget's behavior in this case is consistent with my reading of section 3.2.2
of RFC 1738, which states that the '/' separating the hostname from the
directory is not to be taken as part of the path, and that each part of the
path needs to be supplied as the argument of a "cwd" command given to the server
after the client is connected.  I'd agree it's somewhat annoying, though.