Project 1 - Checkpoint 2

For the checkpoint 2, you will be implementing really simple HTTP server, which can only support static contents.

The following list should give you general idea of where you should start.

  1. Start from the echo server you made for CP1
  2. Read RFC carefully (annotated version included in resource handout, but encouraged to read the full version on the internet). We know they are sometimes poorly written, but you will encounter so many more of them as you progress. Note that they only specify protocol, not implementation details. You should come up with your own design and architecture for the problem.
  3. Start from the logging module. It is always great to have some simple facilities to log what kinds of things are happening on your server.
  4. Write HTTP/1.1 parser, and subsequent layers supporting http methods (GET/POST/HEAD)

Note that the server from the CP1 can work as to provide blackbox for the underlying select() based server implementation. CP2 concentrates more on the application logic of the server, while CP1 was more about system side setup.

When handing in, please include detailed documentation of your implementation when handing in. This helps us very much to make sense out of your code, and will not deduct unnecessarily. Also, please write clean code. STYLE MATTERS!!

handin procedure for CP2 is same as CP1. But please add some tag on the directory name to indicate it is CP2. (Preferrably, add _cp2 to the directory name)

Last edited at 10:56 PM, Sept. 20. 2012