]> granicus.if.org Git - apache/commitdiff
Merge r1652955, r1652985, r1652989 from trunk:
authorEric Covener <covener@apache.org>
Wed, 15 Apr 2015 18:06:04 +0000 (18:06 +0000)
committerEric Covener <covener@apache.org>
Wed, 15 Apr 2015 18:06:04 +0000 (18:06 +0000)
    PR 57379: If mod_cgi and mod_cgid get installed,
    use IfModule for MPM to LoadModule mod_cgi for
    prefork and mod_cgid for all other MPMs.

    Previously when combined with --enable-load-all-modules
    both modules were loaded and it was undefined
    which one actually handled cgi requests.

    Based on a patch by olli hauer <ohauer gmx.de>.

    Addition to r1652955: Use "=" in combination
    with "test" instead of "==".

    Fix indentation and tab use after r1652955.

Submitted By: olli hauer <ohauer gmx.de>
Reviewed By: rjung, ylavic, covener

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1673909 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
Makefile.in
STATUS

diff --git a/CHANGES b/CHANGES
index 4bbabc753d3d1e953a55b6cf198c18d4264e100f..ec11a24759b9c34f602e4ae0ea72d93113d244a1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,9 @@ Changes with Apache 2.4.13
      calls r:wsupgrade() can cause a child process crash. 
      [Edward Lu <Chaosed0 gmail.com>]
 
+  *) build: Don't load mod_cgi and mod_cgid in the default configuration
+     if they're both built.  [olli hauer <ohauer gmx.de>]
+
   *) mod_logio: Add LogIOTrackTTFB and %^FB logformat to log the time 
      taken to start writing response headers. [Eric Covener]
 
index 09e971455a164ca259c3e8bdb376adbbd5ec353c..c1b08f9b552199653b6f63af7519bcea95e9ef5e 100644 (file)
@@ -58,6 +58,16 @@ install-conf:
                                        -e 's#@@SSLPort@@#$(SSLPORT)#g' \
                                        -e 'p' \
                                        < $$i; \
+                               if echo " $(DSO_MODULES) "|$(EGREP) " cgi " > /dev/null ; then \
+                                       have_cgi="1"; \
+                               else \
+                                       have_cgi="0"; \
+                               fi; \
+                               if echo " $(DSO_MODULES) "|$(EGREP) " cgid " > /dev/null ; then \
+                                       have_cgid="1"; \
+                               else \
+                                       have_cgid="0"; \
+                               fi; \
                                for j in $(DSO_MODULES) "^EOL^"; do \
                                        if test $$j != "^EOL^"; then \
                                                if echo ",$(ENABLED_DSO_MODULES),"|$(EGREP) ",$$j," > /dev/null ; then \
@@ -68,8 +78,18 @@ install-conf:
                                                if test "$(LOAD_ALL_MODULES)" = "yes"; then \
                                                        loading_disabled=""; \
                                                fi; \
-                                               echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
-                                       fi; \
+                                                       if test $$j = "cgid" -a "$$have_cgi" = "1"; then \
+                                                               echo "<IfModule !mpm_prefork_module>"; \
+                                                               echo "  $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+                                                               echo "</IfModule>"; \
+                                                       elif test $$j = "cgi" -a "$$have_cgid" = "1"; then \
+                                                               echo "<IfModule mpm_prefork_module>"; \
+                                                               echo "  $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+                                                               echo "</IfModule>"; \
+                                                       else \
+                                                               echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+                                                       fi; \
+                                               fi; \
                                done; \
                                sed -e '1,/@@LoadModule@@/d' \
                                        -e '/@@LoadModule@@/d' \
diff --git a/STATUS b/STATUS
index 6185342395608abedc238fe7b0e6af1913adb303..24e80119418d16d897de8fe9c220cad221e3b0fe 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -111,19 +111,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: trunk works (modulo CHANGES)
      +1: ylavic, rjung, trawick
 
-  *) mod_cgi, mod_cgid: If both modules get installed,
-     use IfModule for MPM to LoadModule mod_cgi for prefork
-     and mod_cgid for all other MPMs. PR 57379.
-     Previously when combined with --enable-load-all-modules
-     both modules were loaded and it was undefined
-     which one actually handled cgi requests.
-     Based on a patch by olli hauer <ohauer gmx.de>.
-     trunk patch: http://svn.apache.org/r1652955
-                  http://svn.apache.org/r1652985
-                  http://svn.apache.org/r1652989
-     2.4.x patch: trunk works
-     +1: rjung, ylavic, covener
-
   *) mod_proxy: Use the correct server name for SNI in case the backend
      SSL connection itself is established via a proxy server.  PR 57139
      trunk patch: http://svn.apache.org/r1634120