Fourth Homework Assignment
Posted 17 Feb 2004 by herman

Write your own web server!

Yes, this assignment, due at 11:59pm on the 25th of February, is to write a threading web server. This is a challenging and rewarding assignment. A number of python examples will help you to write the program.

  1. illustrates the simplest approach to programming a TCP server using threads. Or you can use techniques from the more complete example in
  2. shows how to read a file into a string, so that your web server can have a number of documents available.
  3. is an elementary HTTP client; you can experiment with this program to learn how real web servers return HTML documents (we'll do this in class).
  4. is a partial web server, which you can use to learn the HTTP that browsers send to servers.
  5. The HTTP 1.0 specification explains (perhaps in too much detail) the HTTP protocol, though you have to look elsewhere to understand the "keep-alive" part of HTTP 1.0.
It's my hope that the techniques illustrated in the examples above, plus a few experiments, will be enough for you to write a threaded web server. Details of the assignment are in homework4.pdf.

To repeat, this is a challenging and rewarding assignment. It is important that you start early so that you can ask questions, get clarifications, and build confidence. Experimenting with smaller versions of your program (with lots of print statements) will help. Please feel free to ask questions about this assignment.

Home PageHelp PageView ArticlesView Public DocumentsLogin, do stuff (record diaries)List Group MembersList of Projects