158#define APR_WANT_STRFUNC
177#define DIR_CMD_PERMS OR_INDEXES
181#define ACTIVE_DONTCARE 2
183module AP_MODULE_DECLARE_DATA expires_module;
191 new->expiresdefault =
NULL;
224 if ((
code[0] ==
'A') || (
code[0] ==
'M')) {
243 return apr_pstrcat(
p,
"bad expires code, unrecognised <base> '",
263 return apr_pstrcat(
p,
"bad expires code, numeric value expected <num> '",
270 if (
word[0] ==
'\0') {
275 factor = 60 * 60 * 24 * 365;
278 factor = 60 * 60 * 24 * 30;
281 factor = 60 * 60 * 24 * 7;
284 factor = 60 * 60 * 24;
296 return apr_pstrcat(
p,
"bad expires code, unrecognised <type>",
321 return "Invalid mimetype: should contain a slash";
323 if ((strlen(++
check) == 1) && (*
check ==
'*')) {
332 "'ExpiresByType ",
mime,
" ",
code,
"': ", response,
NULL);
346 "'ExpiresDefault ",
code,
"': ", response,
NULL);
352 "Limited to 'on' or 'off'"),
354 "a MIME type followed by an expiry date code"),
356 "an expiry date code"),
370 new->active = add->
active;
377 new->expiresdefault =
base->expiresdefault;
381 base->expiresbytype);
424 "internal error: bad expires code: %s",
r->
filename);
470 if (expiry !=
NULL) {
477 if (expiry ==
NULL) {
485 if (expiry ==
NULL) {
500 if (strlen(++
spos) > 0) {
518 if (expiry !=
NULL) {
Symbol export macros and hook functions.
APR general purpose library routines.
APR Standard Headers Support.
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)
#define ap_get_module_config(v, m)
#define AP_DECLARE_MODULE(foo)
#define AP_INIT_FLAG(directive, func, mconfig, where, help)
#define AP_INIT_TAKE2(directive, func, mconfig, where, help)
apr_status_t ap_pass_brigade(ap_filter_t *filter, apr_bucket_brigade *bucket)
ap_filter_rec_t * ap_register_output_filter(const char *name, ap_out_filter_func filter_func, ap_init_filter_func filter_init, ap_filter_type ftype)
ap_filter_t * ap_add_output_filter(const char *name, void *ctx, request_rec *r, conn_rec *c)
void ap_remove_output_filter(ap_filter_t *f)
void ap_hook_insert_error_filter(ap_HOOK_insert_error_filter_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_insert_filter(ap_HOOK_insert_filter_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define HTTP_INTERNAL_SERVER_ERROR
#define ap_is_HTTP_ERROR(x)
#define STANDARD20_MODULE_STUFF
#define ap_strrchr_c(s, c)
char * ap_field_noparam(apr_pool_t *p, const char *intype)
char * ap_getword_conf(apr_pool_t *p, const char **line)
int strncasecmp(const char *a, const char *b, size_t n)
apr_interval_time_t apr_int32_t * num
#define apr_pcalloc(p, size)
#define APR_RFC822_DATE_LEN
#define apr_time_sec(time)
#define apr_time_from_sec(sec)
static int set_expiration_fields(request_rec *r, const char *code, apr_table_t *t)
static const char * set_expiresbytype(cmd_parms *cmd, void *in_dir_config, const char *mime, const char *code)
static void * merge_expires_dir_configs(apr_pool_t *p, void *basev, void *addv)
static const char * set_expiresdefault(cmd_parms *cmd, void *in_dir_config, const char *code)
static const command_rec expires_cmds[]
static void register_hooks(apr_pool_t *p)
static void expires_insert_filter(request_rec *r)
static void * create_dir_expires_config(apr_pool_t *p, char *dummy)
static apr_status_t expires_filter(ap_filter_t *f, apr_bucket_brigade *b)
static const char * set_expiresactive(cmd_parms *cmd, void *in_dir_config, int arg)
static char * check_code(apr_pool_t *p, const char *code, char **real_code)
The representation of a filter chain.
apr_table_t * expiresbytype
A structure that represents the current request.
const char * content_type
apr_table_t * err_headers_out
struct ap_conf_vector_t * per_dir_config
apr_table_t * headers_out
apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)