75#define APR_WANT_STRFUNC
161module AP_MODULE_DECLARE_DATA headers_module;
222 t.loadavg5,
t.loadavg15);
278 while (*
s && *
s !=
'%') {
289 while (*
s && *
s !=
'%') {
342 if ((*
s ==
'%') || (*
s ==
'\0')) {
403 "Can't parse value expression : ",
err,
NULL);
428 const char *condition_var =
NULL;
461 return "first argument must be 'add', 'set', 'setifempty', 'append', 'merge', "
462 "'unset', 'echo', 'note', 'edit', or 'edit*'.";
466 return "Header edit requires a match and a substitution";
470 return "Header edit regex could not be compiled";
477 return "Too many arguments to directive";
484 return "header unset takes two arguments";
495 return "Header echo takes two arguments";
501 return "Header echo only valid on Header "
506 return "Header echo regex could not be compiled";
512 return "Header requires three arguments";
522 return "error: missing environment variable name. "
523 "envclause should be in the form env=envar ";
532 "Can't parse envclause/expression: ",
err,
547 new->condition_var = condition_var;
580 " has too many arguments",
NULL);
608 "Can't evaluate value expression: %s",
err);
616 for (
i = 0;
i <
hdr->ta->nelts;
i++) {
700 for (
i = 0;
i <
fixup->nelts; ++
i) {
702 const char *
envar =
hdr->condition_var;
718 "Failed to evaluate expression (%s) - ignoring",
737 switch (
hdr->action) {
762 while (*
val && *
val !=
',') {
854 if (
dirconf->fixup_err->nelts) {
866 "headers: ap_headers_output_filter()");
891 "headers: ap_headers_error_filter()");
917 if (
dirconf->fixup_in->nelts) {
929 if (
dirconf->fixup_in->nelts) {
933 if (
dirconf->fixup_err->nelts) {
937 if (
dirconf->fixup_out->nelts) {
945 "Regular expression replacement failed (replacement too long?)");
952 "an optional condition, an action, header and value "
953 "followed by optional env clause"),
955 "an action, header and value followed by optional env "
const char apr_size_t ap_regmatch_t * pmatch
APR-UTIL Buckets/Bucket Brigades.
APR general purpose library routines.
apr_size_t const unsigned char unsigned int unsigned int d
apr_array_append(apr_pool_t *p, const apr_array_header_t *first, const apr_array_header_t *second)
APR Standard Headers Support.
static apr_pool_t * pconf
#define ap_get_module_config(v, m)
void ap_hook_post_config(ap_HOOK_post_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_DECLARE_MODULE(foo)
#define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help)
void ap_hook_pre_config(ap_HOOK_pre_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
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_set_content_type_ex(request_rec *r, const char *ct, int trusted)
void ap_hook_post_read_request(ap_HOOK_post_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
const char * ap_ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *name)
void ap_hook_fixups(ap_HOOK_fixups_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)
apr_bucket apr_bucket_brigade * a
apr_pool_t apr_dbd_t apr_dbd_results_t ** res
const void apr_size_t int colon
#define AP_EXPR_FLAG_STRING_RESULT
#define ap_expr_parse_cmd(cmd, expr, flags, err, lookup_fn)
int ap_expr_exec(request_rec *r, const ap_expr_info_t *expr, const char **err)
const char * ap_expr_str_exec(request_rec *r, const ap_expr_info_t *expr, const char **err)
#define HTTP_INTERNAL_SERVER_ERROR
#define STANDARD20_MODULE_STUFF
int ap_cstr_casecmp(const char *s1, const char *s2)
void ap_get_loadavg(ap_loadavg_t *ld)
char * ap_getword(apr_pool_t *p, const char **line, char stop)
#define ap_strchr_c(s, c)
char * ap_pregsub(apr_pool_t *p, const char *input, const char *source, apr_size_t nmatch, ap_regmatch_t pmatch[])
ap_regex_t * ap_pregcomp(apr_pool_t *p, const char *pattern, int cflags)
void ap_get_sload(ap_sload_t *ld)
char * ap_getword_conf(apr_pool_t *p, const char **line)
int strcasecmp(const char *a, const char *b)
int strncasecmp(const char *a, const char *b, size_t n)
#define apr_pcalloc(p, size)
apr_int32_t apr_int32_t apr_int32_t err
const char const char *const * args
The representation of a filter chain.
A structure to hold various server loadavg.
A structure to hold server load params.
A structure that represents the current request.
const char * content_type
apr_table_t * err_headers_out
apr_table_t * subprocess_env
struct ap_conf_vector_t * per_dir_config
apr_table_t * headers_out
A structure to store information for each virtual server.