httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1131463 - /httpd/httpd/trunk/server/core.c
Date Sat, 04 Jun 2011 18:43:36 GMT
Author: sf
Date: Sat Jun  4 18:43:35 2011
New Revision: 1131463

URL: http://svn.apache.org/viewvc?rev=1131463&view=rev
Log:
Use define'd names for constants

Modified:
    httpd/httpd/trunk/server/core.c

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1131463&r1=1131462&r2=1131463&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Sat Jun  4 18:43:35 2011
@@ -75,6 +75,10 @@
 /* valid in core-conf, but not in runtime r->used_path_info */
 #define AP_ACCEPT_PATHINFO_UNSET 3 
 
+#define AP_CONTENT_MD5_OFF   0 
+#define AP_CONTENT_MD5_ON    1 
+#define AP_CONTENT_MD5_UNSET 2 
+
 APR_HOOK_STRUCT(
     APR_HOOK_LINK(get_mgmt_items)
 )
@@ -126,7 +130,7 @@ static void *create_core_dir_config(apr_
     conf->override = OR_UNSET|OR_NONE;
     conf->override_opts = OPT_UNSET | OPT_ALL | OPT_SYM_OWNER | OPT_MULTI;
 
-    conf->content_md5 = 2;
+    conf->content_md5 = AP_CONTENT_MD5_UNSET;
     conf->accept_path_info = AP_ACCEPT_PATHINFO_UNSET;
 
     conf->use_canonical_name = USE_CANONICAL_NAME_UNSET;
@@ -251,11 +255,11 @@ static void *merge_core_dir_configs(apr_
         conf->hostname_lookups = new->hostname_lookups;
     }
 
-    if ((new->content_md5 & 2) == 0) {
+    if (new->content_md5 == AP_CONTENT_MD5_UNSET) {
         conf->content_md5 = new->content_md5;
     }
 
-    if (new->accept_path_info != 3) {
+    if (new->accept_path_info != AP_ACCEPT_PATHINFO_UNSET) {
         conf->accept_path_info = new->accept_path_info;
     }
 
@@ -2696,7 +2700,7 @@ static const char *set_content_md5(cmd_p
 {
     core_dir_config *d = d_;
 
-    d->content_md5 = arg != 0;
+    d->content_md5 = arg ? AP_CONTENT_MD5_ON : AP_CONTENT_MD5_OFF;
     return NULL;
 }
 
@@ -3985,7 +3989,7 @@ static int default_handler(request_rec *
 
     d = (core_dir_config *)ap_get_module_config(r->per_dir_config,
                                                 &core_module);
-    bld_content_md5 = (d->content_md5 & 1)
+    bld_content_md5 = (d->content_md5 == AP_CONTENT_MD5_ON)
                       && r->output_filters->frec->ftype != AP_FTYPE_RESOURCE;
 
     ap_allow_standard_methods(r, MERGE_ALLOW, M_GET, M_OPTIONS, M_POST, -1);



Mime
View raw message