]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cache: do not force the TX_CACHEABLE flag before checking cacheability
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Dec 2017 14:59:17 +0000 (15:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 Dec 2017 14:49:15 +0000 (15:49 +0100)
commitfaf2909f9f73a43b8db9a9ef884f64a0113ac1c9
tree6771580e5c001fb80b4c80367e9f0c80fbce26ed
parentd3900cc31d4ca14a9c45902b2543da2f39ce2c26
BUG/MINOR: cache: do not force the TX_CACHEABLE flag before checking cacheability

The cache used to set this flag before calling
check_response_for_cacheability() due to the way the flags were previously
set (too late), but this is a bad idea as it loses the information of the
implicit caching rules related to the method and the status code. Let's
only rely on what was determined during the request and response parsing
instead and not change it.

This fix must be backported to 1.8, and it requires that the following
patches are also merged :
 - MINOR: http: adjust the list of supposedly cacheable methods
 - MINOR: http: update the list of cacheable status codes as per RFC7231
 - MINOR: http: start to compute the transaction's cacheability from the request
 - BUG/MINOR: http: do not ignore cache-control: public
src/cache.c