From 0467ef56577be59929a702afbe71b41cafd24f95 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Tue, 14 May 2019 07:47:23 +0000 Subject: [PATCH] Feature: Log HTTP method used to start a source --- src/connection.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/connection.c b/src/connection.c index 63d32790..c42f1549 100644 --- a/src/connection.c +++ b/src/connection.c @@ -880,8 +880,12 @@ static inline void source_startup(client_t *client) /* only called for native icecast source clients */ static void _handle_source_request(client_t *client) { - ICECAST_LOG_INFO("Source logging in at mountpoint \"%s\" from %s as role %s", - client->uri, client->con->ip, client->role); + const char *method = httpp_getvar(client->parser, HTTPP_VAR_REQ_TYPE); + + ICECAST_LOG_INFO("Source logging in at mountpoint \"%s\" using %s%H%s from %s as role %s", + client->uri, + ((method) ? "\"" : "<"), ((method) ? method : "unknown"), ((method) ? "\"" : "<"), + client->con->ip, client->role); if (client->uri[0] != '/') { ICECAST_LOG_WARN("source mountpoint not starting with /");