11 ms·
I’m A Teapot – HTTP status code 418
- ishcheklein 6y ago"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." - https://tools.ietf.org/html/rfc2324 https://tools.ietf.org/html/rfc2324
- CobrastanJorji 6y agoIf 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). https://tools.ietf.org/html/rfc7168 https://tools.ietf.org/html/rfc7168
- xbar 6y agoIt's true. I should...
- ggghhhfff 6y agoUseful for when you get requests to brew coffee on your smart teapot
- kristopher 6y agoObligatory Google Teapot: https://www.google.com/teapot https://www.google.com/teapot
- andrewflnr 6y agoAlso recommended: https://http.cat/ https://http.cat/, particularly https://http.cat/418 https://http.cat/418
- keanebean86 6y agoI keep trying to trick my coworker into looking up 418 but so far he ignores me and uses a code he already knows.
- hnzix 6y agoOr if you're more of a Dog person: https://httpstatusdogs.com/ https://httpstatusdogs.com/
- roboyoshi 6y agoAnd if you're more of a Rap person: http://httpstatusrappers.com/ http://httpstatusrappers.com/ with my favorite: http://httpstatusrappers.com/200.html http://httpstatusrappers.com/200.html
- walrus01 6y agoI'm sure you can run Apache or nginx on the pi zero w on this and communicate with a walking robotic teapot. https://www.raspberrypi.org/blog/robotic-teapot/ https://www.raspberrypi.org/blog/robotic-teapot/
- nickt 6y agoThe original teapot server was an Acorn Archimedes, so this is a nice legacy. Edit: I misremembered, it was a coffee pot. Bloody barbarians! From RFC 2324, “ [CBIO] "The Trojan Room Coffee Pot, a (non-technical) biography", Q. Stafford-Fraser, University of Cambridge Computer Lab, <http://www.cl.cam.ac.uk/coffee/qsf/coffee.html> http://www.cl.cam.ac.uk/coffee/qsf/coffee.html>
- slavik81 6y agoTerrifying. That brings back childhood memories of The Robot Spy. https://friday87central.files.wordpress.com/2011/10/robot-spy.jpg https://friday87central.files.wordpress.com/2011/10/robot-sp...
- outworlder 6y agoI had a coworker who found about 418, found this hilarious and started returning this in case of error. 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...
- darkhelmet 6y agoI 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. Much to my astonishment/amusement, it did.
- shakna 6y agoHere? [0] I'd be interested in reading the email thread of why it still panic'd, if you have it lying around. [0] https://github.com/freebsd/freebsd/blob/master/sys/kern/kern_thread.c#L630 https://github.com/freebsd/freebsd/blob/master/sys/kern/kern...
- darkhelmet 6y agoThat's the one. In traditional BSD kernels, there is a portable layer and a machine dependent layer. The cpu MD layer for context switching was called cpu_switch(), usually written in assembler. It saved the current state and switched to another. When you regained control of the cpu, you returned from cpu_switch(). There was always somewhere to switch to. When we added multiple threads per process (part of the KSE effort back in the day), a new low level construct was added - cpu_throw(). You switched somewhere else and threw away your context, didn't put the old thread in the run queue, and never returned. We used this for quickly disposing of threads. This was all fine, thread implementations, process/thread schedulers, etc came and went. Somewhere along the way, somebody reused the NetBSD MD/asm layer for one of the powerpc architectures. Of course, NetBSD didn't have cpu_throw(). It was #defined to cpu_switch() because it was close enough and worked. Until somebody tried to use threading on this powerpc architecture. The fake cpu_throw() didn't prevent a return and the system got far enough to reach the upper machine independent layers and hit the panic. This caused some amusement. Particularly as somebody had previously suggested that the panic was unnecessary as it cannot happen but I wanted to keep it anyway.
- lsaferite 6y agoI truly love reading about situations where unreachable code became reachable, much to the astonishment of many. Thanks for that!
- konart 6y agoI had a project were in case of a 400 errors 418 error would be used.
- palsecam 6y agoMe too, kind of. I have nginx reply with a 418 page to bad bots requests. Funny easter egg. As a bonus, that makes nginx avoid checking the filesystem for inexistent files, and makes filtering logs easier. Nginx config snippet: # Nothing to hack around here, I’m just a teapot: location ~* \.(?:php|aspx?|jsp|dll|sql|bak)$ { return 418; } error_page 418 /418.html; Example: https://FreeSolitaire.win/wp-login.php https://FreeSolitaire.win/wp-login.php
- OldHand2018 6y agoNice. I used to use that for all php requests to my websites (like you, I do not have php installed on my servers). Now I just use the nginx 444, which immediately drops the connection. I wonder if it actually saves much time. Probably not.
- pacamara619 6y ago718 - I am not a teapot https://github.com/joho/7XX-rfc/pull/180 https://github.com/joho/7XX-rfc/pull/180
- perl4ever 6y ago718 - I'm a Porsche
- matmann2001 6y agoMy 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.
- mike_d 6y agoThe Utah Teapot is the Hello World of 3D rendering, and a teapot model is included somewhere in almost every 3D rendering application. I learned about it when I received a copy of BRL-CAD from the Army Research Lab in the mid-90s and it had a teapot, which I thought was quite odd for an application designed for ballistic research. https://en.wikipedia.org/wiki/Utah_teapot https://en.wikipedia.org/wiki/Utah_teapot
- msla 6y agoThe British wouldn't think it odd to mix ballistics with tea: https://en.wikipedia.org/wiki/Boiling_vessel https://en.wikipedia.org/wiki/Boiling_vessel > A boiling vessel is a water heating system fitted to British armoured fighting vehicles that permits the crew to heat water and cook food by drawing power from the vehicle electrical supply.[1] It is often referred to by crewmembers (not entirely in jest) as the most important piece of equipment in a British armoured vehicle
- kabes 6y agoTea and coffee pots are everywhere in computer history. This status code. The utah teapot you describe which kicked of 3d rendering and the first webcam was specifically made to film a coffee pot.
- opportune 6y agoI guess the 2020 version of this status code would be "Sir, this is a Wendy's"
- deleted 6y ago[deleted]
- lvturner 6y agoI don't get it
- snicky 6y agoWe 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 :)
- mike_d 6y agoI did the same for a popular tech company many years ago. If you attempted admin only actions you got a "402 Payment Required"
- spockz 6y agoWhy not return instead/in addition reply with an actionable message in the body?
- snicky 6y agoThe misinformation that 418 brings may be quite helpful if an unauthorized person temporarily gets in hold of your device and tries to access that admin panel.
- spockz 6y agoHow is that? Enabling VPN should require some knowledge still, so why would it help if an unauthorised person accessed your device?
- snicky 6y agoSome setups are dead simple and require just 1 or 2 clicks to enable a VPN that was registered before, e.g. Tunnelblick on MacOS. The potential hacker who was explicitly told he has to enable a VPN may look for such an app on the compromised computer.
- ed25519FUUU 6y agoPlease 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.
- Igelau 6y ago> It’s not funny Yes it is. > it’s not clever Hmm. Don't really care. Ever try to debug clever code? Exactly. > Please don’t do it Dev goals: I'm absolutely going to find something I can sneak this into. > Find another way to be clever and funny. Yes, but after I'm done releasing these precious 418s.
- brazzy 6y agoWho exactly put you in charge of deciding what's funny?
- nicky0 6y agoThis comment just makes me want to do it more.
- mlang23 6y agoOh, the person who owns funny! Thanks for letting us know. We appreciate your insight.
- salawat 6y agoWhy are you being so disinclusive? Why should tea drinkers be excluded from representation in the corpus of Standards that underlie the fundamental functionality of the Hypertext transfer Protocol driven web? In fact, you should go brew yourself a cup. You're always kind of a grump til you get a cuppa'.
- eastdakota 6y agoAt 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.
- rozab 6y agoReminds me of this riddle https://puzzling.stackexchange.com/questions/83152/a-strange-hotel https://puzzling.stackexchange.com/questions/83152/a-strange...
- 9nGQluzmnq3M 6y agoThere's a FAANG office which also uses 4xx status codes, but as you would expect, 404 is missing, and 403 is permanently locked (spoiler: it's a door mounted on a wall with nothing behind it). 418, on the other hand, is decorated with whimsical teapots.
- shawabawa3 6y agoand 401 has a bouncer outside that doesn't let anybody in?
- spurgu 6y agoOr it just requires a code to enter.
- efreak 6y agoMost doors have nothing behind them. They wouldn't be very useful otherwise.
- KineticLensman 6y ago> the conference rooms are all numbered after HTTP status codes Sigh, conference room naming systems! I worked somewhere many years ago where the conference rooms were named after birds of prey: falcon, kestrel, eagle, etc. The smoking room (back in the day) was informally named 'puffin'. Almost as much fun as server naming conventions.
- csilverman 6y agoI 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. 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. 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: https://help.dreamhost.com/hc/en-us/articles/215947927-How-do-I-enable-Extra-Web-Security-for-my-website- https://help.dreamhost.com/hc/en-us/articles/215947927-How-d... 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. (They did, as usual, manage to fix my problem.)
- Doctor_Fegg 6y agoOpenStreetMap uses it too: http://twitter.com/Anonymaps/status/1247863053976252416 http://twitter.com/Anonymaps/status/1247863053976252416
- jrockway 6y agoThis is kind of unfortunate because if they just returned a correct code (429 Too Many Requests), you could have immediately debugged the problem. (The standard suggests also including a Retry-After header, which would tell you when the rate limiting would be lifted so you could try again.) Basically, there was a machine-readable way to tell you to go away. But instead they told your user agent that they were unable to brew coffee because they are a teapot. What a waste of everyone's time.
- pwdisswordfish4 6y ago418 is actually unassigned. https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml https://www.iana.org/assignments/http-status-codes/http-stat... 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. 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.
- chrismorgan 6y ago> 400 Bad Request would have been entirely sufficient for this situation. The whole idea of status codes is that if you encounter one you don’t know about, you can treat it as a member of that family, so any unknown 4xx will be treated the same as a 400. Most of the 400 series is about clarifying what was wrong with the request. 400 just says something’s wrong about the request, but not what. 405 says it’s the method. 406 says it can’t satisfy the provided Accept header. 411 says it wants a Content-Length header. 418 says it’s that you tried to brew coffee in a teapot.
- Erlich_Bachman 6y ago> 418 says it’s that you tried to brew coffee in a teapot. That you tried to do something so absurdly inappropriate that there isn't even a proper technical way to explain why it was wrong and why it could not work? Like, the server could not even begin to understand what you tried to accomplish with that request.
- msla 6y ago> That you tried to do something so absurdly inappropriate that there isn't even a proper technical way to explain why it was wrong and why it could not work? Like, the server could not even begin to understand what you tried to accomplish with that request. The "Blank Stare" response code. Or maybe the "Stunned Stare And Slowly Backing Away" response code. Something at the other end: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes https://en.wikipedia.org/wiki/List_of_HTTP_status_codes > 420 Enhance Your Calm (Twitter) >> Returned by version 1 of the Twitter Search and Trends API when the client is being rate limited; versions 1.1 and later use the 429 Too Many Requests response code instead.[74] The phrase "Enhance your calm" comes from the 1993 movie Demolition Man, and its association with this number is likely a reference to cannabis. Visually: https://http.cat/420 https://http.cat/420
- chrismorgan 6y agoSome further relevant history: There’s an official registry of status codes: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml https://www.iana.org/assignments/http-status-codes/http-stat.... HTTP libraries normally use this as their canonical source of status codes that they should have constants (or whatever) defined for. But 418 I'm a teapot 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. 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. 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 https://datatracker.ietf.org/doc/draft-nottingham-thanks-larry/ https://datatracker.ietf.org/doc/draft-nottingham-thanks-lar.... But that draft was allowed to expire and I’m not sure why.
- jwilk 6y agoHN discussions: https://news.ycombinator.com/item?id=14987460 https://news.ycombinator.com/item?id=14987460 https://news.ycombinator.com/item?id=15004907 https://news.ycombinator.com/item?id=15004907
- jychang 6y ago> But that draft was allowed to expire and I’m not sure why. Because the current status quo is good enough. Like in theory, sure, removing 418 makes sense for cleanup purposes. Or barring that, officially registering it. In practice, it completely does not matter whatsoever. Keeping pointless things out of the registry is fine. And they're not stupid, they're never going to assign 418 to something else, so having 418 in libraries is not going to be an issue. At the end of the day, the current situation is ideal.
- realaleris149 6y agoThe linked site does not contain all the statuses from the original registry, for example 425 Too Early is missing.
- brailsafe 6y agoMore work was put in for this joke than I've literally put into any development related thing all summer. I like it.
- non-nil 6y agoPeople, please! If encountering a 418, consider adhering to ISO 3103: https://en.wikipedia.org/wiki/ISO_3103 https://en.wikipedia.org/wiki/ISO_3103
- jpswade 6y agoObligatory Tom Scott https://youtu.be/nAsrsMPftOI https://youtu.be/nAsrsMPftOI
- mvn9 6y agofrom the standard [1]: >Freshly boiling water is poured into the pot vs preparing green tea [2] >Steeping temperatures range from 61 °C (142 °F) to 87 °C (189 °F) and steeping times from 30 seconds to three minutes. Of course he doesn't like tea if he brews green tea with too hot water. [1] https://en.wikipedia.org/wiki/ISO_3103 https://en.wikipedia.org/wiki/ISO_3103 [2] https://en.wikipedia.org/wiki/Green_tea https://en.wikipedia.org/wiki/Green_tea
- vanderZwan 6y agoMaking this a fine example of systemic exclusion
- mlang23 6y agoOMG, I didn't know about this one :-)
- bengale 6y ago> The protocol has been criticized for omitting any mention of prewarming the pot.[6] Ireland was the only country to object, and objected on technical grounds.[7] It is a good point.
- Lio 6y agoPrewarming is something my Mum (Irish) is very insistent on and which I (British) studiously ignore...
- G4BB3R 6y agoSome 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?
- bmn__ 6y agoIt's not absurd. If you have tuits to spare, strive to be in compliance with the standards to your best ability. Do not just relegate error handling to code you will not touch. For example, status 422 is used for syntactically correct, but semantically invalid request bodies. Augment your graphql library or application code where appropriate. That way, you reap the benefits of interoperability. Being in compliance makes you a good Internet citizen in the eyes of your peers.
- remux 6y agoOn my licence plate I have the number 418 :D
- nineteen999 6y agoAs more of a graphics guy than a HTTP guy, I immediately though of the Utah Teapot. https://en.wikipedia.org/wiki/Utah_teapot https://en.wikipedia.org/wiki/Utah_teapot
- mlang23 6y agoThis reminds me of Hurds EIEIO https://www.gnu.org/software/hurd/faq/eieio.html https://www.gnu.org/software/hurd/faq/eieio.html
- aidenn0 6y agoOne of POWER's ordering primitives is enable in-order execution of input/output, or eieio.
- fdisotto 6y agoWe use it in our product https://punterz.club/ https://punterz.club/ just for fun :)
- konjin 6y agoThe longest thread at a hacker space I frequented was fighting over adding a 418 status to the mainline iot kettle stack. The argument went that a kettle is not a tea pot since before adding a tea bag you can use the hot water for anything, including instant coffee. Someone added a tea bag dunker to the kettle. People started complaining about taking away choice by forcing everyone to use the kettle as a tea pot, so I added a empty tea bag as one of the selections. The argument then went that since it can load empty tea bags it is not a permanent tea pot even though it is mostly a tea pot so it shouldn't include 418 as per RFC 7168. The last I'd heard of it, they had added peristaltic pumps that can be accessed individually, so if you sent an HTCPCP request to the tea designated pump for coffee it would return 418, but if you sent it to the beverage server it would route your order to the correct pump.
- mvip 6y agohttps://github.com/vpetersson/im-a-teapot https://github.com/vpetersson/im-a-teapot
- dade_ 6y ago418 - 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.
- achillean 6y agoA bit more than 5000 web servers return HTTP 418 :) https://beta.shodan.io/search?query=http.status%3A418 https://beta.shodan.io/search?query=http.status%3A418
- cik 6y agoFor Zarquon's sake, the least they could have done is listened to him about tea https://hitchhikers.fandom.com/wiki/Tea https://hitchhikers.fandom.com/wiki/Tea.