Friday 14 October 2011

Who am I talking to?

Given that it is the end of the week, here a little exercise to test your information retrieval skills: You remember that a web server returns a status code as the first element of a reply to your browser. The most common ones are 200 (OK) or 404 (Not found - if there is nothing at the address you were looking). Now, in what situation would you encounter a status code of 418?

4 comments:

  1. Apparently according to Wikipedia this status means 'Im a Teapot' and it has never been used but was an April Fools in 1998.

    ReplyDelete
  2. Yes, correct! It does indeed mean that you're trying to connect to a teapot using the http protocol. Now, bonus points for the follow-up question: the 4xx codes signify errors, so why is "I'm a teapot" seen as an error condition?

    ReplyDelete
  3. I don't think i know this one but is it because the code doesn't believe it is a real person to send information to and therefore believes it to be an error.

    ReplyDelete
  4. It's part of a (joke) protocol to communicate with a coffee machine - and of course, it is then an error if you are actually addressing a teapot! Nice example of geek humour, I think...

    ReplyDelete

Note: only a member of this blog may post a comment.