Skip to content

Commit 11216f5

Browse files
author
Stefan Fritsch
committed
Merge repeated calls of ap_rputs.
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr> PR: 51330 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135085 13f79535-47bb-0310-9956-ffa450edef68
1 parent 041282f commit 11216f5

1 file changed

Lines changed: 22 additions & 21 deletions

File tree

modules/generators/mod_status.c

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,10 @@ static int status_handler(request_rec *r)
373373

374374
if (!short_report) {
375375
ap_rputs(DOCTYPE_HTML_3_2
376-
"<html><head>\n<title>Apache Status</title>\n</head><body>\n",
377-
r);
378-
ap_rputs("<h1>Apache Server Status for ", r);
376+
"<html><head>\n"
377+
"<title>Apache Status</title>\n"
378+
"</head><body>\n"
379+
"<h1>Apache Server Status for ", r);
379380
ap_rvputs(r, ap_get_server_name(r), " (via ", r->connection->local_ip,
380381
")</h1>\n\n", NULL);
381382
ap_rvputs(r, "<dl><dt>Server Version: ",
@@ -487,25 +488,25 @@ static int status_handler(request_rec *r)
487488
if (short_report)
488489
ap_rputs("\n", r);
489490
else {
490-
ap_rputs("</pre>\n", r);
491-
ap_rputs("<p>Scoreboard Key:<br />\n", r);
492-
ap_rputs("\"<b><code>_</code></b>\" Waiting for Connection, \n", r);
493-
ap_rputs("\"<b><code>S</code></b>\" Starting up, \n", r);
494-
ap_rputs("\"<b><code>R</code></b>\" Reading Request,<br />\n", r);
495-
ap_rputs("\"<b><code>W</code></b>\" Sending Reply, \n", r);
496-
ap_rputs("\"<b><code>K</code></b>\" Keepalive (read), \n", r);
497-
ap_rputs("\"<b><code>D</code></b>\" DNS Lookup,<br />\n", r);
498-
ap_rputs("\"<b><code>C</code></b>\" Closing connection, \n", r);
499-
ap_rputs("\"<b><code>L</code></b>\" Logging, \n", r);
500-
ap_rputs("\"<b><code>G</code></b>\" Gracefully finishing,<br /> \n", r);
501-
ap_rputs("\"<b><code>I</code></b>\" Idle cleanup of worker, \n", r);
502-
ap_rputs("\"<b><code>.</code></b>\" Open slot with no current process,<br />\n", r);
503-
ap_rputs("<p />\n", r);
491+
ap_rputs("</pre>\n"
492+
"<p>Scoreboard Key:<br />\n"
493+
"\"<b><code>_</code></b>\" Waiting for Connection, \n"
494+
"\"<b><code>S</code></b>\" Starting up, \n"
495+
"\"<b><code>R</code></b>\" Reading Request,<br />\n"
496+
"\"<b><code>W</code></b>\" Sending Reply, \n"
497+
"\"<b><code>K</code></b>\" Keepalive (read), \n"
498+
"\"<b><code>D</code></b>\" DNS Lookup,<br />\n"
499+
"\"<b><code>C</code></b>\" Closing connection, \n"
500+
"\"<b><code>L</code></b>\" Logging, \n"
501+
"\"<b><code>G</code></b>\" Gracefully finishing,<br /> \n"
502+
"\"<b><code>I</code></b>\" Idle cleanup of worker, \n"
503+
"\"<b><code>.</code></b>\" Open slot with no current process,<br />\n"
504+
"<p />\n", r);
504505
if (!ap_extended_status) {
505506
int j;
506507
int k = 0;
507-
ap_rputs("PID Key: <br />\n", r);
508-
ap_rputs("<pre>\n", r);
508+
ap_rputs("PID Key: <br />\n"
509+
"<pre>\n", r);
509510
for (i = 0; i < server_limit; ++i) {
510511
for (j = 0; j < thread_limit; ++j) {
511512
int indx = (i * thread_limit) + j;
@@ -524,8 +525,8 @@ static int status_handler(request_rec *r)
524525
}
525526
}
526527

527-
ap_rputs("\n", r);
528-
ap_rputs("</pre>\n", r);
528+
ap_rputs("\n"
529+
"</pre>\n", r);
529530
}
530531
}
531532

0 commit comments

Comments
 (0)