Lines Matching refs:cmd

249 static const char *add_envvars(cmd_parms *cmd, const char *args, sei_entry *new)
256 feature = ap_getword_conf(cmd->pool, &args);
262 var = ap_getword(cmd->pool, &feature, '=');
275 return apr_pstrcat(cmd->pool, "Missing envariable expression for ",
276 cmd->cmd->name, NULL);
282 static const char *add_setenvif_core(cmd_parms *cmd, void *mconfig,
295 * cmd->path == NULL means we're in server-wide context; otherwise,
298 sconf = (cmd->path != NULL)
300 : (sei_cfg_rec *) ap_get_module_config(cmd->server->module_config,
304 regex = ap_getword_conf(cmd->pool, &args);
306 return apr_pstrcat(cmd->pool, "Missing regular expression for ",
307 cmd->cmd->name, NULL);
327 icase = cmd->info == ICASE_MAGIC;
338 if ((simple_pattern = non_regex_pattern(cmd->pool, regex))) {
339 new->pattern = apr_strmatch_precompile(cmd->pool,
342 return apr_pstrcat(cmd->pool, cmd->cmd->name,
348 new->preg = ap_pregcomp(cmd->pool, regex,
351 return apr_pstrcat(cmd->pool, cmd->cmd->name,
356 new->features = apr_table_make(cmd->pool, 2);
383 if (is_header_regex(cmd->temp_pool, fname)) {
384 new->pnamereg = ap_pregcomp(cmd->pool, fname,
388 return apr_pstrcat(cmd->pool, cmd->cmd->name,
401 return add_envvars(cmd, args, new);
404 static const char *add_setenvif(cmd_parms *cmd, void *mconfig,
410 fname = ap_getword_conf(cmd->pool, &args);
412 return apr_pstrcat(cmd->pool, "Missing header-field name for ",
413 cmd->cmd->name, NULL);
415 return add_setenvif_core(cmd, mconfig, fname, args);
418 static const char *add_setenvifexpr(cmd_parms *cmd, void *mconfig,
428 * cmd->path == NULL means we're in server-wide context; otherwise,
431 sconf = (cmd->path != NULL)
433 : (sei_cfg_rec *) ap_get_module_config(cmd->server->module_config,
436 expr = ap_getword_conf(cmd->pool, &args);
438 return apr_pstrcat(cmd->pool, "Missing expression for ",
439 cmd->cmd->name, NULL);
443 new->features = apr_table_make(cmd->pool, 2);
448 new->expr = ap_expr_parse_cmd(cmd, expr, 0, &err, NULL);
450 return apr_psprintf(cmd->pool, "Could not parse expression \"%s\": %s",
453 return add_envvars(cmd, args, new);
461 static const char *add_browser(cmd_parms *cmd, void *mconfig, const char *args)
463 return add_setenvif_core(cmd, mconfig, "User-Agent", args);