[Icecast-dev] icecast 2.3.2 generated buildm3u don't support authenticated streaming via https
pb at bieringer.de
Wed Dec 23 03:55:16 PST 2009
I've setup'ed an HTTPS only icecast streaming server with
authentication. After login to the stream, I still get an m3u file
containing the HTTP url, e.g.:
$ curl --insecure
Looks like this is caused by too-much hardcoding in
static void command_buildm3u(client_t *client, const char *mount)
const char *username = NULL;
const char *password = NULL;
COMMAND_REQUIRE(client, "username", username);
COMMAND_REQUIRE(client, "password", password);
client->respcode = 200;
config = config_get_config();
snprintf (client->refbuf->data, PER_CLIENT_REFBUF_SIZE,
"HTTP/1.0 200 OK\r\n"
"Content-Disposition = attachment; filename=listen.m3u\r\n\r\n"
Looks like config->hostname, config->port and "http" should be retrieved
better from request instead from config.
I hope this can be extended easily.
BTW: vlc plays HTTPS streams without any problem, if the CA from the
server cert is stored at $HOME/.local/share/vlc/ssl/certs/ (Fedora 12)
and the URL is manually specified.
More information about the Icecast-dev