Computer networks -- 2007-2008 -- info.uvt.ro/Laboratory 4

From Wikiversity
Jump to navigation Jump to search
Important! These pages are somehow outdated and it is recommended to consult the newer version at Computer networks -- 2008-2009 -- info.uvt.ro (by Ciprian Crăciun).

Quick links:


HTTP[edit]

For now please consult Web technologies -- Laboratory 2 -- 2007-2008 -- info.uvt.ro, especially the sections:

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;