Hyper Text Coffee Pot Control Protocol

{{Short description|April Fool's joke about facetious communications protocol}}

{{Infobox protocol

| name = Hyper Text Coffee Pot Control Protocol

| image = Htcpcp teapot.jpg

| alt =

| caption = Back-end infrastructure of error418.net, which implements HTCPCP using a teapot and Raspberry Pi

| standard = Internet Engineering Task Force

| developer = Larry Masinter

| introdate = {{Start date|1998|04|01}}

| industry =

| connector =

| hardware =

| range =

| newer =

| website = [https://datatracker.ietf.org/doc/html/rfc2324 rfc2324]

}}

File:HTCPCP Pot.jpg

The Hyper Text Coffee Pot Control Protocol (HTCPCP) is a facetious communication protocol for controlling, monitoring, and diagnosing coffee pots. It is specified in {{IETF RFC|2324}}, published on 1 April 1998 as an April Fools' Day RFC,{{Citation | url = http://tools.ietf.org/html/rfc2324 | title = Network Working Group | date = April 1998 | contribution = Request for Comments 2324 | publisher = IETF | access-date = 2012-03-20 | archive-date = 2012-04-04 | archive-url = https://web.archive.org/web/20120404141825/http://tools.ietf.org/html/rfc2324 | url-status = live | last1 = Masinter | first1 = Larry M. }} as part of an April Fools prank.{{Cite book |last=DeNardis |first=Laura |url={{google books|plainurl=yes|id=Secqz0XQJIsC|pg=PA27}} |title=Protocol Politics: The Globalization of Internet Governance |date=30 September 2009 |publisher=MIT Press |isbn=978-0-262-04257-4 |pages=27ff |access-date=8 May 2012}} An extension, HTCPCP-TEA, was published as [https://tools.ietf.org/html/rfc7168 RFC 7168] on 1 April 2014{{Citation | url = https://tools.ietf.org/html/rfc7168 | title = The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA) | date = April 2014 | contribution = Request for Comments 7168 | publisher = IETF | access-date = 2014-04-22 | archive-date = 2014-05-29 | archive-url = https://web.archive.org/web/20140529225719/http://tools.ietf.org/html/rfc7168 | url-status = live | last1 = Nazar | first1 = Imran }} to support brewing teas, also as an April Fools' Day RFC in error 418.

Protocol

[https://tools.ietf.org/html/rfc2324 RFC 2324] was written by Larry Masinter, who describes it as a satire, saying "This has a serious purpose – it identifies many of the ways in which HTTP has been extended inappropriately."{{Cite web |last=Masinter |first=Larry |author-link=Larry Masinter |title=IETF RFCs |url=http://larry.masinter.net |url-status=dead |archive-url=https://web.archive.org/web/20130327202242/http://larry.masinter.net/ |archive-date=2013-03-27}} The wording of the protocol made it clear that it was not entirely serious; for example, it notes that "there is a strong, dark, rich requirement for a protocol designed espressoly for the brewing of coffee".

Despite the joking nature of its origins, or perhaps because of it, the protocol has remained as a minor presence online. The editor Emacs includes a fully functional client-side implementation of it,{{Citation | title = Emarsden | url = http://emarsden.chez.com/downloads/ | publisher = Chez | contribution = Emacs extension: coffee.el | access-date = 2009-02-10 | archive-date = 2009-02-01 | archive-url = https://web.archive.org/web/20090201001552/http://emarsden.chez.com/downloads/ | url-status = live }}. and a number of bug reports exist complaining about Mozilla's lack of support for the protocol.{{Citation|title=Bug 46647 – (coffeehandler) HTCPCP not supported (RFC2324)|url=https://bugzilla.mozilla.org/show_bug.cgi?id=46647|work=Bugzilla|publisher=Mozilla|access-date=2005-12-21|archive-date=2011-05-14|archive-url=https://web.archive.org/web/20110514065147/https://bugzilla.mozilla.org/show_bug.cgi?id=46647|url-status=live}} Ten years after the publication of HTCPCP, the Web-Controlled Coffee Consortium (WC3) published a first draft of "HTCPCP Vocabulary in RDF"{{Citation |title=HTCPCP Vocabulary in RDF – WC3 RFC Draft |date=1 April 2008 |url=https://cstrobbe.gitlab.io/WC3/TR/2008/RFC-htcpcp-in-rdf-20080401/ |publisher=Chief Arabica (Web-Controlled Coffee Consortium) |access-date=17 March 2023 |via=github |archive-date=15 May 2021 |archive-url=https://web.archive.org/web/20210515041835/https://cstrobbe.github.io/WC3/TR/2008/RFC-htcpcp-in-rdf-20080401/ |url-status=live }} in parody of the World Wide Web Consortium (W3C)'s "HTTP Vocabulary in RDF".{{Citation | editor-first = Johannes | editor-last = Koch | others = et al | url = http://www.w3.org/TR/HTTP-in-RDF/ | title = HTTP Vocabulary in RDF | publisher = W3 | access-date = 17 August 2009 | archive-date = 15 October 2009 | archive-url = https://web.archive.org/web/20091015080216/http://www.w3.org/TR/HTTP-in-RDF/ | url-status = live }}

On April 1, 2014, [https://tools.ietf.org/html/rfc7168 RFC 7168] extended HTCPCP to fully handle teapots.

Commands and replies

HTCPCP is an extension of HTTP. HTCPCP requests are identified with the Uniform Resource Identifier (URI) scheme coffee (or the corresponding word in any other of the 29 listed languages) and contain several additions to the HTTP methods:

class="wikitable"

! Method !! Definition

valign=top|BREW or POSTCauses the HTCPCP server to brew coffee. Using POST for this purpose is deprecated. A new HTTP request header field, "Accept-Additions", is proposed, supporting optional additions including Cream, Whole-milk, Vanilla, Raspberry, Whisky, Aquavit, etc.
valign=top

|GET

"Retrieves" coffee from the HTCPCP server.
valign=top

|PROPFIND

Returns metadata about the coffee.
valign=top

|WHEN

Says "when", causing the HTCPCP server to stop pouring milk into the coffee (if applicable).

It also defines four error responses:

class="wikitable"

! Status code !! Definition

valign=top|{{nowrap|406 Not Acceptable}}The HTCPCP server is unable to provide the requested addition for some reason; the response should indicate a list of available additions. The RFC observes, "In practice, most automated coffee pots cannot currently provide additions."
valign=top|{{nowrap|418 I'm a teapot}}The HTCPCP server is a teapot; the resulting entity body "may be short and stout" (a reference to the song "I'm a Little Teapot"). Demonstrations of this behaviour exist.{{Citation |last=Reddington |first=Joseph |title=Illustrated implementation of Error 418 |url=http://joereddington.com/projects/418-error-code-teapot/ |archive-url=https://web.archive.org/web/20150906071854/http://joereddington.com/projects/418-error-code-teapot/ |access-date=2014-10-18 |archive-date=2015-09-06 |url-status=dead}}{{Cite web |url=http://www.qdh.org.uk/wordpress/?p=546 |title=A Goblin Teasmade teamaker with an implementation of Error 418 |access-date=2014-07-26 |archive-url=https://web.archive.org/web/20141206053112/http://www.qdh.org.uk/wordpress/?p=546 |archive-date=2014-12-06 |url-status=dead }}
valign=top|{{nowrap|503 Service Unavailable}}According to Mozilla Developer Documentation, "A combined coffee/tea pot that is temporarily out of coffee should instead return 503", when requested to brew.{{Cite web |date=2023-04-10 |title=418 I'm a teapot - HTTP {{!}} MDN |url=https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418 |access-date=2023-09-21 |website=developer.mozilla.org |language=en-US}}

Save 418 movement

On 5 August 2017, Mark Nottingham, chairman of the IETF HTTPBIS Working Group, called for the removal of status code 418 "I'm a teapot" from the Node.js platform, a code implemented in reference to the original 418 "I'm a teapot" established in Hyper Text Coffee Pot Control Protocol.{{Cite web |last=Nottingham |first=Mark |title=418 I'm A Teapot #14644 |url=https://github.com/nodejs/node/issues/14644#issue-248218948 |via=github |access-date=2017-08-12 |archive-date=2017-08-10 |archive-url=https://web.archive.org/web/20170810220743/https://github.com/nodejs/node/issues/14644#issue-248218948 |url-status=live }} On 6 August 2017, Nottingham requested that references to 418 "I'm a teapot" be removed from the programming language Go{{Cite web |last=Nottingham |first=Mark |title=net/http: remove support for status code 418 I'm a Teapot |url=https://github.com/golang/go/issues/21326#issue-248234750 |via=github |access-date=2017-08-12 |archive-date=2017-08-10 |archive-url=https://web.archive.org/web/20170810220643/https://github.com/golang/go/issues/21326#issue-248234750 |url-status=live }} and subsequently from Python's Requests{{Cite web |last=Nottingham |first=Mark |title=418 418 I'm a Teapot #4238 |url=https://github.com/requests/requests/issues/4238#issue-249497185 |via=github |access-date=2017-08-12 |archive-date=2021-05-15 |archive-url=https://web.archive.org/web/20210515041837/https://github.com/psf/requests/issues/4238#issue-249497185 |url-status=live }} and ASP.NET's HttpAbstractions library{{Cite web |last=Nottingham |first=Mark |title=418 I'm a Teapot #915 |url=https://github.com/aspnet/HttpAbstractions/issues/915 |via=github |access-date=2017-08-12 |archive-date=2019-05-10 |archive-url=https://web.archive.org/web/20190510155446/https://github.com/aspnet/HttpAbstractions/issues/915 |url-status=live }} as well.

In response, 15-year-old developer Shane Brunswick created a website, save418.com,{{Cite web |last=Brunswick |first=Shane |title=We are the teapots |url=http://save418.com |website=The Save 418 Movement |date=2017-09-10 |access-date=2021-05-15 |archive-date=2021-05-15 |archive-url=https://web.archive.org/web/20210515041851/https://save418.com/ |url-status=live }} and established the "Save 418 Movement", asserting that references to 418 "I'm a teapot" in different projects serve as "a reminder that the underlying processes of computers are still made by humans". Brunswick's site went viral in the hours following its publishing, garnering thousands of upvotes on the social platform Reddit,{{Cite web |title=HTTP Error Code 418 I'm a Teapot is about to be removed from Node. We've gotta do something. [x-post /r/webdev] |url=https://www.reddit.com/r/programming/comments/6sxea0/http_error_code_418_im_a_teapot_is_about_to_be/ |via=reddit |access-date=2017-08-12 |archive-date=2017-08-11 |archive-url=https://web.archive.org/web/20170811223038/https://www.reddit.com/r/programming/comments/6sxea0/http_error_code_418_im_a_teapot_is_about_to_be/ |url-status=live }} and causing the mass adoption of the "#save418" Twitter hashtag he introduced on his site. Heeding the public outcry, Node.js, Go, Python's Requests, and ASP.NET's HttpAbstractions library decided against removing 418 "I'm a teapot" from their respective projects. The unanimous support from the aforementioned projects and the general public prompted Nottingham to begin the process of having 418 marked as a reserved HTTP status code,{{Cite web |last=Nottingham |first=Mark |title=Reserving 418 |url=https://lists.w3.org/Archives/Public/ietf-http-wg/2017JulSep/0332.html |via=github |access-date=2017-08-12 |archive-date=2017-08-13 |archive-url=https://web.archive.org/web/20170813012814/https://lists.w3.org/Archives/Public/ietf-http-wg/2017JulSep/0332.html |url-status=live }} ensuring that 418 will not be replaced by an official status code for the foreseeable future.

On 5 October 2020, Python 3.9 released with an updated HTTP library including 418 IM_A_TEAPOT status code.{{Cite web|date=2020-10-05|title=What's New In Python 3.9 — Python 3.9.0 documentation|url=https://docs.python.org/3/whatsnew/3.9.html#http|access-date=2020-10-08|website=Python Documentation|archive-date=2020-10-07|archive-url=https://web.archive.org/web/20201007172936/https://docs.python.org/3/whatsnew/3.9.html#http|url-status=live}} In the corresponding pull request, the Save 418 movement was directly cited in support of adoption.{{Cite web|title=Issue 39507: http library missing HTTP status code 418 "I'm a teapot" – Python tracker|url=https://bugs.python.org/issue39507#msg361134|access-date=2020-10-08|website=bugs.python.org|archive-date=2020-10-14|archive-url=https://web.archive.org/web/20201014070511/https://bugs.python.org/issue39507#msg361134|url-status=live}}

Usage

The status code 418 is sometimes returned by servers when blocking a request, instead of the more appropriate 403 Forbidden,{{cite web|url=https://help.dreamhost.com/hc/en-us/articles/215947927-Enable-extra-web-security-on-a-website|title=Enable extra web security on a website|access-date=2022-12-18|website=DreamHost|language=en}} or 404 Not Found.{{cite web|url=https://news.ycombinator.com/item?id=41967897#41971887|title=I use 418 as a reply to illegitimate bots […]|via=Hacker News|date=2024-10-28}}

Around the time of the 2022 Russian invasion of Ukraine, the Russian military website mil.ru returned the HTTP 418 status code when accessed from outside of Russia as a DDoS attack protection measure.{{Cite web |date=2022-02-25 |title=Russia appears to deploy digital defenses after DDoS attacks |url=https://therecord.media/russia-appears-to-deploy-digital-defenses-after-ddos-attacks/ |access-date=2022-02-26 |website=The Record by Recorded Future |language=en}}{{Cite web |title=I Went to a Russian Website and All I Got Was This Lousy Teapot |url=https://www.pcmag.com/news/i-went-to-a-russian-website-and-all-i-got-was-this-lousy-teapot |access-date=2022-02-28 |website=PCMag |language=en}} The change was first noticed in December of 2021.{{cite web | url=https://news.ycombinator.com/item?id=29594249 | title=Russian MoD website blocked for non-Russian IPs | Hacker News }}

See also

References

{{Reflist|colwidth=30em}}