TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

HTTP Error Code 418 I'm a Teapot is about to be removed from Node

103 点作者 tanu057将近 8 年前

15 条评论

frenchman99将近 8 年前
Making everything dull won&#x27;t benefit the field.<p>Sure we can remove every joke, every code comment that contains &quot;FUCK&quot;, we can forbid commits that contain swear words, we can ask engineers to wear suits, we can remove animated GIFs from Slack and we can remove &quot;418 I&#x27;m a teapot&quot;.<p>This kind of joke is what makes the job fun. You look at an implementation of an HTTP request and see &quot;418 I&#x27;m a teapot&quot;, you smile for a second and keep working. That kind of fun contributes to happynness, increases psychological well-being and ends up contributing to long-term productivity.<p>In addition, removing the 418 code would break backwards compatibility. It will create way more problems than its availability does right now. This is the kind of thing you have to think about before-hand: add it and keep it, or don&#x27;t add it. Now that we have a fun status code, we shouldn&#x27;t add new ones. But removing the existing one is useless and damaging.
评论 #14987978 未加载
评论 #14987900 未加载
retox将近 8 年前
Don&#x27;t worry there will be one thousand packages you can download to re-add it, some of them won&#x27;t even contain exploits.
throwaway2016a将近 8 年前
I find the initiatives like this to be kind of a waste of time. And some of the reasons are kind of contrived. For example:<p>&gt; While we have a number of spare 4xx HTTP status codes that are unregistered now, the semantics of HTTP are something that (hopefully) are going to last for a long time, so one day we may need this code point. [1]<p>First, you can remove it when there this problem actually happens. The backwards compatibility issue won&#x27;t be any more&#x2F;less of an issue then than now.<p>Second, &quot;we may need this code point&quot; is disingenuous unless the user is part of the W3C there is no &quot;we&quot; here. The node community can&#x27;t decide unilaterally to change code points. (he might be part of W3C I didn&#x27;t check. My sincere apologies if he is)<p>With that said, another part of the argument is valid. rfc2324 which defines the code is indeed not HTTP, it is HTCPCP (Hypertext Coffee Pot Control Protocol) and one could strongly argue that it doesn&#x27;t belong in an HTTP library.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;nodejs&#x2F;node&#x2F;issues&#x2F;14644" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nodejs&#x2F;node&#x2F;issues&#x2F;14644</a>
评论 #14993520 未加载
asploder将近 8 年前
As a transgender woman who literally changed her name to include “teapot”, in part because of this status code, seeing this issue come up in the same week as the James Damore manifesto is a deep disappointment.<p>Why is it so hard for some technologists to have a basic level of respect for their colleagues? What motivates them to take actions that demonstrably harm their colleagues, whether it be asserting their biological inferiority or removing their trivial-but-meaningful whimsy?<p>When I was a closeted teenager, tech was a respite from the pointless cruelty of the rest of the world - or at least it felt that way. What happened?
mirages将近 8 年前
<a href="https:&#x2F;&#x2F;www.google.com&#x2F;teapot" rel="nofollow">https:&#x2F;&#x2F;www.google.com&#x2F;teapot</a>
syshum将近 8 年前
So the solution then is to Adopt 418 as part of the HTTP standard, not remove it from projects to appease the kill joys that have no fun in their lives and lead sad crusades wanting to destroy to fun of others
评论 #14988791 未加载
Tade0将近 8 年前
From: <a href="https:&#x2F;&#x2F;github.com&#x2F;nodejs&#x2F;node&#x2F;issues&#x2F;14644#issuecomment-321824818" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nodejs&#x2F;node&#x2F;issues&#x2F;14644#issuecomment-321...</a><p><pre><code> All, thank you for the amusing and fun feedback. It pleases us all to no end that the most beloved feature of Node.js is a Teapot. I think it&#x27;s safe for us to leave this as is for now. I&#x27;m closing the issue and just to avoid keeping this issue from growing indefinitely for all of time, I&#x27;m going to lock it. Sleep in comfort tonight knowing that, at least for the foreseeable future, your Node.js web applications can proudly proclaim that they, too, are Teapots.</code></pre>
Jedi72将近 8 年前
Error 420: Server confused and hungry
评论 #14988114 未加载
MichaelBurge将近 8 年前
It doesn&#x27;t look like Node really does anything with the status code except give it a message, so &quot;removed from Node&quot; doesn&#x27;t mean anything since you could still return any integer you like.<p>But, a good reason to remove a joke is when people start taking it too seriously:<p>&gt; In particular, Node&#x27;s support for the HTCPCP 418 I&#x27;m a Teapot status code has been used as an argument in the HTTP Working Group to preclude use of 418 in HTTP for real-world purposes.<p>&quot;Why not? I&#x27;m bored and it&#x27;s a fun little thing&quot; is a good reason to add it. Vocal support from the masses is a good reason to remove it.
评论 #14987678 未加载
TranceMan将近 8 年前
Sorry it&#x27;s Friday - this cat would be out of a job: <a href="https:&#x2F;&#x2F;http.cat&#x2F;418" rel="nofollow">https:&#x2F;&#x2F;http.cat&#x2F;418</a>
philbo将近 8 年前
Please no.<p>On the one hand you have a reasonable request, well-argued and politely-put by a respected engineer, who is long-standing contributor to the IETF and W3C. On the other hand you have a student who thinks 418 is fun.
评论 #14987608 未加载
youngtaff将近 8 年前
There is no HTTP 418 error code - it&#x27;s not part of the HTTP spec - just a massive amount of confusion amongst people who believe it is
loeber将近 8 年前
Aristotle said: &quot;what does not add, detracts.&quot; I firmly believe this; remove cruft wherever possible. Bloat is bad, and stands in the way of clean &amp; elegant abstractions that can be built upon. Consequently, I think that removing HTTP 418 is good.
评论 #14988091 未加载
评论 #14988426 未加载
评论 #14988237 未加载
评论 #14988398 未加载
tomohawk将近 8 年前
What a masterful troll
gaius将近 8 年前
So there is one individual who has made it their life&#x27;s work to visit every project on Github to remove something that harmed noone and amused many?
评论 #14988782 未加载
评论 #14988698 未加载