10,000 | Can make a socket |
10,000 | Can receive a request of any form (either it acts on the request, or it just prints it to the screen) |
10,000 | Can read a file |
10,000 | Can write the file to a socket |
10,000 | Can parse a http/0.9 style request, and send the file to the client |
10,000 | Can parse a http/1.0 style request, and send the file to the client |
10,000 | Keeps the socket open if it's a http/1.1 style request |
10,000 | Works when I use netscape or IE |
10,000 | Works when I use netscape AND IE |
10,000 | Creates any reasonable log file |
10,000 | The log file is in "common logfile format". See the file /var/log/http/access_log for examples. You make fake the time field |
5,000 | The time in the logfile is actually correct |
5,000 | Works with sound and pictures |
10,000 | Any request of the form ~scott/fred.html gets translated to /home/scott/fred.html. In other words, all ~blah becomes "/home/blah". |
15,000 | You send an "error page" if they offer you a bad request or nonexistant file |
1,000 | Dies with usage message if the program needs an argument and non are provided. |
5,000 | Can strip off CGI variables and still acess the files |
20,000 | CGI work |
5,000 | Sends the correct last modified time in the metadata |
5,000 | Has an error log |
2,000 | Translates a directory to index.html |
int fd;
fd = open("/etc/passwd", O_RDONLY, 0);
if (fd == -1) {
// They sent you a bad filename
// don't perror and exit, send them the error page
}
Step 2) I would add code to my program so that it seperated the first line it reads into words, and print the second word. That should be the filename. Stop, test, and bask in the warm glow of success.
Step 3) I would add code to the program so that it sends the file named by word2 down the socket. Stop, test, and bask in the warm glow of success.
Step 4) I would start adding extra features until I got all the points
I wanted. Stop, test, and bask in the warm glow of success.