]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cache: Store the "Last-Modified" date in the cache_entry
authorRemi Tricot Le Breton <rlebreton@haproxy.com>
Fri, 23 Oct 2020 08:51:27 +0000 (10:51 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 27 Oct 2020 17:10:25 +0000 (18:10 +0100)
commit27091b4dd0612ca420d894342f58ba4087b41350
treeb26252294805fb2c6133f61d72635a940ce72a41
parente0142340b243ab0b82dbc40601f992b7f29b298f
MINOR: cache: Store the "Last-Modified" date in the cache_entry

In order to manage "If-Modified-Since" requests, we need to keep a
reference time for our cache entries (to which the conditional request's
date will be compared).
This reference is either extracted from the "Last-Modified" header, or
the "Date" header, or the reception time of the response (in decreasing
order of priority).
The date values are converted into seconds since epoch in order to ease
comparisons and to limit storage space.
src/cache.c