2016-03-19 15:14:35 +00:00
|
|
|
#include "first.h"
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
#include "base.h"
|
2019-10-26 05:22:13 +00:00
|
|
|
#include "array.h"
|
2005-02-20 14:27:00 +00:00
|
|
|
#include "buffer.h"
|
2019-10-26 05:22:13 +00:00
|
|
|
#include "log.h"
|
2018-09-09 05:50:33 +00:00
|
|
|
#include "http_header.h"
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
#include "plugin.h"
|
2005-08-08 08:22:06 +00:00
|
|
|
#include "stat_cache.h"
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2020-11-22 07:41:11 +00:00
|
|
|
#include "sys-time.h"
|
2009-10-11 14:31:42 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
/**
|
2019-10-26 05:22:13 +00:00
|
|
|
* set HTTP headers Cache-Control and Expires
|
2005-02-20 14:27:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct {
|
2019-10-26 05:22:13 +00:00
|
|
|
const array *expire_url;
|
|
|
|
const array *expire_mimetypes;
|
2005-02-20 14:27:00 +00:00
|
|
|
} plugin_config;
|
|
|
|
|
|
|
|
typedef struct {
|
2019-10-26 05:22:13 +00:00
|
|
|
PLUGIN_DATA;
|
|
|
|
plugin_config defaults;
|
|
|
|
plugin_config conf;
|
2019-12-07 21:30:04 +00:00
|
|
|
time_t *toffsets;
|
|
|
|
uint32_t tused;
|
2005-02-20 14:27:00 +00:00
|
|
|
} plugin_data;
|
|
|
|
|
|
|
|
INIT_FUNC(mod_expire_init) {
|
2019-10-26 05:22:13 +00:00
|
|
|
return calloc(1, sizeof(plugin_data));
|
2005-02-20 14:27:00 +00:00
|
|
|
}
|
|
|
|
|
2019-12-07 21:30:04 +00:00
|
|
|
FREE_FUNC(mod_expire_free) {
|
|
|
|
plugin_data * const p = p_d;
|
|
|
|
free(p->toffsets);
|
|
|
|
}
|
|
|
|
|
|
|
|
static time_t mod_expire_get_offset(log_error_st *errh, const buffer *expire, time_t *offset) {
|
2005-02-20 14:27:00 +00:00
|
|
|
char *ts;
|
2019-12-07 21:30:04 +00:00
|
|
|
time_t type = -1;
|
2009-05-10 12:20:19 +00:00
|
|
|
time_t retts = 0;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
|
|
|
/*
|
2005-02-20 14:27:00 +00:00
|
|
|
* parse
|
2006-10-04 13:26:23 +00:00
|
|
|
*
|
2006-12-19 15:11:04 +00:00
|
|
|
* '(access|now|modification) [plus] {<num> <type>}*'
|
2006-10-04 13:26:23 +00:00
|
|
|
*
|
2005-02-20 14:27:00 +00:00
|
|
|
* e.g. 'access 1 years'
|
|
|
|
*/
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2015-02-08 19:10:44 +00:00
|
|
|
if (buffer_string_is_empty(expire)) {
|
2019-11-25 06:54:08 +00:00
|
|
|
log_error(errh, __FILE__, __LINE__, "mod_expire empty string");
|
2005-02-20 14:27:00 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
ts = expire->ptr;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
if (0 == strncmp(ts, "access ", 7)) {
|
|
|
|
type = 0;
|
|
|
|
ts += 7;
|
2006-12-19 15:11:04 +00:00
|
|
|
} else if (0 == strncmp(ts, "now ", 4)) {
|
|
|
|
type = 0;
|
|
|
|
ts += 4;
|
2005-02-20 14:27:00 +00:00
|
|
|
} else if (0 == strncmp(ts, "modification ", 13)) {
|
2005-02-28 17:24:05 +00:00
|
|
|
type = 1;
|
2005-02-20 14:27:00 +00:00
|
|
|
ts += 13;
|
|
|
|
} else {
|
|
|
|
/* invalid type-prefix */
|
2019-11-25 06:54:08 +00:00
|
|
|
log_error(errh, __FILE__, __LINE__, "invalid <base>: %s", ts);
|
2005-02-20 14:27:00 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
if (0 == strncmp(ts, "plus ", 5)) {
|
|
|
|
/* skip the optional plus */
|
|
|
|
ts += 5;
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2006-12-19 15:11:04 +00:00
|
|
|
/* the rest is just <number> (years|months|weeks|days|hours|minutes|seconds) */
|
2005-02-20 14:27:00 +00:00
|
|
|
while (1) {
|
|
|
|
char *space, *err;
|
|
|
|
int num;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
if (NULL == (space = strchr(ts, ' '))) {
|
2019-11-25 06:54:08 +00:00
|
|
|
log_error(errh, __FILE__, __LINE__,
|
|
|
|
"missing space after <num>: %s", ts);
|
2005-02-20 14:27:00 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
num = strtol(ts, &err, 10);
|
|
|
|
if (*err != ' ') {
|
2019-11-25 06:54:08 +00:00
|
|
|
log_error(errh, __FILE__, __LINE__,
|
|
|
|
"missing <type> after <num>: %s", ts);
|
2005-02-20 14:27:00 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
ts = space + 1;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
if (NULL != (space = strchr(ts, ' '))) {
|
|
|
|
int slen;
|
|
|
|
/* */
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
slen = space - ts;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
|
|
|
if (slen == 5 &&
|
2005-02-20 14:27:00 +00:00
|
|
|
0 == strncmp(ts, "years", slen)) {
|
|
|
|
num *= 60 * 60 * 24 * 30 * 12;
|
|
|
|
} else if (slen == 6 &&
|
|
|
|
0 == strncmp(ts, "months", slen)) {
|
|
|
|
num *= 60 * 60 * 24 * 30;
|
2006-12-19 15:11:04 +00:00
|
|
|
} else if (slen == 5 &&
|
|
|
|
0 == strncmp(ts, "weeks", slen)) {
|
|
|
|
num *= 60 * 60 * 24 * 7;
|
2005-02-20 14:27:00 +00:00
|
|
|
} else if (slen == 4 &&
|
|
|
|
0 == strncmp(ts, "days", slen)) {
|
|
|
|
num *= 60 * 60 * 24;
|
|
|
|
} else if (slen == 5 &&
|
|
|
|
0 == strncmp(ts, "hours", slen)) {
|
|
|
|
num *= 60 * 60;
|
|
|
|
} else if (slen == 7 &&
|
|
|
|
0 == strncmp(ts, "minutes", slen)) {
|
|
|
|
num *= 60;
|
|
|
|
} else if (slen == 7 &&
|
|
|
|
0 == strncmp(ts, "seconds", slen)) {
|
|
|
|
num *= 1;
|
|
|
|
} else {
|
2019-11-25 06:54:08 +00:00
|
|
|
log_error(errh, __FILE__, __LINE__, "unknown type: %s", ts);
|
2005-02-20 14:27:00 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
retts += num;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
ts = space + 1;
|
|
|
|
} else {
|
|
|
|
if (0 == strcmp(ts, "years")) {
|
|
|
|
num *= 60 * 60 * 24 * 30 * 12;
|
|
|
|
} else if (0 == strcmp(ts, "months")) {
|
|
|
|
num *= 60 * 60 * 24 * 30;
|
2006-12-19 15:11:04 +00:00
|
|
|
} else if (0 == strcmp(ts, "weeks")) {
|
|
|
|
num *= 60 * 60 * 24 * 7;
|
2005-02-20 14:27:00 +00:00
|
|
|
} else if (0 == strcmp(ts, "days")) {
|
|
|
|
num *= 60 * 60 * 24;
|
|
|
|
} else if (0 == strcmp(ts, "hours")) {
|
|
|
|
num *= 60 * 60;
|
|
|
|
} else if (0 == strcmp(ts, "minutes")) {
|
|
|
|
num *= 60;
|
|
|
|
} else if (0 == strcmp(ts, "seconds")) {
|
|
|
|
num *= 1;
|
|
|
|
} else {
|
2019-11-25 06:54:08 +00:00
|
|
|
log_error(errh, __FILE__, __LINE__, "unknown type: %s", ts);
|
2005-02-20 14:27:00 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
retts += num;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2019-12-07 21:30:04 +00:00
|
|
|
*offset = retts;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
2019-10-26 05:22:13 +00:00
|
|
|
static void mod_expire_merge_config_cpv(plugin_config * const pconf, const config_plugin_value_t * const cpv) {
|
|
|
|
switch (cpv->k_id) { /* index into static config_plugin_keys_t cpk[] */
|
|
|
|
case 0: /* expire.url */
|
|
|
|
pconf->expire_url = cpv->v.a;
|
|
|
|
break;
|
|
|
|
case 1: /* expire.mimetypes */
|
|
|
|
pconf->expire_mimetypes = cpv->v.a;
|
|
|
|
break;
|
|
|
|
default:/* should not happen */
|
|
|
|
return;
|
|
|
|
}
|
2005-02-20 14:27:00 +00:00
|
|
|
}
|
|
|
|
|
2019-10-26 05:22:13 +00:00
|
|
|
static void mod_expire_merge_config(plugin_config * const pconf, const config_plugin_value_t *cpv) {
|
|
|
|
do {
|
|
|
|
mod_expire_merge_config_cpv(pconf, cpv);
|
|
|
|
} while ((++cpv)->k_id != -1);
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2020-01-13 02:51:12 +00:00
|
|
|
static void mod_expire_patch_config(request_st * const r, plugin_data * const p) {
|
2020-01-11 16:07:43 +00:00
|
|
|
p->conf = p->defaults; /* copy small struct instead of memcpy() */
|
|
|
|
/*memcpy(&p->conf, &p->defaults, sizeof(plugin_config));*/
|
2019-10-26 05:22:13 +00:00
|
|
|
for (int i = 1, used = p->nconfig; i < used; ++i) {
|
2020-01-13 02:51:12 +00:00
|
|
|
if (config_check_cond(r, (uint32_t)p->cvlist[i].k_id))
|
2019-10-26 05:22:13 +00:00
|
|
|
mod_expire_merge_config(&p->conf, p->cvlist + p->cvlist[i].v.u2[0]);
|
|
|
|
}
|
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2019-10-26 05:22:13 +00:00
|
|
|
SETDEFAULTS_FUNC(mod_expire_set_defaults) {
|
|
|
|
static const config_plugin_keys_t cpk[] = {
|
|
|
|
{ CONST_STR_LEN("expire.url"),
|
2019-12-08 00:15:55 +00:00
|
|
|
T_CONFIG_ARRAY_KVSTRING,
|
2019-10-26 05:22:13 +00:00
|
|
|
T_CONFIG_SCOPE_CONNECTION }
|
|
|
|
,{ CONST_STR_LEN("expire.mimetypes"),
|
2019-12-08 00:15:55 +00:00
|
|
|
T_CONFIG_ARRAY_KVSTRING,
|
2019-10-26 05:22:13 +00:00
|
|
|
T_CONFIG_SCOPE_CONNECTION }
|
|
|
|
,{ NULL, 0,
|
|
|
|
T_CONFIG_UNSET,
|
|
|
|
T_CONFIG_SCOPE_UNSET }
|
|
|
|
};
|
|
|
|
|
|
|
|
plugin_data * const p = p_d;
|
|
|
|
if (!config_plugin_values_init(srv, p, cpk, "mod_expire"))
|
|
|
|
return HANDLER_ERROR;
|
|
|
|
|
|
|
|
/* process and validate config directives
|
|
|
|
* (init i to 0 if global context; to 1 to skip empty global context) */
|
|
|
|
for (int i = !p->cvlist[0].v.u2[1]; i < p->nconfig; ++i) {
|
|
|
|
const config_plugin_value_t *cpv = p->cvlist + p->cvlist[i].v.u2[0];
|
|
|
|
for (; -1 != cpv->k_id; ++cpv) {
|
2019-12-07 21:30:04 +00:00
|
|
|
const array *a = NULL;
|
2019-10-26 05:22:13 +00:00
|
|
|
switch (cpv->k_id) {
|
|
|
|
case 0: /* expire.url */
|
2019-12-07 21:30:04 +00:00
|
|
|
a = cpv->v.a;
|
2019-10-26 05:22:13 +00:00
|
|
|
break;
|
|
|
|
case 1: /* expire.mimetypes */
|
|
|
|
for (uint32_t k = 0; k < cpv->v.a->used; ++k) {
|
|
|
|
data_string *ds = (data_string *)cpv->v.a->data[k];
|
|
|
|
/*(omit trailing '*', if present, from prefix match)*/
|
|
|
|
/*(not usually a good idea to modify array keys
|
|
|
|
* since doing so might break array_get_element_klen()
|
2019-12-07 21:30:04 +00:00
|
|
|
* search; config should be consistent in using * or not)*/
|
2019-10-26 05:22:13 +00:00
|
|
|
size_t klen = buffer_string_length(&ds->key);
|
|
|
|
if (klen && ds->key.ptr[klen-1] == '*')
|
|
|
|
buffer_string_set_length(&ds->key, klen-1);
|
2019-12-07 21:30:04 +00:00
|
|
|
}
|
|
|
|
a = cpv->v.a;
|
|
|
|
break;
|
|
|
|
default:/* should not happen */
|
|
|
|
break;
|
|
|
|
}
|
2019-10-26 05:22:13 +00:00
|
|
|
|
2019-12-07 21:30:04 +00:00
|
|
|
/* parse array values into structured data */
|
|
|
|
if (NULL != a && a->used) {
|
|
|
|
p->toffsets =
|
|
|
|
realloc(p->toffsets, sizeof(time_t) * (p->tused + a->used*2));
|
|
|
|
time_t *toff = p->toffsets + p->tused;
|
|
|
|
for (uint32_t k = 0; k < a->used; ++k, toff+=2, p->tused+=2) {
|
|
|
|
buffer *v = &((data_string *)a->data[k])->value;
|
|
|
|
*toff = mod_expire_get_offset(srv->errh, v, toff+1);
|
|
|
|
if (-1 == *toff) {
|
2019-10-26 05:22:13 +00:00
|
|
|
log_error(srv->errh, __FILE__, __LINE__,
|
2019-12-07 21:30:04 +00:00
|
|
|
"parsing %s failed: %s", cpk[cpv->k_id].k, v->ptr);
|
2019-10-26 05:22:13 +00:00
|
|
|
return HANDLER_ERROR;
|
|
|
|
}
|
2019-12-07 21:30:04 +00:00
|
|
|
/* overwrite v->used with offset int p->toffsets
|
|
|
|
* as v->ptr is not used by this module after config */
|
|
|
|
v->used = (uint32_t)p->tused;
|
2019-10-26 05:22:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* initialize p->defaults from global config context */
|
|
|
|
if (p->nconfig > 0 && p->cvlist->v.u2[1]) {
|
|
|
|
const config_plugin_value_t *cpv = p->cvlist + p->cvlist->v.u2[0];
|
|
|
|
if (-1 != cpv->k_id)
|
|
|
|
mod_expire_merge_config(&p->defaults, cpv);
|
|
|
|
}
|
|
|
|
|
|
|
|
return HANDLER_GO_ON;
|
2005-02-20 14:27:00 +00:00
|
|
|
}
|
|
|
|
|
2020-01-13 02:51:12 +00:00
|
|
|
REQUEST_FUNC(mod_expire_handler) {
|
2005-02-20 14:27:00 +00:00
|
|
|
plugin_data *p = p_d;
|
2019-10-10 03:24:25 +00:00
|
|
|
const buffer *vb;
|
|
|
|
const data_string *ds;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2016-10-20 14:11:54 +00:00
|
|
|
/* Add caching headers only to http_status 200 OK or 206 Partial Content */
|
2020-01-13 02:51:12 +00:00
|
|
|
if (r->http_status != 200 && r->http_status != 206) return HANDLER_GO_ON;
|
2016-10-20 14:11:54 +00:00
|
|
|
/* Add caching headers only to GET or HEAD requests */
|
2020-01-13 02:51:12 +00:00
|
|
|
if (!http_method_get_or_head(r->http_method)) return HANDLER_GO_ON;
|
2016-10-20 14:11:54 +00:00
|
|
|
/* Add caching headers only if not already present */
|
2020-01-13 02:51:12 +00:00
|
|
|
vb = http_header_response_get(r, HTTP_HEADER_CACHE_CONTROL, CONST_STR_LEN("Cache-Control"));
|
2018-09-09 05:50:33 +00:00
|
|
|
if (NULL != vb) return HANDLER_GO_ON;
|
2016-10-20 14:11:54 +00:00
|
|
|
|
2020-01-13 02:51:12 +00:00
|
|
|
mod_expire_patch_config(r, p);
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2016-10-20 14:11:54 +00:00
|
|
|
/* check expire.url */
|
2019-10-26 05:22:13 +00:00
|
|
|
ds = p->conf.expire_url
|
2020-01-13 02:51:12 +00:00
|
|
|
? (const data_string *)array_match_key_prefix(p->conf.expire_url, &r->uri.path)
|
2019-10-26 05:22:13 +00:00
|
|
|
: NULL;
|
2019-12-07 21:30:04 +00:00
|
|
|
/* check expire.mimetypes (if no match with expire.url) */
|
|
|
|
if (NULL == ds) {
|
2019-10-26 05:22:13 +00:00
|
|
|
if (NULL == p->conf.expire_mimetypes) return HANDLER_GO_ON;
|
2020-01-13 02:51:12 +00:00
|
|
|
vb = http_header_response_get(r, HTTP_HEADER_CONTENT_TYPE, CONST_STR_LEN("Content-Type"));
|
2018-09-16 21:27:54 +00:00
|
|
|
ds = (NULL != vb)
|
2019-10-10 03:24:25 +00:00
|
|
|
? (const data_string *)array_match_key_prefix(p->conf.expire_mimetypes, vb)
|
|
|
|
: (const data_string *)array_get_element_klen(p->conf.expire_mimetypes, CONST_STR_LEN(""));
|
2018-09-16 21:27:54 +00:00
|
|
|
if (NULL == ds) return HANDLER_GO_ON;
|
2016-10-20 14:11:54 +00:00
|
|
|
}
|
|
|
|
|
2019-12-07 21:30:04 +00:00
|
|
|
const time_t * const off = p->toffsets + ds->value.used;
|
|
|
|
const time_t cur_ts = log_epoch_secs;
|
|
|
|
time_t expires = off[1];
|
|
|
|
if (0 == off[0]) { /* access */
|
|
|
|
expires += cur_ts;
|
|
|
|
}
|
|
|
|
else { /* modification */
|
2020-10-13 17:57:37 +00:00
|
|
|
const stat_cache_st * const st = stat_cache_path_stat(&r->physical.path);
|
2019-12-07 21:30:04 +00:00
|
|
|
/* can't set modification-based expire if mtime is not available */
|
2020-10-13 17:57:37 +00:00
|
|
|
if (NULL == st) return HANDLER_GO_ON;
|
|
|
|
expires += st->st_mtime;
|
2019-12-07 21:30:04 +00:00
|
|
|
}
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2019-12-04 06:35:27 +00:00
|
|
|
/* expires should be at least cur_ts */
|
|
|
|
if (expires < cur_ts) expires = cur_ts;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2020-01-13 02:51:12 +00:00
|
|
|
buffer * const tb = r->tmp_buf;
|
2020-11-22 07:41:11 +00:00
|
|
|
struct tm tm;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
|
|
|
/* HTTP/1.0 */
|
2019-12-04 06:35:27 +00:00
|
|
|
buffer_clear(tb);
|
2020-11-22 07:41:11 +00:00
|
|
|
buffer_append_strftime(tb, "%a, %d %b %Y %H:%M:%S GMT", gmtime_r(&expires, &tm));
|
2020-09-13 02:23:16 +00:00
|
|
|
http_header_response_set(r, HTTP_HEADER_EXPIRES,
|
|
|
|
CONST_STR_LEN("Expires"),
|
|
|
|
CONST_BUF_LEN(tb));
|
2005-11-01 07:48:04 +00:00
|
|
|
|
2006-10-04 13:26:23 +00:00
|
|
|
/* HTTP/1.1 */
|
2019-12-04 06:35:27 +00:00
|
|
|
buffer_copy_string_len(tb, CONST_STR_LEN("max-age="));
|
|
|
|
buffer_append_int(tb, expires - cur_ts); /* as expires >= cur_ts the difference is >= 0 */
|
2020-01-13 02:51:12 +00:00
|
|
|
http_header_response_set(r, HTTP_HEADER_CACHE_CONTROL, CONST_STR_LEN("Cache-Control"), CONST_BUF_LEN(tb));
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
return HANDLER_GO_ON;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-03-07 21:05:37 +00:00
|
|
|
int mod_expire_plugin_init(plugin *p);
|
2005-02-20 14:27:00 +00:00
|
|
|
int mod_expire_plugin_init(plugin *p) {
|
|
|
|
p->version = LIGHTTPD_VERSION_ID;
|
2019-10-19 04:30:54 +00:00
|
|
|
p->name = "expire";
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
p->init = mod_expire_init;
|
2019-12-07 21:30:04 +00:00
|
|
|
p->cleanup = mod_expire_free;
|
|
|
|
p->set_defaults= mod_expire_set_defaults;
|
2016-10-20 14:11:54 +00:00
|
|
|
p->handle_response_start = mod_expire_handler;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
return 0;
|
|
|
|
}
|