)]}'
{
  "commit": "9ba1985c9c91e07e968508f8fba6a092c556e327",
  "tree": "914d8155937fb36d83372cc9a6e961994316aa7d",
  "parents": [
    "24669b398f92bcebb9adfea245d3a05bcaf092fb"
  ],
  "author": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Tue Jan 11 02:23:49 2022 +0300"
  },
  "committer": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Tue Jan 11 02:23:49 2022 +0300"
  },
  "message": "Avoid sending \"Connection: keep-alive\" when shutting down.\n\nWhen a worker process is shutting down, keepalive is not used: this is checked\nbefore the ngx_http_set_keepalive() call in ngx_http_finalize_connection().\nYet the \"Connection: keep-alive\" header was still sent, even if we know that\nthe worker process is shutting down, potentially resulting in additional\nrequests being sent to the connection which is going to be closed anyway.\nWhile clients are expected to be able to handle asynchronous close events\n(see ticket #1022), it is certainly possible to send the \"Connection: close\"\nheader instead, informing the client that the connection is going to be closed\nand potentially saving some unneeded work.\n\nWith this change, we additionally check for worker process shutdown just\nbefore sending response headers, and disable keepalive accordingly.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9b89405904bd361feafa2d9a15e951eca0f3edfb",
      "old_mode": 33188,
      "old_path": "src/http/ngx_http_header_filter_module.c",
      "new_id": "76f6e9629be511dfee0efc3d5e5fbc8cab5f5425",
      "new_mode": 33188,
      "new_path": "src/http/ngx_http_header_filter_module.c"
    }
  ]
}
