httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1031669 - /httpd/httpd/trunk/modules/metadata/mod_headers.c
Date Fri, 05 Nov 2010 17:15:50 GMT
Author: covener
Date: Fri Nov  5 17:15:50 2010
New Revision: 1031669

URL: http://svn.apache.org/viewvc?rev=1031669&view=rev
Log:
rename the mod_headers variables used to track onsuccess vs. always for clarity


Modified:
    httpd/httpd/trunk/modules/metadata/mod_headers.c

Modified: httpd/httpd/trunk/modules/metadata/mod_headers.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_headers.c?rev=1031669&r1=1031668&r2=1031669&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_headers.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_headers.c Fri Nov  5 17:15:50 2010
@@ -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_ino
     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_ino
             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 
     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(req
 
 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,



Mime
View raw message