V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
MarioLuisGarcia
V2EX  ›  问与答

如何触发 HTTP 418 状态?

  •  
  •   MarioLuisGarcia · Oct 30, 2015 · 9290 views
    This topic created in 3842 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
        1
    xfspace  
       Oct 30, 2015
    server {
    listen 80;
    return 418;
    }
    MarioLuisGarcia
        2
    MarioLuisGarcia  
    OP
       Oct 30, 2015
    @xfspace 如果是访问别人的网站呢。
    cloverstd
        3
    cloverstd  
       Oct 30, 2015
    HTTP 状态码可以随便你怎么返回给客户端
    xfspace
        4
    xfspace  
       Oct 30, 2015
    @MarioLuisGarcia 你在逗我吗。
    Slienc7
        5
    Slienc7  
       Oct 30, 2015
    @MarioLuisGarcia “ and is not expected to be implemented by actual HTTP servers. ”
    choury
        6
    choury  
       Oct 30, 2015   ❤️ 3
    MarioLuisGarcia
        7
    MarioLuisGarcia  
    OP
       Oct 31, 2015
    @xfspace choury 在 6 楼给出了一个应用。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1150 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 23:19 · PVG 07:19 · LAX 16:19 · JFK 19:19
    ♥ Do have faith in what you're doing.