httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r796567 - /httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c
Date Tue, 21 Jul 2009 22:14:19 GMT
Author: wrowe
Date: Tue Jul 21 22:14:19 2009
New Revision: 796567

URL: http://svn.apache.org/viewvc?rev=796567&view=rev
Log:
server merge optimization, do not duplicate identical tables

Modified:
    httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c

Modified: httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c?rev=796567&r1=796566&r2=796567&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c (original)
+++ httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c Tue Jul 21 22:14:19 2009
@@ -133,13 +133,16 @@
 
     /* Merge pass headers */
     if (local->pass_headers != NULL || base->pass_headers != NULL) {
-        merged_config->pass_headers =
-            apr_array_make(p, 10, sizeof(const char *));
-        if (base->pass_headers != NULL)
-            apr_array_cat(merged_config->pass_headers, base->pass_headers);
-        if (local->pass_headers != NULL)
+        if (local->pass_headers == NULL)
+            merged_config->pass_headers = base->pass_headers;
+        else if (base->pass_headers == NULL)
+            merged_config->pass_headers = local->pass_headers;
+        else {
+            merged_config->pass_headers = 
+                apr_array_copy(p, base->pass_headers);
             apr_array_cat(merged_config->pass_headers,
                           local->pass_headers);
+        }
     }
     // Merge the other configurations
     merged_config->ipc_comm_timeout = base->ipc_comm_timeout;



Mime
View raw message