CS 268 - Assignment 2: FTP Retrieval Program


Given: September 16, 1999
Due: October 21, 1999
Language Options: C, C++, or Java
OS Options: It must run on Solaris 2.5.1

Your assignment is to take the previous assignment and add the ability to download FTP files as well as HTTP files. The URL on the command line must now be able to understand both HTTP and FTP URLs, including FTP URLs of the form: ftp://username@machinename[:portnum]/pathname. The program is to store the file body in a local file. Informative error messages should be displayed for HTTP and FTP errors. Upon successful retrieval the program must display the number of bytes downloaded. The program should work for any arbitrary file length.

Invalid URLs that do not match the HTTP or FTP description should generate some informative error message and not be processed.

RFC 959: FTP at ftp://ftp.isi.edu/in-notes/rfc959.txt

Extra Credit

Value: up to +5% onto final grade

For extra credit, make the program optionally support passive FTP transfers [2%]. And/Or add optional support for transfering whole directory structures [3%].


Todd L. Montgomery (revised 09.16.1999)