]> granicus.if.org Git - apache/commitdiff
Merge r1757010, r1757011 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 6 Sep 2016 17:41:58 +0000 (17:41 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 6 Sep 2016 17:41:58 +0000 (17:41 +0000)
Delay some memory allocation in order to save 272 bytes in the 'request' memory pool if mod_status handler is triggered and is not able to handle the request

Fix <p> tag closing syntax
Submitted by: jailletc36
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1759476 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/generators/mod_status.c

diff --git a/STATUS b/STATUS
index 68fcf988fecbfca6683d331541c05bb5795bd6cd..cc105772c92856a15167f0aa3121d5a9e9a3754c 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -117,13 +117,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_status: Delay some memory allocation
-                 Fix <p> tag closing syntax
-     trunk patch: http://svn.apache.org/r1757010
-                  http://svn.apache.org/r1757011
-     2.4.x patch: trunk works
-     +1: jailletc36, jchampion, jim (will fix in 2.4)
-     jchampion: nitpick: r1757010 introduces trailing whitespace
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 4ff9df1988380f198e82ed153f99414005df7b47..70df1a100e861470916d2978b03ada436323f322 100644 (file)
@@ -195,7 +195,7 @@ static int status_handler(request_rec *r)
     long req_time;
     int short_report;
     int no_table_report;
-    worker_score *ws_record = apr_palloc(r->pool, sizeof *ws_record);
+    worker_score *ws_record;
     process_score *ps_record;
     char *stat_buffer;
     pid_t *pid_buffer, worker_pid;
@@ -293,6 +293,8 @@ static int status_handler(request_rec *r)
         }
     }
 
+    ws_record = apr_palloc(r->pool, sizeof *ws_record);
+
     for (i = 0; i < server_limit; ++i) {
 #ifdef HAVE_TIMES
         clock_t proc_tu = 0, proc_ts = 0, proc_tcu = 0, proc_tcs = 0;
@@ -621,7 +623,7 @@ static int status_handler(request_rec *r)
                  "\"<b><code>G</code></b>\" Gracefully finishing,<br /> \n"
                  "\"<b><code>I</code></b>\" Idle cleanup of worker, \n"
                  "\"<b><code>.</code></b>\" Open slot with no current process<br />\n"
-                 "<p />\n", r);
+                 "</p>\n", r);
         if (!ap_extended_status) {
             int j;
             int k = 0;