]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cache: respect the request cache-control header
authorWilly Tarreau <w@1wt.eu>
Fri, 22 Dec 2017 16:47:35 +0000 (17:47 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 Dec 2017 16:56:18 +0000 (17:56 +0100)
commit504455c5336c203ad1462e65a1579e04b02299e8
tree3c89587f9d8db17edb9062bb1f428d9dbd171288
parentc9bd34c7e0b0b4845d058c67c55fb0600a339919
BUG/MEDIUM: cache: respect the request cache-control header

Till now if a client emitted a request featureing a cache-control header,
this one was not respected and a stale object could still be delievered.r
 This patch ensures that :
  - cache-control: no-cache disables retrieval from the cache but does
    not prevent the newly fetched object from being stored ;
  - cache-control: no-store can safely retrieve from the cache but prevents
    from storing any fetched object
  - cache-control: max-age/max-stale/min-fresh act like no-cache
  - pragma: no-cache acts like cache-control: no-cache.

This needs to be backported to 1.8.
src/cache.c