From: Eric Covener Date: Fri, 5 Nov 2010 17:15:50 +0000 (+0000) Subject: rename the mod_headers variables used to track onsuccess vs. always for clarity X-Git-Tag: 2.3.9~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5398ce8195c677feb8199acb234d7cd403c4c18d;p=thirdparty%2Fapache%2Fhttpd.git rename the mod_headers variables used to track onsuccess vs. always for clarity git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031669 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index 6742489342d..2e0c2813f0a 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -103,8 +103,8 @@ typedef enum { * magic cmd->info values */ static char hdr_in = '0'; /* RequestHeader */ -static char hdr_out = '1'; /* Header onsuccess */ -static char hdr_err = '2'; /* Header always */ +static char hdr_out_onsuccess = '1'; /* Header onsuccess */ +static char hdr_out_always = '2'; /* Header always */ /* Callback function type. */ typedef const char *format_tag_fn(request_rec *r, char *a); @@ -401,7 +401,7 @@ static APR_INLINE const char *header_inout_cmd(cmd_parms *cmd, ap_parse_node_t *expr = NULL; apr_array_header_t *fixup = (cmd->info == &hdr_in) - ? dirconf->fixup_in : (cmd->info == &hdr_err) + ? dirconf->fixup_in : (cmd->info == &hdr_out_always) ? dirconf->fixup_err : dirconf->fixup_out; @@ -463,7 +463,7 @@ static APR_INLINE const char *header_inout_cmd(cmd_parms *cmd, envclause = value; value = NULL; } - if (cmd->info != &hdr_out && cmd->info != &hdr_err) + if (cmd->info != &hdr_out_onsuccess && cmd->info != &hdr_out_always) return "Header echo only valid on Header " "directives"; else { @@ -521,9 +521,9 @@ static const char *header_cmd(cmd_parms *cmd, void *indirconf, const char *subs; action = ap_getword_conf(cmd->temp_pool, &args); - if (cmd->info == &hdr_out) { + if (cmd->info == &hdr_out_onsuccess) { if (!strcasecmp(action, "always")) { - cmd->info = &hdr_err; + cmd->info = &hdr_out_always; action = ap_getword_conf(cmd->temp_pool, &args); } else if (!strcasecmp(action, "onsuccess")) { @@ -860,7 +860,7 @@ static apr_status_t ap_headers_early(request_rec *r) static const command_rec headers_cmds[] = { - AP_INIT_RAW_ARGS("Header", header_cmd, &hdr_out, OR_FILEINFO, + AP_INIT_RAW_ARGS("Header", header_cmd, &hdr_out_onsuccess, OR_FILEINFO, "an optional condition, an action, header and value " "followed by optional env clause"), AP_INIT_RAW_ARGS("RequestHeader", header_cmd, &hdr_in, OR_FILEINFO,