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

为什么 nginx 已经设置了 keepalive_timeout 值为 0,但是 connection 还是 keep-alive 呢?

  •  
  •   hellogbk · Dec 31, 2014 · 13387 views
    This topic created in 4142 days ago, the information mentioned may be changed or developed.

    百度了很多篇文章,都说只要设置成
    keepalive_timeout 0;

    那么 长连接就会被关闭。
    但是我测试了好多次,每次response header里面的connection依然是keep-alive,而不是close,这是怎么回事?
    谢谢。

    hellogbk
        1
    hellogbk  
    OP
       Dec 31, 2014
    发贴时间怎么变成4小时前了。。
    struCoder
        2
    struCoder  
       Dec 31, 2014
    返回时设置头Connection: close
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2583 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 15:05 · PVG 23:05 · LAX 08:05 · JFK 11:05
    ♥ Do have faith in what you're doing.