Homework Hints

This page is for you guys to edit, to provide any homework hints that you think may be helpful. As a reminder, everyone is encouraged to discuss the homeworks, but actually writing the code together, or sharing code between each other, is not allowed. So, you may want to mention particular useful functions, good commands, or handy links, but please do not post code, other than a line or two.

Homework 7

Combine sort-u and uniq -c together. They will give you the simplest way to deal with your statistics

Homework 3

A very easy place to start for homework 3 is the client state struct. A couple of extra fields is really all that's required to get the ball rolling. Maybe this is a bit too obvious to count as a hint, but I figured I would offer it up for those feeling stuck in a rut.

Homework 1

In an early version, I would get 'connection closed' errors from the browser, and some pictures would only load half-way. This problem disappeared once I made sure I'd received the entire request (including the empty line) before sending my response.

Homework 0

A newline in html, as professor pointed out is "\r\n" and an empty line is two newlines.

A picture, like the gif image, is binay data. C has no byte datatype but i think unsigned char works just fine. (It did for me) Well, and dont use string write functions like fprintf(). You haveta write binary data....

memcpy() and memset() were good friends to me, did me a lot of favours out there, moving around 'FRAGILE: Handle with care' kind of data around.

A target name after the host name (like /dir1/dir2/dir3/...../manymanydirs/file.type) has a recursive structure. While loop anybody?

3XX are all redirections to other pages and 4XX mean that someone's pulling your leg with a false URL.

Even though you do mention HTTP/1.0 in the GET request, you sometimes get HTTP/1.1 in the header. Could anybody tell me why is this so? Am beat :-/

Remember to dot your i's, cross your t's and close your files and sockets smile

For svn commands, the one's Proffesor gave work just fine. Remember svn update, so you can turn in new versions of your homework.

Use the skeleton, free Makefile!

Topic revision: r7 - 2009-10-18 - 17:38:24 - Main.wqin2
 
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF