People, please! If encountering a 418, consider adhering to ISO 3103:
<a href="https://en.wikipedia.org/wiki/ISO_3103" rel="nofollow">https://en.wikipedia.org/wiki/ISO_3103</a>
I had an issue a little while ago where I was trying to get iOS's Shortcuts app to post to WordPress. I noticed that doing this seemed to crash every one of my websites within seconds. It was like flicking a switch: I’d run the Shortcuts workflow and seconds later, all of my sites appeared to be offline. This lasted for precisely one hour, after which everything came back online.<p>Didn't take long to figure out that the sites had actually been online the whole time for everyone else; they were only inaccessible from my local network. At that point, I contacted my host, and they explained that the WordPress component of the Shortcuts app was, for some reason, bombarding the server with a whole lot of requests for files that didn’t exist. The server thought it was under attack and blocked my whole network. Then it got interesting: the guy said that the server was throwing 418s.<p>I thought he might be mistaken at first. I actually recognized 418, since I've known about the teapot thing for a little while. I asked the guy if it was really the case that the server was blocking my network because it thought my phone was making too many demands for coffee it wasn't capable of producing, and he said that, well, other than the coffee bit, DreamHost really does use 418 for that situation: <a href="https://help.dreamhost.com/hc/en-us/articles/215947927-How-do-I-enable-Extra-Web-Security-for-my-website-" rel="nofollow">https://help.dreamhost.com/hc/en-us/articles/215947927-How-d...</a><p>That is the only time I've encountered 418 in the wild. That decision seems to be pretty consistent with DreamHost's sense of humor.<p>(They did, as usual, manage to fix my problem.)
I added
panic("I'm a teapot!");
to the FreeBSD kernel, many many years ago (sys/kern/kern_thread.c). It was for an impossible, cannot-happen scenario.<p>Much to my astonishment/amusement, it did.
At Cloudflare’s SF office, the conference rooms are all numbered after HTTP status codes. Our Board Room is 404. The coffee shop (Cafe Lambretta) in our building, at the corner of 2nd & Townsend, is bookable in our calendar system as Room 418.
We return 418 on our site in case an admin tries to access the admin panel without a required VPN. It actually clicked pretty fast with everybody on the team, especially those less tech-savvy. They know the "teapot issue" means they forgot to turn on the VPN. It's less confusing than 401/403 :)
418 is actually unassigned.<p><a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml" rel="nofollow">https://www.iana.org/assignments/http-status-codes/http-stat...</a><p>This code has never been officially registered, especially not by that April Fools’ RFC. A number of HTTP implementations added it to their lists of codes anyway; there was a concern that it might create a conflict with if an actual meaning is assigned by the HTTP specification. One of the authors of the specification went around asking libraries to remove the code for this reason. Web developers, like the mature people they are, bullied him into abandoning it.<p>By the way, if one actually wanted to control coffee pots over HTTP, 400 Bad Request would have been entirely sufficient for this situation. This code has been superfluous from the start. Ironically, it became the very thing it was meant to satirise.
Some further relevant history:<p>There’s an official registry of status codes: <a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml" rel="nofollow">https://www.iana.org/assignments/http-status-codes/http-stat...</a>.<p>HTTP libraries normally use this as their canonical source of status codes that they should have constants (or whatever) defined for.<p>But <i>418 I'm a teapot</i> is not in that registry. It’s not clear to me why it wasn’t put in when the registry was established, but it seems most likely that someone made an executive judgement against pointless fun.<p>To my knowledge, it’s the only status code from an RFC that has not made it into the registry. So many HTTP libraries, perhaps most, have this one exception, an extra status code not from the registry.<p>In 2017, the httpbis working group chairman Mark Nottingham (mnot) sought to get 418 removed from libraries everywhere (since it wasn’t registered and wasn’t serious); this met with popular resistance (people like their fun) and so he changed direction and sought to have 418 registered properly instead, with <a href="https://datatracker.ietf.org/doc/draft-nottingham-thanks-larry/" rel="nofollow">https://datatracker.ietf.org/doc/draft-nottingham-thanks-lar...</a>. But that draft was allowed to expire and I’m not sure why.
If you encounter problems with HTTP 418, you should consider implementing RFC 7168 - The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA). <a href="https://tools.ietf.org/html/rfc7168" rel="nofollow">https://tools.ietf.org/html/rfc7168</a>
My school had a class called CS 418 Computer Graphics. One of the final projects was to render a scene reflected off the surface of a teapot STL. I often pondered on the coincidence.
"HTCPCP was an April 1 joke by Larry to illustrate how people were abusing HTTP in various ways. Ironically, it's not being used to abuse HTTP itself -- people are implementing parts of HTCPCP in their HTTP stacks." - <a href="https://tools.ietf.org/html/rfc2324" rel="nofollow">https://tools.ietf.org/html/rfc2324</a>
I had a coworker who found about 418, found this hilarious and started returning this in case of error.<p>It made for an interesting troubleshooting session, because at the time, not all browsers would display a meaningful result. Some would return a blank screen - which is easy to find. But not as easy when it was a single call among many others in the page...
Some time ago after realising how GraphQL (don't) use http code, I decided that I wouldn't use http code for business logic like everybody does, but let that responsibility only to the webserver (not auth 401, not found 404, exception 500, and few others). Is that absurd? Should I reconsider going back?
418 - The status code for a passionate debate! It’s a joke, it’s wrong, it’s funny, it’s right. And finally, oh dear, we need to have a chat about how you prepare your tea. Discussions on the famous 200, 404 and 500 are usually only lukewarm, though 488 stories can get racy.
I'm sure you can run Apache or nginx on the pi zero w on this and communicate with a walking robotic teapot.<p><a href="https://www.raspberrypi.org/blog/robotic-teapot/" rel="nofollow">https://www.raspberrypi.org/blog/robotic-teapot/</a>
For Zarquon's sake, the least they could have done is listened to him about tea <a href="https://hitchhikers.fandom.com/wiki/Tea" rel="nofollow">https://hitchhikers.fandom.com/wiki/Tea</a>.
As more of a graphics guy than a HTTP guy, I immediately though of the Utah Teapot.<p><a href="https://en.wikipedia.org/wiki/Utah_teapot" rel="nofollow">https://en.wikipedia.org/wiki/Utah_teapot</a>
A bit more than 5000 web servers return HTTP 418 :)<p><a href="https://beta.shodan.io/search?query=http.status%3A418" rel="nofollow">https://beta.shodan.io/search?query=http.status%3A418</a>
This reminds me of Hurds EIEIO<p><a href="https://www.gnu.org/software/hurd/faq/eieio.html" rel="nofollow">https://www.gnu.org/software/hurd/faq/eieio.html</a>
718 - I am not a teapot<p><a href="https://github.com/joho/7XX-rfc/pull/180" rel="nofollow">https://github.com/joho/7XX-rfc/pull/180</a>
Please if you’re reading this, don’t add this status code and don’t suffer anyone to add this to your code either. It’s not funny, and it’s not clever. Please don’t do it. Find another way to be clever and funny.