Lines 717-722
static void * create_cache_config(apr_po
Link Here
|
717 |
ps->no_last_mod_ignore = 0; |
717 |
ps->no_last_mod_ignore = 0; |
718 |
ps->ignorecachecontrol = 0; |
718 |
ps->ignorecachecontrol = 0; |
719 |
ps->ignorecachecontrol_set = 0 ; |
719 |
ps->ignorecachecontrol_set = 0 ; |
|
|
720 |
/* array of headers that should not be stored in cache */ |
721 |
ps->ignore_headers = apr_array_make(p, 10, sizeof(char *)); |
722 |
ps->ignore_headers_set = CACHE_IGNORE_HEADERS_UNSET; |
720 |
return ps; |
723 |
return ps; |
721 |
} |
724 |
} |
722 |
|
725 |
|
Lines 753-758
static void * merge_cache_config(apr_poo
Link Here
|
753 |
(overrides->ignorecachecontrol_set == 0) |
756 |
(overrides->ignorecachecontrol_set == 0) |
754 |
? base->ignorecachecontrol |
757 |
? base->ignorecachecontrol |
755 |
: overrides->ignorecachecontrol; |
758 |
: overrides->ignorecachecontrol; |
|
|
759 |
ps->ignore_headers = |
760 |
(overrides->ignore_headers_set == CACHE_IGNORE_HEADERS_UNSET) |
761 |
? base->ignore_headers |
762 |
: overrides->ignore_headers; |
756 |
return ps; |
763 |
return ps; |
757 |
} |
764 |
} |
758 |
static const char *set_cache_ignore_no_last_mod(cmd_parms *parms, void *dummy, |
765 |
static const char *set_cache_ignore_no_last_mod(cmd_parms *parms, void *dummy, |
Lines 782-787
static const char *set_cache_ignore_cach
Link Here
|
782 |
return NULL; |
789 |
return NULL; |
783 |
} |
790 |
} |
784 |
|
791 |
|
|
|
792 |
static const char *add_ignore_header(cmd_parms *parms, void *dummy, |
793 |
const char *header) |
794 |
{ |
795 |
cache_server_conf *conf; |
796 |
char **new; |
797 |
|
798 |
conf = |
799 |
(cache_server_conf *)ap_get_module_config(parms->server->module_config, |
800 |
&cache_module); |
801 |
if (!strncasecmp(header, "None", 4)) { |
802 |
/* if header None is listed clear array */ |
803 |
conf->ignore_headers->nelts = 0; |
804 |
} |
805 |
else { |
806 |
if ((conf->ignore_headers_set == CACHE_IGNORE_HEADERS_UNSET) || |
807 |
(conf->ignore_headers->nelts)) { |
808 |
/* Only add header if no "None" has been found in header list |
809 |
* so far. |
810 |
*/ |
811 |
new = (char **)apr_array_push(conf->ignore_headers); |
812 |
(*new) = header; |
813 |
} |
814 |
} |
815 |
conf->ignore_headers_set = CACHE_IGNORE_HEADERS_SET; |
816 |
return NULL; |
817 |
} |
818 |
|
785 |
static const char *add_cache_enable(cmd_parms *parms, void *dummy, |
819 |
static const char *add_cache_enable(cmd_parms *parms, void *dummy, |
786 |
const char *type, |
820 |
const char *type, |
787 |
const char *url) |
821 |
const char *url) |
Lines 914-919
static const command_rec cache_cmds[] =
Link Here
|
914 |
NULL, |
948 |
NULL, |
915 |
RSRC_CONF, |
949 |
RSRC_CONF, |
916 |
"Ignore requests from the client for uncached content"), |
950 |
"Ignore requests from the client for uncached content"), |
|
|
951 |
AP_INIT_ITERATE("CacheIgnoreHeaders", add_ignore_header, NULL, RSRC_CONF, |
952 |
"A space separated list of headers that should not be stored by the cache"), |
917 |
AP_INIT_TAKE1("CacheLastModifiedFactor", set_cache_factor, NULL, RSRC_CONF, |
953 |
AP_INIT_TAKE1("CacheLastModifiedFactor", set_cache_factor, NULL, RSRC_CONF, |
918 |
"The factor used to estimate Expires date from " |
954 |
"The factor used to estimate Expires date from " |
919 |
"LastModified date"), |
955 |
"LastModified date"), |