)]}'
{
  "commit": "e5009d0abd3dcae5650826fef3c1b481ea12096d",
  "tree": "153980bed45d0b853d292d23fc9cd71cbed9aedf",
  "parents": [
    "7099d364770757a50dbe27a0092317b657d36d50"
  ],
  "author": {
    "name": "Roman Arutyunyan",
    "email": "arut@nginx.com",
    "time": "Mon Jun 03 20:33:26 2019 +0300"
  },
  "committer": {
    "name": "Roman Arutyunyan",
    "email": "arut@nginx.com",
    "time": "Mon Jun 03 20:33:26 2019 +0300"
  },
  "message": "Upstream: background cache update before cache send (ticket #1782).\n\nIn case of filter finalization, essential request fields like r-\u003euri,\nr-\u003eargs etc could be changed, which affected the cache update subrequest.\nAlso, after filter finalization r-\u003ecache could be set to NULL, leading to\nnull pointer dereference in ngx_http_upstream_cache_background_update().\nThe fix is to create background cache update subrequest before sending the\ncached response.\n\nSince initial introduction in 1aeaae6e9446 (1.11.10) background cache update\nsubrequest was created after sending the cached response because otherwise it\nblocked the parent request output.  In 9552758a786e (1.13.1) background\nsubrequests were introduced to eliminate the delay before sending the final\npart of the cached response.  This also made it possible to create the\nbackground cache update subrequest before sending the response.\n\nNote that creating the subrequest earlier does not change the fact that in case\nof filter finalization the background cache update subrequest will likely not\nhave enough time to successfully update the cache entry.  Filter finalization\nleads to the main request termination as soon the current iteration of request\nprocessing is complete.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "925824366ffc5eb133f1ffc18998bae24f96a493",
      "old_mode": 33188,
      "old_path": "src/http/ngx_http_upstream.c",
      "new_id": "ffb09a91f138b8479765c39c26e6812730b63b86",
      "new_mode": 33188,
      "new_path": "src/http/ngx_http_upstream.c"
    }
  ]
}
