httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe JAILLET <christophe.jail...@wanadoo.fr>
Subject Re: svn commit: r1664356 - /httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
Date Mon, 09 Mar 2015 21:39:28 GMT
Le 05/03/2015 15:35, jim@apache.org a écrit :
> Author: jim
> Date: Thu Mar  5 14:35:34 2015
> New Revision: 1664356
>
> URL: http://svn.apache.org/r1664356
> Log:
> Fresheh html
> BUGZ:55466
>
> Modified:
>      httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
>
> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=1664356&r1=1664355&r2=1664356&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
> +++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Thu Mar  5 14:35:34 2015
> @@ -922,10 +922,10 @@ static int balancer_post_config(apr_pool
>   
>   static void create_radio(const char *name, unsigned int flag, request_rec *r)
>   {
> -    ap_rvputs(r, "<td>On <input name='", name, "' id='", name, "' value='1'
type=radio", NULL);
> +    ap_rvputs(r, "<td><label for='", name, "1'>On</label> <input
name='", name, "' id='", name, "1' value='1' type=radio", NULL);
>       if (flag)
>           ap_rputs(" checked", r);
> -    ap_rvputs(r, "> <br/> Off <input name='", name, "' id='", name, "' value='0'
type=radio", NULL);
> +    ap_rvputs(r, "> <br/> <label for='", name, "0'>Off</label>
<input name='", name, "' id='", name, "0' value='0' type=radio", NULL);
Spaces around the <br/> could be removed.
Apparently <br /> (space before the /) seems to be preferred within httpd.
>       if (!flag)
>           ap_rputs(" checked", r);
>       ap_rputs("></td>\n", r);
> @@ -1481,7 +1481,7 @@ static int balancer_handler(request_rec
>               ap_rputs("<hr />\n<h3>LoadBalancer Status for ", r);
>               ap_rvputs(r, "<a href=\"", ap_escape_uri(r->pool, r->uri), "?b=",
>                         balancer->s->name + sizeof(BALANCER_PREFIX) - 1,
> -                      "&nonce=", balancer->s->nonce,
> +                      "&amp;nonce=", balancer->s->nonce,
>                         "\">", NULL);
>               ap_rvputs(r, balancer->s->name, "</a> [",balancer->s->sname,
"]</h3>\n", NULL);
>               ap_rputs("\n\n<table><tr>"
> @@ -1503,9 +1503,9 @@ static int balancer_handler(request_rec
>               else {
>                   ap_rputs("<td> (None) ", r);
>               }
> -            ap_rprintf(r, "<td>%s</td>\n",
> +            ap_rprintf(r, "</td><td>%s</td>\n",
>                          balancer->s->sticky_force ? "On" : "Off");
> -            ap_rprintf(r, "</td><td>%" APR_TIME_T_FMT "</td>",
> +            ap_rprintf(r, "<td>%" APR_TIME_T_FMT "</td>",
>                   apr_time_sec(balancer->s->timeout));
This could be aligned as in the other ap_rprintf.
'\n' could be more consistent in this section (IMO, should be removed as 
for the <th> before it --> everything on the same line
The ending <tr> in "<th>Path</th><th>Active</th></tr>\n<tr>",
a few 
lines above, seems to be unclosed.
>               ap_rprintf(r, "<td>%d</td>\n", balancer->s->max_attempts);
>               ap_rprintf(r, "<td>%s</td>\n",
> @@ -1531,9 +1531,9 @@ static int balancer_handler(request_rec
>                   worker = *workers;
>                   ap_rvputs(r, "<tr>\n<td><a href=\"",
>                             ap_escape_uri(r->pool, r->uri), "?b=",
> -                          balancer->s->name + sizeof(BALANCER_PREFIX) - 1, "&w=",
> +                          balancer->s->name + sizeof(BALANCER_PREFIX) - 1, "&amp;w=",
>                             ap_escape_uri(r->pool, worker->s->name),
> -                          "&nonce=", balancer->s->nonce,
> +                          "&amp;nonce=", balancer->s->nonce,
>                             "\">", NULL);
>                   ap_rvputs(r, (*worker->s->uds_path ? "<i>" : ""), ap_proxy_worker_name(r->pool,
worker),
>                             (*worker->s->uds_path ? "</i>" : ""), "</a></td>",
NULL);
> @@ -1564,7 +1564,7 @@ static int balancer_handler(request_rec
>               ap_rvputs(r, (*wsel->s->uds_path?"<i>":""), ap_proxy_worker_name(r->pool,
wsel), (*wsel->s->uds_path?"</i>":""), "</h3>\n", NULL);
>               ap_rputs("<form method=\"POST\" enctype=\"application/x-www-form-urlencoded\"
action=\"", r);
>               ap_rvputs(r, ap_escape_uri(r->pool, action), "\">\n", NULL);
> -            ap_rputs("<dl>\n<table><tr><td>Load factor:</td><td><input
name='w_lf' id='w_lf' type=text ", r);
> +            ap_rputs("<table><tr><td>Load factor:</td><td><input
name='w_lf' id='w_lf' type=text ", r);
>               ap_rprintf(r, "value='%d'></td></tr>\n", wsel->s->lbfactor);
>               ap_rputs("<tr><td>LB Set:</td><td><input name='w_ls'
id='w_ls' type=text ", r);
>               ap_rprintf(r, "value='%d'></td></tr>\n", wsel->s->lbset);
A few lines below, <tr> in ap_rputs("<tr><td>Status:</td>", r); seems

unclosed.
> @@ -1605,7 +1605,7 @@ static int balancer_handler(request_rec
>               ap_rvputs(r, bsel->s->name, "</h3>\n", NULL);
>               ap_rputs("<form method='POST' enctype='application/x-www-form-urlencoded'
action='", r);
>               ap_rvputs(r, ap_escape_uri(r->pool, action), "'>\n", NULL);
> -            ap_rputs("<dl>\n<table>\n", r);
> +            ap_rputs("<table>\n", r);
>               provs = ap_list_provider_names(r->pool, PROXY_LBMETHOD, "0");
>               if (provs) {
>                   ap_rputs("<tr><td>LBmethod:</td>", r);


Mime
View raw message