share
Stack Overflow"I am a Teapot" HTTP 418 Status Code
[+121] [7] Priyank
[2009-12-30 11:34:55]
[ http http-status-codes ]
[ http://stackoverflow.com/questions/1979722] [DELETED]

There seems to be an HTTP Status code 418: "I am a teapot". What does it do? Is it supported by all the browsers?

(14) is there a specific reason that question is being voted to be closed? Is it a duplicate or it seems like a junk? I was honestly curious as I found that status code somewhere. :-/ - Priyank
(9) Status code was created as a joke, but that doesn't make curiosity any less trivial. or does it? - Priyank
(2) Curious if anybody implemented it...sounds like a thing some geek would do, like the RFC 1149 blug.linux.no/rfc1149/index.html - epatel
(5) I've implemented a variant of it as part of an assignment which ended up proving that over half the class didn't understand a damn thing. We had to treat it as a serious working base and develop it into something with a server implementation which would effectively do everything but actually brew the coffee, including tracking pot status and available additions. I seem to recall we ended up dropping a fair few things from the protocol and concentrating on a core set. But yes, it is an otherwise ridiculous thing to do. :) - Rob
(3) HTCPCP, not HTTP - Andrew Dashin
(1) It could have been status code 420, without the tea. - ssg
[+82] [2009-12-30 11:37:36] Daniel Vassallo [ACCEPTED]

This is a status code for a protocol that was introduced as an April Fools' joke in 1998.

On almost every April Fools' Day since 1989, the Internet Engineering Task Force [3] has published one or more humorous RFC documents. You can find the whole list of these funny RFC documents on:

If you think that you can contribute to an April Fools' RFC document, the IETF is encouraging you to do so:

It kindly asks that entries are sent at least 2 weeks prior to April 1st so that the RFC Editor team would have enough time to review all the documents and to prepare those that will be published.


As for the coffee pot protocol, it is officially called the "Hyper Text Coffee Pot Control Protocol". Although the RFC describing it is not to be taken seriously, the protocol is specified accurately enough for it to be considered a non-fictional protocol. It is an extension of HTTP, which comes some additional verbs like BREW and WHEN, and with two error messages, one of which is 418: I am a teapot (...not a coffee pot!).

If this inspired you to start working on a physical implementation, you may want to start by understanding the basics from this Wikipedia article:

[1] http://tools.ietf.org/html/rfc2324
[2] http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
[3] http://en.wikipedia.org/wiki/Internet_Engineering_Task_Force
[4] http://en.wikipedia.org/wiki/April_Fools%27_Day_RFC
[5] http://www.rfc-editor.org/rfcfaq.html#april
[6] http://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol

(3) Mandatory plug for the excellent book: "The Complete April Fools' Day RFCs". - Richard
(1) Protocol for a dedicated Coffebot? :-) - blntechie
1
[+34] [2009-12-30 13:07:59] community_owned

It's a status code for people to ask a question about it in SO and get reputation for it :)


(43) It looks like it is working for you as well :) - Daniel Vassallo
(4) ..and for you.. - Schildmeijer
(4) but for you doesn't :-) - Martin
2
[+18] [2009-12-30 11:36:26] Yacoby

It was an April fools joke and is not intended to be implemented (So don't rely on anything supporting it, however Emacs and Firefox (with patches) do). Take a look at wikipedia [1] for more info.

[1] http://en.wikipedia.org/wiki/Hyper%5FText%5FCoffee%5FPot%5FControl%5FProtocol

(6) I am not surprised by the emacsy support. :) - Paul Nathan
3
[+9] [2009-12-30 11:37:51] Holli

The HTCPCP server is a teapot. The responding entity MAY be short and stout. This code was defined as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers.

From Wikipedia.


4
[+5] [2009-12-30 11:37:56] Asaf R

From Wikipedia [1]

418 I'm a teapot The HTCPCP server is a teapot. The responding entity MAY be short and stout. This code was defined as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers.

[1] http://en.wikipedia.org/wiki/List%5Fof%5FHTTP%5Fstatus%5Fcodes

5
[+4] [2009-12-30 11:38:30] steve

According to the RFC ( http://tools.ietf.org/html/rfc2324 ) This is part of a protocol called Hyper Text Coffee Pot Control Protocol. It's to support the automation of coffee machines via the internets.

From what I've seen lighthttp does not support it.

Also while this is a joke, it's actually very useful. As the 'internet of things' kicks off you will find the more lightweight it is to communicate with a low powered device the better.

Check out tiny motes, sun spots, wireless sensor networks, internet of things, real time web


6
[0] [2011-11-15 23:30:18] philoye

Here is an implementation [1] as a Rack Middleware for you Ruby folks wanting to respond to this very important protocol. Must be solid, since it was last updated in 2009. :-)

[1] https://github.com/toolmantim/teapot

7