]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
http.c: Minor simplification to HTTP status output.
authorBoris P. Korzun <drtr0jan@yandex.ru>
Thu, 5 Jan 2023 12:33:08 +0000 (15:33 +0300)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Thu, 16 Mar 2023 12:21:33 +0000 (07:21 -0500)
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 [new file with mode: 0644]
main/http.c

diff --git a/doc/CHANGES-staging/http_bindaddr.txt b/doc/CHANGES-staging/http_bindaddr.txt
new file mode 100644 (file)
index 0000000..e83312b
--- /dev/null
@@ -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.
index 80c00c52a103984dceb9ae48330229c133e23b31..c07a8986c4c930fc8cb83584ad5bd4543768a6fa 100644 (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) {