MarioLuisGarcia
V2EX  ›  问与答

如何触发 HTTP 418 状态?

  •  
  •   MarioLuisGarcia · Oct 30, 2015 · 9690 views
    This topic created in 4024 days ago, the information mentioned may be changed or developed.
    刚才在查看 HTTP 所有状态列表。发现 418 是个彩蛋:“ I'm a teapot".
    https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
    7 replies  •  2015-10-31 14:09:37 +08:00
    xfspace
    xfspace
    Oct 30, 2015
    1
    server {
    listen 80;
    return 418;
    }
    MarioLuisGarcia
    MarioLuisGarcia
    OP
    Oct 30, 2015
    2
    @xfspace 如果是访问别人的网站呢。
    cloverstd
    cloverstd
    Oct 30, 2015
    3
    HTTP 状态码可以随便你怎么返回给客户端
    xfspace
    xfspace
    Oct 30, 2015
    4
    @MarioLuisGarcia 你在逗我吗。
    Slienc7
    Slienc7
    Oct 30, 2015
    5
    @MarioLuisGarcia “ and is not expected to be implemented by actual HTTP servers. ”
    MarioLuisGarcia
    MarioLuisGarcia
    OP
    Oct 31, 2015
    7
    @xfspace choury 在 6 楼给出了一个应用。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2760 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 10:40 · PVG 18:40 · LAX 02:40 · JFK 05:40
    ♥ Do have faith in what you're doing.