Computer networks -- 2007-2008 -- info.uvt.ro/Laboratory 4
Appearance
Quick links:
- front;
- courses 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13;
- laboratories agenda, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, evaluation, tools, repository.
HTTP
[edit]For now please consult Web technologies -- Laboratory 2 -- 2007-2008 -- info.uvt.ro, especially the sections:
- Web technologies -- Laboratory 2 -- 2007-2008 -- info.uvt.ro#URI -- Uniform Resource Identifier;
- Web technologies -- Laboratory 2 -- 2007-2008 -- info.uvt.ro#HTTP:
Assignment
[edit]This is the third assignment, so please commit it to the folder assignment-03.
Implement a simple HTTP client that:
- takes one argument from the command line -- the URL of the resource;
- implements the HTTP/1.0 protocol, and requests the pointed resource;
- writes the content of the resource to the standard output;
- for any protocol or communication (socket) errors a clear message should be printed to standard error;
- it should interpret the status codes sent by the HTTP server and for any other status than 200 a clear message should be printed (again at standard error);
For bonus points you could implement either:
- a simple non-caching (also called transparent) HTTP proxy server -- that acts both as a HTTP server and client;
- a POP3 command line client;
- an IMAP command line client;