]> granicus.if.org Git - apache/commitdiff
Fix hook sorting for the pre_config hook.
authorStefan Fritsch <sf@apache.org>
Sat, 6 Nov 2010 11:11:17 +0000 (11:11 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 6 Nov 2010 11:11:17 +0000 (11:11 +0000)
Move modules/http/config2.m4 back to modules/http/config.m4, since this was
only done as work-around in r88887 for the broken hook-sorting.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032002 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/http/config.m4 [moved from modules/http/config2.m4 with 100% similarity]
server/main.c

diff --git a/CHANGES b/CHANGES
index 4019d5b7f122ad8aa501af1470390ae4b25ee1ec..737a1474c7ed68f9a760f5a3cc5f095631c828f4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@ Changes with Apache 2.3.9
      Fix a denial of service attack against mod_reqtimeout.
      [Stefan Fritsch]
 
+  *) core: Do the hook sorting earlier so that the hooks are properly sorted
+     for the pre_config hook and during parsing the config. [Stefan Fritsch] 
+
   *) core: In the absence of any AllowOverride directives, the default is now
      "None" instead of "All".  PR49823 [Eric Covener]
 
diff --git a/STATUS b/STATUS
index deff7098df88b86fbb188743a450ce4cd70895cb..357a130d59a170946f33a3543b29e49cad666845 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -153,19 +153,6 @@ RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
     wrowe suggests: it would be nice to see "MUST" v.s. "SHOULD" v.s. "MAY"
                     out of this list, without reviewing them individually.
 
-  * There is a bug in how we sort some hooks, at least the pre-config
-    hook.  The first time we call the hooks, they are in the correct 
-    order, but the second time, we don't sort them correctly.  Currently,
-    the modules/http/config.m4 file has been renamed to 
-    modules/http/config2.m4 to work around this problem, it should moved
-    back when this is fixed.
-
-      OtherBill offers that this is a SERIOUS problem.  We do not sort
-      correctly by the ordering arguments passed to the register hook
-      functions.  This was proven when I reordered the open_logs hook
-      to attempt to open the error logs prior to the access logs.  Possibly
-      the entire sorting code needs to be refactored.
-
   * pipes deadlock on all platforms with limited pipe buffers (e.g. both
     Linux and Win32, as opposed to only Win32 on 1.3).  The right solution
     is either GStein's proposal for a "CGI Brigade", or OtherBill's proposal
index aa9eb04ae98dea44afd655694a37705bca0baab0..19433716935795553d85c8581216e3f854c338c1 100644 (file)
@@ -617,6 +617,7 @@ int main(int argc, const char * const argv[])
     if (!ap_server_conf) {
         destroy_and_exit_process(process, 1);
     }
+    apr_hook_sort_all();
 
     if (ap_run_pre_config(pconf, plog, ptemp) != OK) {
         ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
@@ -629,7 +630,6 @@ 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);
-        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,
@@ -699,6 +699,7 @@ int main(int argc, const char * const argv[])
         if (!ap_server_conf) {
             destroy_and_exit_process(process, 1);
         }
+        apr_hook_sort_all();
 
         if (ap_run_pre_config(pconf, plog, ptemp) != OK) {
             ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
@@ -712,7 +713,6 @@ int main(int argc, const char * const argv[])
         }
         ap_fixup_virtual_hosts(pconf, ap_server_conf);
         ap_fini_vhost_config(pconf, ap_server_conf);
-        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,