Commit 037789bc authored by Michael Smith's avatar Michael Smith

Add format detection workaround for icecast 1.x, which is buggy and doesn't

send a content-type header.

svn path=/trunk/icecast/; revision=4329
parent 8600634e
......@@ -320,8 +320,9 @@ int connection_create_source(client_t *client, connection_t *con, http_parser_t
source = source_create(client, con, parser, mount, format);
}
} else {
WARN0("No content-type header, cannot handle source");
goto fail;
ERROR0("No content-type header, falling back to backwards compatiblity mode for icecast 1.x relays. Assuming content is mp3.");
format_type_t format = FORMAT_TYPE_MP3;
source = source_create(client, con, parser, mount, format);
}
client->respcode = 200;
bytes = sock_write(client->con->sock,
......
......@@ -77,7 +77,7 @@ static void create_relay_stream(char *server, int port, char *mount)
streamsock = sock_connect_wto(server, port, 0);
if (streamsock == SOCK_ERROR) {
WARN0("Failed to relay stream from master server");
WARN2("Failed to relay stream from master server, couldn't connect to http://%s:%d", server, port);
return;
}
con = create_connection(streamsock, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment