Assignment 1: Comments

The grades for Assignment 1 has been posted in your IVLE gradebook. Please take a look at the comments, and report back to us if there is anything surprising.

Some of the common mistakes are:

  • Returning incorrect HTTP response headers. Some of you return 200 OK, even if the request is incorrect (e.g., requesting for a non-existing file). Some of you return two HTTP status codes, or no HTTP status code, or two lines of content-type. Some of you return content-length with incorrect number of bytes. Despite being the easiest part of the assignment to get right (just following the format!), your submission is surprisingly buggy in this aspect.
  • Strong assumption about HTTP request headers. The HTTP request header format does not dictate the order of the fields, except that the first line must be the request line (with method, resource, and version). You cannot assume content-type and content-length appears in a certain order, nor can you assume that the last line in the header is of certain fields.
  • For a POST request, you should not assume that the body contains “——WebKitFormBoundary”. In fact, you need not know about the format of the POST body at all, as indicated in the assignment description.
  • Some of you did not follow the instructions, which require that you take in the port number as a command line argument. Those who hardcoded the port number loose one point needlessly for not following instructions.

Leave a Reply