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
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]
-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 \
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' \
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