You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2011/08/25 01:00:11 UTC

[PATCH] mod_status: s/%c/'%c'/ in table

Rationale: allow me to search in my browser for 'W' (with quotes) to
find entries in the W state.

Patch (against trunk):
[[[
Index: modules/generators/mod_status.c
===================================================================
--- modules/generators/mod_status.c	(revision 1161295)
+++ modules/generators/mod_status.c	(working copy)
@@ -765,40 +765,40 @@
 
                     switch (ws_record->status) {
                     case SERVER_READY:
-                        ap_rputs("</td><td>_", r);
+                        ap_rputs("</td><td>'_'", r);
                         break;
                     case SERVER_STARTING:
-                        ap_rputs("</td><td><b>S</b>", r);
+                        ap_rputs("</td><td><b>'S'</b>", r);
                         break;
                     case SERVER_BUSY_READ:
-                        ap_rputs("</td><td><b>R</b>", r);
+                        ap_rputs("</td><td><b>'R'</b>", r);
                         break;
                     case SERVER_BUSY_WRITE:
-                        ap_rputs("</td><td><b>W</b>", r);
+                        ap_rputs("</td><td><b>'W'</b>", r);
                         break;
                     case SERVER_BUSY_KEEPALIVE:
-                        ap_rputs("</td><td><b>K</b>", r);
+                        ap_rputs("</td><td><b>'K'</b>", r);
                         break;
                     case SERVER_BUSY_LOG:
-                        ap_rputs("</td><td><b>L</b>", r);
+                        ap_rputs("</td><td><b>'L'</b>", r);
                         break;
                     case SERVER_BUSY_DNS:
-                        ap_rputs("</td><td><b>D</b>", r);
+                        ap_rputs("</td><td><b>'D'</b>", r);
                         break;
                     case SERVER_CLOSING:
-                        ap_rputs("</td><td><b>C</b>", r);
+                        ap_rputs("</td><td><b>'C'</b>", r);
                         break;
                     case SERVER_DEAD:
-                        ap_rputs("</td><td>.", r);
+                        ap_rputs("</td><td>'.'", r);
                         break;
                     case SERVER_GRACEFUL:
-                        ap_rputs("</td><td>G", r);
+                        ap_rputs("</td><td>'G'", r);
                         break;
                     case SERVER_IDLE_KILL:
-                        ap_rputs("</td><td>I", r);
+                        ap_rputs("</td><td>'I'", r);
                         break;
                     default:
-                        ap_rputs("</td><td>?", r);
+                        ap_rputs("</td><td>'?'", r);
                         break;
                     }
 
]]]

I'll send in a formal bug report if it helps, but hoped that for a trivial
patch the registration/filing overhead could be spared.