1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

Feature: Report Host:-header in <listener>

This commit is contained in:
Philipp Schafft 2018-07-13 10:05:44 +00:00
parent 5d0491ae1e
commit 9a4491e43a

View File

@ -703,6 +703,10 @@ static inline xmlNodePtr __add_listener(client_t *client,
if (tmp)
xmlNewTextChild(node, NULL, XMLSTR("referer"), XMLSTR(tmp));
tmp = httpp_getvar(client->parser, "host");
if (tmp)
xmlNewTextChild(node, NULL, XMLSTR("host"), XMLSTR(tmp));
snprintf(buf, sizeof(buf), "%lu", (unsigned long)(now - client->con->con_time));
xmlNewTextChild(node, NULL, XMLSTR(mode == OMODE_LEGACY ? "Connected" : "connected"), XMLSTR(buf));