[PATCH 0 of 3] [nginx] cache: Update Age response header correctly

Hiroaki Nakamura hnakamur at gmail.com
Thu Jun 20 11:39:35 UTC 2024


Hello!

Currently nginx does not update Age response header when it
receives responses from upstreams nor when it sends a cached
response.

This causes the problem that nginx might send an expired
cache because nginx does not consider the initial age
to calculate freshness of caches.

With this patchset, nginx updates Age response header
correctly when it receives responses from upstream and when
it sends a cached response as specified in RFC 9111 [1].

- patch 1: Update Age response header when nginx receives
           a response from upstreams and when it sends a
           cached response.
- patch 2: Save response time and corrected initial age
           to cache file header.
- patch 3: Tests: Update and add test files to patchset
           for convenience.
           Contents of the "*.t" files are to be put into
           nginx-tests repository.

Link: https://www.rfc-editor.org/rfc/rfc9111 [1]

Thanks!
Hiroaki Nakamura



More information about the nginx-devel mailing list