]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: http: add a function to check request's cache-control header field
authorWilly Tarreau <w@1wt.eu>
Fri, 22 Dec 2017 14:03:36 +0000 (15:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 Dec 2017 16:56:17 +0000 (17:56 +0100)
commit0ad8e0dfeaad3fe64890b6cbdcff23f1b123d5a1
tree615a53b6b9ff499d1e294b2a927017f74c1cdd24
parentfaf2909f9f73a43b8db9a9ef884f64a0113ac1c9
MINOR: http: add a function to check request's cache-control header field

The new function check_request_for_cacheability() is used to check if
a request may be served from the cache, and/or allows the response to
be stored into the cache. For this it checks the cache-control and
pragma header fields, and adjusts the existing TX_CACHEABLE and a new
TX_CACHE_IGNORE flags.

For now, just like its response side counterpart, it only checks the
first value of the header field. These functions should be reworked to
improve their parsers and validate all elements.
include/proto/proto_http.h
include/types/proto_http.h
src/proto_http.c