]> granicus.if.org Git - apache/commitdiff
Followon to r1671397 for proxy server-status
authorRainer Jung <rjung@apache.org>
Thu, 9 Apr 2015 19:20:14 +0000 (19:20 +0000)
committerRainer Jung <rjung@apache.org>
Thu, 9 Apr 2015 19:20:14 +0000 (19:20 +0000)
in auto mode:
- don't show HTML legend
- Show correct worker name

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

modules/proxy/mod_proxy.c

index 609609f07ee84db62e8f52a64af7b76b4de41f17..e2698222a43eb4b4f90c641f59d1c498035110dd 100644 (file)
@@ -2745,7 +2745,7 @@ static int proxy_status_hook(request_rec *r, int flags)
             }
             else {
                 ap_rprintf(r, "ProxyBalancer[%d]Worker[%d]Name: %s\n",
-                           i, n, balancer->s->name);
+                           i, n, (*worker)->s->name);
                 ap_rprintf(r, "ProxyBalancer[%d]Worker[%d]Status: %s\n",
                            i, n, ap_proxy_parse_wstatus(r->pool, *worker));
                 ap_rprintf(r, "ProxyBalancer[%d]Worker[%d]Elected: %"
@@ -2763,19 +2763,21 @@ static int proxy_status_hook(request_rec *r, int flags)
         ap_rputs("</table>\n", r);
         ++balancer;
     }
-    ap_rputs("<hr /><table>\n"
-             "<tr><th>SSes</th><td>Sticky session name</td></tr>\n"
-             "<tr><th>Timeout</th><td>Balancer Timeout</td></tr>\n"
-             "<tr><th>Sch</th><td>Connection scheme</td></tr>\n"
-             "<tr><th>Host</th><td>Backend Hostname</td></tr>\n"
-             "<tr><th>Stat</th><td>Worker status</td></tr>\n"
-             "<tr><th>Route</th><td>Session Route</td></tr>\n"
-             "<tr><th>Redir</th><td>Session Route Redirection</td></tr>\n"
-             "<tr><th>F</th><td>Load Balancer Factor</td></tr>\n"
-             "<tr><th>Acc</th><td>Number of uses</td></tr>\n"
-             "<tr><th>Wr</th><td>Number of bytes transferred</td></tr>\n"
-             "<tr><th>Rd</th><td>Number of bytes read</td></tr>\n"
-             "</table>", r);
+    if (!(flags & AP_STATUS_SHORT)) {
+        ap_rputs("<hr /><table>\n"
+                 "<tr><th>SSes</th><td>Sticky session name</td></tr>\n"
+                 "<tr><th>Timeout</th><td>Balancer Timeout</td></tr>\n"
+                 "<tr><th>Sch</th><td>Connection scheme</td></tr>\n"
+                 "<tr><th>Host</th><td>Backend Hostname</td></tr>\n"
+                 "<tr><th>Stat</th><td>Worker status</td></tr>\n"
+                 "<tr><th>Route</th><td>Session Route</td></tr>\n"
+                 "<tr><th>Redir</th><td>Session Route Redirection</td></tr>\n"
+                 "<tr><th>F</th><td>Load Balancer Factor</td></tr>\n"
+                 "<tr><th>Acc</th><td>Number of uses</td></tr>\n"
+                 "<tr><th>Wr</th><td>Number of bytes transferred</td></tr>\n"
+                 "<tr><th>Rd</th><td>Number of bytes read</td></tr>\n"
+                 "</table>", r);
+    }
 
     return OK;
 }