From 7546061baec4bfcd68c7a471ab580df7a82ae620 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Wed, 15 Apr 2015 18:06:04 +0000 Subject: [PATCH] Merge r1652955, r1652985, r1652989 from trunk: 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 . Addition to r1652955: Use "=" in combination with "test" instead of "==". Fix indentation and tab use after r1652955. Submitted By: olli hauer 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 | 3 +++ Makefile.in | 24 ++++++++++++++++++++++-- STATUS | 13 ------------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/CHANGES b/CHANGES index 4bbabc753d..ec11a24759 100644 --- 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 ] + *) build: Don't load mod_cgi and mod_cgid in the default configuration + if they're both built. [olli hauer ] + *) mod_logio: Add LogIOTrackTTFB and %^FB logformat to log the time taken to start writing response headers. [Eric Covener] diff --git a/Makefile.in b/Makefile.in index 09e971455a..c1b08f9b55 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 ""; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + echo ""; \ + elif test $$j = "cgi" -a "$$have_cgid" = "1"; then \ + echo ""; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + echo ""; \ + 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 6185342395..24e8011941 100644 --- 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 . - 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 -- 2.40.0