如何触发 HTTP 418 状态?

2015 年 10 月 30 日
 MarioLuisGarcia
刚才在查看 HTTP 所有状态列表。发现 418 是个彩蛋:“ I'm a teapot".
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
9374 次点击
所在节点    问与答
7 条回复
xfspace
2015 年 10 月 30 日
server {
listen 80;
return 418;
}
MarioLuisGarcia
2015 年 10 月 30 日
@xfspace 如果是访问别人的网站呢。
cloverstd
2015 年 10 月 30 日
HTTP 状态码可以随便你怎么返回给客户端
xfspace
2015 年 10 月 30 日
@MarioLuisGarcia 你在逗我吗。
Slienc7
2015 年 10 月 30 日
@MarioLuisGarcia “ and is not expected to be implemented by actual HTTP servers. ”
choury
2015 年 10 月 30 日
MarioLuisGarcia
2015 年 10 月 31 日
@xfspace choury 在 6 楼给出了一个应用。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.xtra.eu.org/t/232371

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX