If you try to grab a ftp file and the server does not support the SIZE command, fetch(1) gets confused and exits. The "old" version of fetch could cope with this. Also, fetch(1) cannot retreive a ftp directory listing; attempts to do so result in a ftp protocol error. Fix: The appended context diff to lib/libfetch/ftp.c makes these changes: - Ignore a syntax/protocol error when fetching a file - Detecting that the filename is empty and do a LIST instead of a RETR I submitted a similar patch for the 3.0-RELEASE version of fetch: http://www.FreeBSD.org/cgi/query-pr.cgi?pr=9250 Since the current version of fetch looks like a rewrite, you can probbaly close the old report. =================================================================== RCS file: RCS/ftp.c,v retrieving revision 1.1 How-To-Repeat: fun 436 % fetch -v ftp://ftp.rs.internic.net/domain/named.root looking up ftp.rs.internic.net connecting to ftp.rs.internic.net:21 fetch: named.root: Syntax error, command unrecognized [Too bad fetch can't show us the protocol dialogue; that would be sweet!] fun 433 % ftp ftp.rs.internic.net Connected to ftp.rs.internic.net. 220 rs FTP server (InterNIC Public FTP Server - Login with username anonymous) ready. Name (ftp.rs.internic.net:leres): ftp 331 Guest login ok, send ident as password. Password: 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd /domain 250 CWD command successful. ftp> quote SIZE named.root 500 'SIZE named.root': command not understood. ftp> [Here's how the fetch that came with 3.2-RELEASE works; note the useful debugging info...] ee 66 % uname -r 3.2-RELEASE ee 67 % fetch ftp://ftp.rs.internic.net/domain/named.root fetch: domain/named.root: cannot get remote modification time Receiving named.root: 2 Kbytes 2769 bytes transfered in 0.8 seconds (3.52 Kbytes/s) ee 68 % ,ch,ch -v fetch -v ftp://ftp.rs.internic.net/domain/named.root Sending: USER anonymous rs FTP server (InterNIC Public FTP Server - Login with username anonymous) ready. Guest login ok, send ident as password. Sending: PASS leres@ee.lbl.gov Guest login ok, access restrictions apply. Sending: TYPE I Type set to I. Sending: CWD domain CWD command successful. Sending SIZE named.root 'SIZE named.root': command not understood. Sending MDTM named.root 'MDTM named.root': command not understood. fetch: domain/named.root: cannot get remote modification time Sending: PORT 131,243,1,10,192,18 PORT command successful. Sending: RETR named.root Binary data connection for named.root (131.243.1.10,49170) (2769 bytes). Receiving named.rootSending: QUIT Binary Transfer complete. Goodbye. Receiving named.root: 2 Kbytes 2769 bytes transfered in 3.8 seconds (722 bytes/s) [Here's an unsuccessful attempt to get a directory listing] fun 450 % fetch -v ftp://ftp.ee.lbl.gov/ looking up ftp.ee.lbl.gov connecting to ftp.ee.lbl.gov:21 fetch: fetch.out: Syntax error in parameters or arguments
Responsible Changed From-To: freebsd-bugs->des This is definitely fixed in the development branch of FreeBSD. The maintainer will have a better idea of whether it's fixed in 4.1-STABLE.
State Changed From-To: open->closed SIZE issue fixed. LIST issue partially fixed in different manner.