nginx/src
Maxim Dounin 8df3ad13c5 Upstream: fixed X-Accel-Expires/Cache-Control/Expires handling.
Previously, if caching was disabled due to Expires in the past, nginx
failed to cache the response even if it was cacheable as per subsequently
parsed Cache-Control header (ticket #964).

Similarly, if caching was disabled due to Expires in the past,
"Cache-Control: no-cache" or "Cache-Control: max-age=0", caching was not
used if it was cacheable as per subsequently parsed X-Accel-Expires header.

Fix is to avoid disabling caching immediately after parsing Expires in
the past or Cache-Control, but rather set flags which are later checked by
ngx_http_upstream_process_headers() (and cleared by "Cache-Control: max-age"
and X-Accel-Expires).

Additionally, now X-Accel-Expires does not prevent parsing of cache control
extensions, notably stale-while-revalidate and stale-if-error.  This
ensures that order of the X-Accel-Expires and Cache-Control headers is not
important.

Prodded by Vadim Fedorenko and Yugo Horie.
2022-06-07 00:07:12 +03:00
..
core FastCGI: combining headers with identical names (ticket #1724). 2022-05-30 21:25:27 +03:00
event SSL: logging level of "application data after close notify". 2022-02-08 17:35:27 +03:00
http Upstream: fixed X-Accel-Expires/Cache-Control/Expires handling. 2022-06-07 00:07:12 +03:00
mail Mail: connections with wrong ALPN protocols are now rejected. 2021-10-20 09:45:34 +03:00
misc Cpp test: added stream. 2020-10-13 07:44:09 +03:00
os Fixed runtime handling of systems without EPOLLRDHUP support. 2022-05-30 02:38:07 +03:00
stream HTTP/2: made it possible to flush response headers (ticket #1743). 2022-02-03 01:44:38 +03:00