Being Served

Recall that, according to HTTP, every time a server responds to a client, the server sends along a status code describing the result of the HTTP request. See https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for all of HTTP 1.1’s status codes.

Answer the below in served.md.

Questions

In each of the scenarios below, with which status code is the server most likely to respond? Explain each of your claims in a sentence.

  1. (2 points.) The server receives a request for /cats, and the server responds with the HTML for a page with pictures of cats.

  2. (2 points.) The server receives a request for /kittens, which no longer exists, so the server redirects the user to /cats instead.

  3. (2 points.) The server receives a request for /account, which only logged-in users have permission to access. The user who requested the page is not logged in.

  4. (0 points.) The server receives a request to brew coffee.

Debrief

  1. Which resources, if any, did you find helpful in answering this problem’s questions?

  2. About how long did you spend on this problem’s questions?