You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2009/07/22 00:14:19 UTC

svn commit: r796567 - /httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c

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;