TWiki> CS450fall09 Web>Homeworks>Homework1 (revision 1)EditAttach

Homework 1 - due Sept 8 at 2 pm

In this homework, we'll do the server end of http. First copy the template code in svn://bits.cs.uic.edu/cs450f09/homeworks/hw1 to hw1 in your submission directory (yourusername/hw1).

Based on sockets/server.c, create a web server application that takes a port and a directory name as arguments, and serves the contents of this directory over http. For example, after building hw1, you should be able to run

./hw1 8080 WWW

and then visit http://localhost:8080/index.html, to see the simple test page in the WWW folder of the hw1 template. Clicking on the link should take you to a second page, than contains an image. You may change the files in the WWW directory, as long as there is at least two pages connected by a link, and at least one image embedded in a page.

Note that if you use port 80, there is no need to indicate the port in the URL, and you should also be able to fetch the pages with hw0. However, port 80 requires administrative privileges on your machine, which you may not have, depending on what machine you are doing the homework on.

Turn-in

Commit your finished homework at

svn://bits.cs.uic.edu/cs450f09/students/yournamehere/hw1

where, obviously, yournamehere should be replaced by your nessie/UIC email id.

Edit | Attach | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2009-08-31 - 00:16:49 - Main.jakob
 
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF