]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
rename the mod_headers variables used to track onsuccess vs. always for clarity
authorEric Covener <covener@apache.org>
Fri, 5 Nov 2010 17:15:50 +0000 (17:15 +0000)
committerEric Covener <covener@apache.org>
Fri, 5 Nov 2010 17:15:50 +0000 (17:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031669 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_headers.c

index 6742489342d12e64eb595ab46b2195b98937618d..2e0c2813f0aee7321aca33fc12afb40437d37044 100644 (file)
@@ -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,