http.c: Minor simplification to HTTP status output.

Change the HTTP status page (located at /httpstatus by default) by:

* Combining the address and port into a single line.
* Changing "SSL" to "TLS"

ASTERISK-30433 #close

Change-Id: Id2ccb1218f00a68424aca2b651647d8b1f549bcb
This commit is contained in:
Boris P. Korzun 2023-01-05 15:33:08 +03:00 committed by Friendly Automation
parent d433a048f7
commit e971396546
2 changed files with 9 additions and 5 deletions

View File

@ -0,0 +1,6 @@
Subject: http
Master-Only: True
For bound addresses, the HTTP status page now combines the bound
address and bound port in a single line. Additionally, the SSL bind
address has been renamed to TLS.

View File

@ -398,13 +398,11 @@ static int httpstatus_callback(struct ast_tcptls_session_instance *ser,
ast_str_append(&out, 0, "<tr><td><i>Prefix</i></td><td><b>%s</b></td></tr>\r\n", prefix);
if (global_http_server) {
ast_str_append(&out, 0, "<tr><td><i>Bind Address</i></td><td><b>%s</b></td></tr>\r\n",
ast_sockaddr_stringify_addr(&global_http_server->args.old_address));
ast_str_append(&out, 0, "<tr><td><i>Bind Port</i></td><td><b>%s</b></td></tr>\r\n",
ast_sockaddr_stringify_port(&global_http_server->args.old_address));
ast_sockaddr_stringify(&global_http_server->args.old_address));
}
if (http_tls_cfg.enabled) {
ast_str_append(&out, 0, "<tr><td><i>SSL Bind Port</i></td><td><b>%s</b></td></tr>\r\n",
ast_sockaddr_stringify_port(&https_desc.old_address));
ast_str_append(&out, 0, "<tr><td><i>TLS Bind Address</i></td><td><b>%s</b></td></tr>\r\n",
ast_sockaddr_stringify(&https_desc.old_address));
}
ast_str_append(&out, 0, "<tr><td colspan=\"2\"><hr></td></tr>\r\n");
for (v = get_vars; v; v = v->next) {