summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2011-10-08 09:15:58 +0200
committerStefan Fritsch <sf@apache.org>2011-10-08 09:15:58 +0200
commita861cc3cfb74b50f57c6f1b8b4ac8d09bfa000fe (patch)
treef4fee3a390a397489959dd82d3fd4984e7b85a15
parentRebuild doc transformations. (diff)
downloadapache2-a861cc3cfb74b50f57c6f1b8b4ac8d09bfa000fe.tar.xz
apache2-a861cc3cfb74b50f57c6f1b8b4ac8d09bfa000fe.zip
Sort hooks twice, once before pre_config, once after ap_process_config_tree.
This fixes a regression with perl modules introduced by r1032002 PR: 45076 Submitted by: Torsten Foertsch <torsten foertsch gmx net> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180325 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--server/main.c14
2 files changed, 17 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index c63fa39bb3..6bd318f778 100644
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,9 @@ Changes with Apache 2.3.15
PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener,
<lowprio20 gmail.com>]
+ *) core: Fix hook sorting with perl modules. PR: 45076. [Torsten Foertsch
+ <torsten foertsch gmx net>]
+
*) core: Enforce LimitRequestFieldSize after multiple headers with the same
name have been merged. [Stefan Fritsch]
diff --git a/server/main.c b/server/main.c
index fbc4c84848..60208d28b9 100644
--- a/server/main.c
+++ b/server/main.c
@@ -618,6 +618,7 @@ int main(int argc, const char * const argv[])
}
apr_pool_cleanup_register(pconf, &ap_server_conf, ap_pool_cleanup_set_null,
apr_pool_cleanup_null);
+ /* sort hooks here to make sure pre_config hooks are sorted properly */
apr_hook_sort_all();
if (ap_run_pre_config(pconf, plog, ptemp) != OK) {
@@ -631,6 +632,12 @@ int main(int argc, const char * const argv[])
if (rv == OK) {
ap_fixup_virtual_hosts(pconf, ap_server_conf);
ap_fini_vhost_config(pconf, ap_server_conf);
+ /*
+ * Sort hooks again because ap_process_config_tree may have add modules
+ * and hence hooks. This happens with mod_perl and modules written in
+ * perl.
+ */
+ apr_hook_sort_all();
if (ap_run_check_config(pconf, plog, ptemp, ap_server_conf) != OK) {
ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
@@ -707,6 +714,7 @@ int main(int argc, const char * const argv[])
}
apr_pool_cleanup_register(pconf, &ap_server_conf,
ap_pool_cleanup_set_null, apr_pool_cleanup_null);
+ /* sort hooks here to make sure pre_config hooks are sorted properly */
apr_hook_sort_all();
if (ap_run_pre_config(pconf, plog, ptemp) != OK) {
@@ -721,6 +729,12 @@ int main(int argc, const char * const argv[])
}
ap_fixup_virtual_hosts(pconf, ap_server_conf);
ap_fini_vhost_config(pconf, ap_server_conf);
+ /*
+ * Sort hooks again because ap_process_config_tree may have add modules
+ * and hence hooks. This happens with mod_perl and modules written in
+ * perl.
+ */
+ apr_hook_sort_all();
if (ap_run_check_config(pconf, plog, ptemp, ap_server_conf) != OK) {
ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,