From e971396546ffadba03c9f88d801b915ac8fec4b5 Mon Sep 17 00:00:00 2001 From: "Boris P. Korzun" Date: Thu, 5 Jan 2023 15:33:08 +0300 Subject: [PATCH] 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 --- doc/CHANGES-staging/http_bindaddr.txt | 6 ++++++ main/http.c | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 doc/CHANGES-staging/http_bindaddr.txt diff --git a/doc/CHANGES-staging/http_bindaddr.txt b/doc/CHANGES-staging/http_bindaddr.txt new file mode 100644 index 0000000000..e83312bc7f --- /dev/null +++ b/doc/CHANGES-staging/http_bindaddr.txt @@ -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. diff --git a/main/http.c b/main/http.c index 80c00c52a1..c07a8986c4 100644 --- a/main/http.c +++ b/main/http.c @@ -398,13 +398,11 @@ static int httpstatus_callback(struct ast_tcptls_session_instance *ser, ast_str_append(&out, 0, "Prefix%s\r\n", prefix); if (global_http_server) { ast_str_append(&out, 0, "Bind Address%s\r\n", - ast_sockaddr_stringify_addr(&global_http_server->args.old_address)); - ast_str_append(&out, 0, "Bind Port%s\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, "SSL Bind Port%s\r\n", - ast_sockaddr_stringify_port(&https_desc.old_address)); + ast_str_append(&out, 0, "TLS Bind Address%s\r\n", + ast_sockaddr_stringify(&https_desc.old_address)); } ast_str_append(&out, 0, "
\r\n"); for (v = get_vars; v; v = v->next) { -- 2.47.2