TWiki> CS450fall09 Web>Homeworks>HomeworkHints (revision 5)EditAttach

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 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!

Edit | Attach | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r5 - 2009-09-03 - 00:21:22 - Main.jakob
Copyright 2016 The Board of Trustees
of the University of
Helping Women Faculty Advance
Funded by NSF