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

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
This commit is contained in:
Michael Smith 2003-02-07 11:56:40 +00:00
parent 8600634e68
commit 037789bc1a
2 changed files with 4 additions and 3 deletions

View File

@ -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,

View File

@ -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);