[ee122] bucket of questions

benjlau at berkeley.edu benjlau at berkeley.edu
Sun Oct 28 16:43:44 PDT 2007

let's say we're the client and the server sends us a bad response and we
decide to print an error message indicating that the response failed to
parse.  We just use Network Error I think?  Or is that only for atomic
network operations like socket() and connect()?  Does the answer also
apply to bogus status line and body (eg if chunked and rather than being
hex, we find alpha chars on the line for size).

Let's say you are blocked from writing to a file on the client side after
downloading from the server (maybe someone else is writing to it).  This
does not seem like a network error.  Can we just make up a new error for
cases which aren't network errors, so long as we're clear about it when
printing to stdout?

The project write up says that The HTTP response message and any
associated headers should be printed to standard output without any
additional processing.  Is this to be taken literally?  Just start
printing straight away?  Because the write up also says that If the
request does not succeed, your client should print the status code and
associated text, such as:
403 Forbidden: /secret/diary.html

But wouldn't this be redundant then, since we already printed out the HTTP
response message?  Also, when we print out the 403, should it be prefixed
by Network Error-- or does it not count as an error but as a valid message
that indicates a permissions denied on server side?

For the server during Phase 1, we printed the components of the request,
specifically the status line.  Are we only printing the headers now?  It
doesn't seem to say to print the status line anymore.

Back to the client, let us say that the server response has this:
Connection: aserawt8a

Is this an error or should we default to closing the connection?

In general, if we experience any kind of bad response parse, should we
just automatically close the connection even though we originally
stipulated a persistent connection, or should we keep it open?

What content type does a directory have?  I am thinking that we treat the
ls contents as just text/txt.


More information about the ee122 mailing list