NetSurf
|
#include <limits.h>
#include <stdlib.h>
#include "utils/corestrings.h"
#include "utils/http.h"
#include "utils/http/generics.h"
#include "utils/http/primitives.h"
Go to the source code of this file.
Data Structures | |
struct | http_cache_control |
Representation of a Cache-Control. More... | |
struct | http_directive |
Representation of a directive. More... | |
Typedefs | |
typedef struct http_directive | http_directive |
Representation of a directive. More... | |
Functions | |
static void | http_destroy_directive (http_directive *self) |
static nserror | http__parse_directive (const char **input, http_directive **result) |
static void | http_directive_list_destroy (http_directive *list) |
static nserror | http_directive_list_find_item (const http_directive *list, lwc_string *name, lwc_string **value) |
static const http_directive * | http_directive_list_iterate (const http_directive *cur, lwc_string **name, lwc_string **value) |
static uint32_t | count (const http_directive *list, lwc_string *key) |
static bool | check_duplicates (const http_directive *directives) |
static nserror | parse_max_age (lwc_string *value, uint32_t *result) |
nserror | http_parse_cache_control (const char *header_value, http_cache_control **result) |
Parse an HTTP Cache-Control header value. More... | |
void | http_cache_control_destroy (http_cache_control *victim) |
Destroy a cache_control object. More... | |
bool | http_cache_control_has_max_age (http_cache_control *cc) |
Determine if a valid max-age directive is present. More... | |
uint32_t | http_cache_control_max_age (http_cache_control *cc) |
Get the value of a cache control's max-age. More... | |
bool | http_cache_control_no_cache (http_cache_control *cc) |
Get the value of a cache control's no-cache flag. More... | |
bool | http_cache_control_no_store (http_cache_control *cc) |
Get the value of a cache control's no-store flag. More... | |
typedef struct http_directive http_directive |
Representation of a directive.
|
static |
Definition at line 174 of file cache-control.c.
References count(), http_directive_list_iterate(), and result.
Referenced by http_parse_cache_control().
|
static |
Definition at line 157 of file cache-control.c.
References http_directive::base, count(), http_directive::name, and http__item::next.
Referenced by CookieWindow::_BuildDomainList(), _talloc_array(), _talloc_realloc_array(), _talloc_zero_array(), ascii_count_alpha(), ascii_count_alpha_lower(), ascii_count_alpha_upper(), ascii_count_digit(), ascii_count_digit_or_colon(), box_count_children(), box_parse_multi_lengths(), browser_window_get_cookie_count(), browser_window_reload(), check_duplicates(), count(), duk__concat_and_join_helper(), duk__dragon4_format_uint32(), duk__inp_get_cp(), duk__refcount_free_pending(), duk__slow_case_conversion(), duk_bi_array_prototype_join_shared(), duk_concat_2(), duk_decode_string(), duk_heap_process_finalize_list(), duk_hobject_refcount_finalize_norz(), duk_pop_n(), form__select_process_selection(), layout__get_list_item_count(), layout_table(), node_count_siblings(), ro_gui_url_suggest_callback(), save_complete_save_html_objects(), save_complete_save_html_stylesheets(), scan_process_list(), time__parse_hh_mm_ss(), treeview_redraw_search(), treeview_redraw_tree(), and urldb_get_cookie().
|
static |
Definition at line 58 of file cache-control.c.
References HTTP__ITEM_INIT, http__parse_quoted_string(), http__parse_token(), http__skip_LWS(), http_destroy_directive(), http_directive::name, NSERROR_NOMEM, NSERROR_OK, result, and http_directive::value.
Referenced by http_parse_cache_control().
void http_cache_control_destroy | ( | http_cache_control * | victim | ) |
Destroy a cache_control object.
victim | Object to destroy |
Definition at line 326 of file cache-control.c.
Referenced by llcache_fetch_parse_cache_control().
bool http_cache_control_has_max_age | ( | http_cache_control * | cc | ) |
Determine if a valid max-age directive is present.
cc | Object to inspect |
Definition at line 332 of file cache-control.c.
References http_cache_control::max_age_valid.
Referenced by llcache_fetch_parse_cache_control().
uint32_t http_cache_control_max_age | ( | http_cache_control * | cc | ) |
Get the value of a cache control's max-age.
cc | Object to inspect |
Definition at line 338 of file cache-control.c.
References http_cache_control::max_age.
Referenced by llcache_fetch_parse_cache_control().
bool http_cache_control_no_cache | ( | http_cache_control * | cc | ) |
Get the value of a cache control's no-cache flag.
cc | Object to inspect |
Definition at line 344 of file cache-control.c.
References http_cache_control::no_cache.
Referenced by llcache_fetch_parse_cache_control().
bool http_cache_control_no_store | ( | http_cache_control * | cc | ) |
Get the value of a cache control's no-store flag.
cc | Object to inspect |
Definition at line 350 of file cache-control.c.
References http_cache_control::no_store.
Referenced by llcache_fetch_parse_cache_control().
|
static |
Definition at line 49 of file cache-control.c.
References http_directive::name, and http_directive::value.
Referenced by http__parse_directive().
|
static |
Definition at line 110 of file cache-control.c.
References http__item_list_destroy.
Referenced by http_parse_cache_control().
|
static |
Definition at line 115 of file cache-control.c.
References http_directive::base, http_directive::name, http__item::next, NSERROR_NOT_FOUND, NSERROR_OK, and http_directive::value.
Referenced by http_parse_cache_control().
|
static |
Definition at line 140 of file cache-control.c.
References http_directive::base, http_directive::name, http__item::next, and http_directive::value.
Referenced by check_duplicates().
nserror http_parse_cache_control | ( | const char * | header_value, |
http_cache_control ** | result | ||
) |
Parse an HTTP Cache-Control header value.
header_value | Header value to parse |
result | Pointer to location to receive result |
Definition at line 235 of file cache-control.c.
References check_duplicates(), http__item_list_parse, http__parse_directive(), http__skip_LWS(), http_directive_list_destroy(), http_directive_list_find_item(), http_cache_control::max_age, http_cache_control::max_age_valid, http_cache_control::no_cache, http_cache_control::no_store, NSERROR_NOMEM, NSERROR_NOT_FOUND, NSERROR_OK, parse_max_age(), and result.
Referenced by llcache_fetch_parse_cache_control().
|
static |
Definition at line 200 of file cache-control.c.
References NSERROR_NOT_FOUND, NSERROR_OK, and result.
Referenced by http_parse_cache_control().