The official NGINX Open Source repository.
Go to file
Roman Arutyunyan 16ebfa999b Upstream: background cache update before cache send (ticket #1782).
In case of filter finalization, essential request fields like r->uri,
r->args etc could be changed, which affected the cache update subrequest.
Also, after filter finalization r->cache could be set to NULL, leading to
null pointer dereference in ngx_http_upstream_cache_background_update().
The fix is to create background cache update subrequest before sending the
cached response.

Since initial introduction in 1aeaae6e9446 (1.11.10) background cache update
subrequest was created after sending the cached response because otherwise it
blocked the parent request output.  In 9552758a786e (1.13.1) background
subrequests were introduced to eliminate the delay before sending the final
part of the cached response.  This also made it possible to create the
background cache update subrequest before sending the response.

Note that creating the subrequest earlier does not change the fact that in case
of filter finalization the background cache update subrequest will likely not
have enough time to successfully update the cache entry.  Filter finalization
leads to the main request termination as soon the current iteration of request
processing is complete.
2019-06-03 20:33:26 +03:00
auto Unconditional compilation of the postpone filter. 2019-05-08 19:22:13 +03:00
conf MIME: added font/woff2 type (ticket #1243). 2018-06-15 17:29:55 +03:00
contrib Contrib: vim syntax, update core and 3rd party module directives. 2018-12-24 16:30:10 +02:00
docs nginx-1.17.0-RELEASE 2019-05-21 17:23:57 +03:00
misc Updated PCRE used for win32 builds. 2019-04-16 16:32:44 +03:00
src Upstream: background cache update before cache send (ticket #1782). 2019-06-03 20:33:26 +03:00
.hgtags release-1.17.0 tag 2019-05-21 17:23:57 +03:00