Changes with Apache 2.0.51
+ *) Extend the SetEnvIf directive to capture subexpressions of the
+ matched value. [André Malo]
+
*) Recursive Include directives no longer crash. The server stops
including configuration files after a certain nesting level (128
as distributed). This is configurable at compile time using the
APACHE 2.0 STATUS: -*-text-*-
-Last modified at [$Date: 2004/08/15 22:42:13 $]
+Last modified at [$Date: 2004/08/15 23:33:27 $]
Release:
-1: brianp (we need a more robust solution than what's in 2.1 right now),
jerenkrantz (should be fixed, but I don't have time to do this)
- * Extend the SetEnvIf directive to capture subexpressions of the
- matched value.
- modules/metadata/mod_setenvif.c r1.42, r1.43
- +1: nd, rederpj, trawick
-
* Allow mod_dav to do weak entity comparison functions.
modules/dav/main/util.c: r1.45
[ This one is under review. Don't merge. ]
}
else {
new->preg = ap_pregcomp(cmd->pool, regex,
- (REG_EXTENDED | REG_NOSUB
- | (icase ? REG_ICASE : 0)));
+ (REG_EXTENDED | (icase ? REG_ICASE : 0)));
if (new->preg == NULL) {
return apr_pstrcat(cmd->pool, cmd->cmd->name,
" regex could not be compiled.", NULL);
apr_size_t val_len = 0;
int i, j;
char *last_name;
+ regmatch_t regm[AP_MAX_REG_MATCH];
if (!ap_get_module_config(r->request_config, &setenvif_module)) {
ap_set_module_config(r->request_config, &setenvif_module,
}
if ((b->pattern && apr_strmatch(b->pattern, val, val_len)) ||
- (!b->pattern && !ap_regexec(b->preg, val, 0, NULL, 0))) {
+ (!b->pattern && !ap_regexec(b->preg, val, AP_MAX_REG_MATCH, regm,
+ 0))) {
const apr_array_header_t *arr = apr_table_elts(b->features);
elts = (const apr_table_entry_t *) arr->elts;
apr_table_unset(r->subprocess_env, elts[j].key);
}
else {
- apr_table_setn(r->subprocess_env, elts[j].key, elts[j].val);
+ if (!b->pattern) {
+ char *replaced = ap_pregsub(r->pool, elts[j].val, val,
+ AP_MAX_REG_MATCH, regm);
+ if (replaced) {
+ apr_table_setn(r->subprocess_env, elts[j].key,
+ replaced);
+ }
+ }
+ else {
+ apr_table_setn(r->subprocess_env, elts[j].key,
+ elts[j].val);
+ }
}
}
}