diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2019-06-10 21:35:36 +0000 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2019-06-10 21:35:36 +0000 |
commit | 23698aecf844c105b210fa42b642c1d0203978c9 (patch) | |
tree | f89a2d6269919ac3ab519aaff454da63c2eb8c59 /utils/http/cache-control.h | |
parent | 047c82cfce53102aced0f76f5ca13fe3c56b4db2 (diff) | |
download | netsurf-23698aecf844c105b210fa42b642c1d0203978c9.tar.gz netsurf-23698aecf844c105b210fa42b642c1d0203978c9.tar.bz2 |
HTTP: expose validity of max-age in Cache-Control
As max-age is an optional directive, provide a means to determine
if it is present and correct.
Diffstat (limited to 'utils/http/cache-control.h')
-rw-r--r-- | utils/http/cache-control.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/http/cache-control.h b/utils/http/cache-control.h index 22c5f97ac..945cfcec0 100644 --- a/utils/http/cache-control.h +++ b/utils/http/cache-control.h @@ -43,6 +43,14 @@ nserror http_parse_cache_control(const char *header_value, void http_cache_control_destroy(http_cache_control *victim); /** + * Determine if a valid max-age directive is present + * + * \param cc Object to inspect + * \return Whether max-age is valid + */ +bool http_cache_control_has_max_age(http_cache_control *cc); + +/** * Get the value of a cache control's max-age * * \param cc Object to inspect |