Add IS_NEW and IS_EXPIRED collection variables. See #345.

This commit is contained in:
brectanus
2007-12-12 22:52:08 +00:00
parent 2203428507
commit 54cac6461b
4 changed files with 72 additions and 8 deletions

View File

@@ -1322,6 +1322,22 @@ static apr_status_t init_collection(modsec_rec *msr, const char *real_col_name,
var->value = "0";
var->value_len = strlen(var->value);
apr_table_setn(table, var->name, (void *)var);
/* This is a new collection. */
var = apr_pcalloc(msr->mp, sizeof(msc_string));
var->name = "IS_NEW";
var->name_len = strlen(var->name);
var->value = "1";
var->value_len = strlen(var->value);
apr_table_setn(table, var->name, (void *)var);
/* It has not yet expired. */
var = apr_pcalloc(msr->mp, sizeof(msc_string));
var->name = "IS_EXPIRED";
var->name_len = strlen(var->name);
var->value = "0";
var->value_len = strlen(var->value);
apr_table_setn(table, var->name, (void *)var);
}
/* Add the collection to the list. */