HTML Response code: 418, why you’ve never heard of it and never will again

Browse By

HTTP status codes are an important part of how websites are used and how users are able to interact with them. A 200 status code is the most common meaning “OK” or “successful”, indicating that the page has been transmitted correctly. One of the more famous of which being 404 or “Not Found”, which is used when a server cannot find the requested page. The full list of status codes (found here) includes a multitude of interesting statuses.

The one code that it neglects to mention however is the response code 418. The 418 HTTP status code was initially introduced on the 1st April 1998 (April fools day) by Larry Masinter on RFC 2324 as a part of the, somewhat fictional, HTCPCP (Hyper Text Coffee Pot Control Protocol).

The code 418 is used to return “I’m a teapot” when the server is requested to brew coffee. The HTTP methods to interface with such a server had to clearly be updated to to allow the command “BREW” to be used instead of the traditional “POST” stating that using POST in this situation is deprecated. The command “GET” now “retrieves” a coffee from the server rather than returning information as normal. “PROPFIND” is used to return metadata about the coffee and the command “WHEN” is used to state when the HTCPCP (Hyper Text Coffee Pot Control Protocol) should stop pouring coffee, referencing the usual “Say when” of making someone else’s coffee.

The HTCPCP also defines the error messages 406 and 418 (our focus). 406 being “Not Acceptable” meaning the action couldn’t be achieved for some reason and can provide additions. Also, 418 being “I’m a teapot” and the resulting body should be “short and stout” referencing the song I’m a little teapot.

Much to the distress of the 418 fandom, on the 5th August 2017 the chairman of the IETF (Internet Engineering Task Force) Mark Nottingham requested the removal of the 418 error code from the node.js platform, later requesting the removal from GO, Python’s Request’s and ASP.NETs HttpAbstractions library. The lovers of the error code, lead by Shane Brunswick (age 15) created the website and established the “Save 418 Movement”. The many developers on reddit then took on the baton, informing the world of the importance of not losing the error code. This even went so far as google adding their own webpage which returned the 418 status code:

This incredible level of public outcry and support lead to ALL of the platforms and libraries the response code was requested to be removed from denying the suggestion. The sheer amount of support lead Mark into instead of removing the joke code as he initially wished into beginning the process to turn it into a permanent, reserved HTTP status code ensuring that it wont be used “for the foreseeable future” (messages here) (official RFC statement here)

There are sadly few still live examples of the courageous people who created raspberry pi and Arduino servers fittingly stored within teapots, however, one of particular note is a Error 418 – I’m a teapot which managed to stay live for around 9 years with few interruptions. Only recently having an issue which has since been resolved!

The technical challenges of creating such a teapot is relatively achievable provided enough time is put aside to set up the server, port forwarding (and DNS and domain name hosting). For some reason I too have decided to attempt the challenge of creating a raspberry pi teapot server with a few friends. Hopefully I might have convinced at least one other person to come along for the ride of creating their own teapot!