You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2011/10/09 14:35:53 UTC

svn commit: r1180594 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/main.c

Author: jim
Date: Sun Oct  9 12:35:53 2011
New Revision: 1180594

URL: http://svn.apache.org/viewvc?rev=1180594&view=rev
Log:
fix 2.2.21 induced sorting bug

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/server/main.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1180594&r1=1180593&r2=1180594&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Sun Oct  9 12:35:53 2011
@@ -6,6 +6,9 @@ Changes with Apache 2.2.22
      specification, preventing unexpected expansion of target URLs in
      some reverse proxy configurations.  [Joe Orton]
 
+  *) core: Fix hook sorting for perl modules, a regression introduced in
+     2.2.21. PR: 45076. [Torsten Foertsch <torsten foertsch gmx net>]
+
   *) Fix a regression introduced by the CVE-2011-3192 byterange fix in 2.2.20:
      A range of '0-' will now return 206 instead of 200. PR 51878.
      [Jim Jagielski]

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1180594&r1=1180593&r2=1180594&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Sun Oct  9 12:35:53 2011
@@ -92,11 +92,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * core: Fix hook sorting for perl modules, a regression introduced in 2.2.21
-    Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1180325
-    2.2.x patch: http://people.apache.org/~sf/2.2_hook_sorting.diff
-    +1: sf, trawick, jim
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.2.x/server/main.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/main.c?rev=1180594&r1=1180593&r2=1180594&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/server/main.c (original)
+++ httpd/httpd/branches/2.2.x/server/main.c Sun Oct  9 12:35:53 2011
@@ -633,6 +633,7 @@ int main(int argc, const char * const ar
     if (!server_conf) {
         destroy_and_exit_process(process, 1);
     }
+    /* 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) {
@@ -646,6 +647,12 @@ int main(int argc, const char * const ar
     if (rv == OK) {
         ap_fixup_virtual_hosts(pconf, server_conf);
         ap_fini_vhost_config(pconf, server_conf);
+        /*
+         * Sort hooks again because ap_process_config_tree may have added
+         * modules and hence hooks. This happens with mod_perl and modules
+         * written in perl.
+         */
+        apr_hook_sort_all();
 
         if (configtestonly) {
             ap_run_test_config(pconf, server_conf);
@@ -704,6 +711,7 @@ int main(int argc, const char * const ar
         if (!server_conf) {
             destroy_and_exit_process(process, 1);
         }
+        /* 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) {
@@ -718,6 +726,12 @@ int main(int argc, const char * const ar
         }
         ap_fixup_virtual_hosts(pconf, server_conf);
         ap_fini_vhost_config(pconf, server_conf);
+        /*
+         * Sort hooks again because ap_process_config_tree may have added
+         * modules and hence hooks. This happens with mod_perl and modules
+         * written in perl.
+         */
+        apr_hook_sort_all();
         apr_pool_clear(plog);
         if (ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) {
             ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,