httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r730835 - /httpd/httpd/trunk/server/core.c
Date Fri, 02 Jan 2009 20:09:00 GMT
Author: wrowe
Date: Fri Jan  2 12:08:59 2009
New Revision: 730835

URL: http://svn.apache.org/viewvc?rev=730835&view=rev
Log:
Clean up fugly initialization of AcceptFilter mappings

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=730835&r1=730834&r2=730835&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Fri Jan  2 12:08:59 2009
@@ -441,13 +441,10 @@
     conf->subreq_limit = 0;
 
     conf->protocol = NULL;
-    conf->accf_map = apr_table_make(a, 5);
-
-#ifdef APR_TCP_DEFER_ACCEPT
-    apr_table_set(conf->accf_map, "http", "data");
-    apr_table_set(conf->accf_map, "https", "data");
-#endif
+    conf->accf_map = is_virtual ? NULL : apr_table_make(a, 5);
 
+    /* A mapping only makes sense in the global context */
+    if (conf->accf_map) {
 #if APR_HAS_SO_ACCEPTFILTER
 #ifndef ACCEPT_FILTER_NAME
 #define ACCEPT_FILTER_NAME "httpready"
@@ -458,9 +455,13 @@
 #endif
 #endif
 #endif
-    apr_table_set(conf->accf_map, "http", ACCEPT_FILTER_NAME);
-    apr_table_set(conf->accf_map, "https", "dataready");
+    apr_table_setn(conf->accf_map, "http", ACCEPT_FILTER_NAME);
+    apr_table_setn(conf->accf_map, "https", "dataready");
+#else
+    apr_table_setn(conf->accf_map, "http", "data");
+    apr_table_setn(conf->accf_map, "https", "data");
 #endif
+    }
 
     conf->trace_enable = AP_TRACE_UNSET;
 



Mime
View raw message