Commit cdfeb304 authored by Karl Heyes's avatar Karl Heyes

handle new content-types

svn path=/icecast/trunk/icecast/; revision=14786
parent b2ce433a
......@@ -60,6 +60,10 @@ format_type_t format_get_type (const char *contenttype)
return FORMAT_TYPE_OGG; /* Backwards compatibility */
else if(strcmp(contenttype, "application/ogg") == 0)
return FORMAT_TYPE_OGG; /* Now blessed by IANA */
else if(strcmp(contenttype, "audio/ogg") == 0)
return FORMAT_TYPE_OGG;
else if(strcmp(contenttype, "video/ogg") == 0)
return FORMAT_TYPE_OGG;
else
/* We default to the Generic format handler, which
can handle many more formats than just mp3 */
......@@ -203,13 +207,13 @@ int format_check_http_buffer (source_t *source, client_t *client)
{
DEBUG0("processing pending client headers");
client->respcode = 200;
if (format_prepare_headers (source, client) < 0)
{
ERROR0 ("internal problem, dropping client");
client->con->error = 1;
return -1;
}
client->respcode = 200;
stats_event_inc (NULL, "listeners");
stats_event_inc (NULL, "listener_connections");
stats_event_inc (source->mount, "listener_connections");
......
......@@ -170,7 +170,9 @@ int format_ogg_get_plugin (source_t *source)
plugin->create_client_data = create_ogg_client_data;
plugin->free_plugin = format_ogg_free_plugin;
plugin->set_tag = NULL;
plugin->contenttype = "application/ogg";
if (strcmp (httpp_getvar (source->parser, "content-type"), "application/x-ogg") == 0)
httpp_setvar (source->parser, "content-type", "application/ogg");
plugin->contenttype = httpp_getvar (source->parser, "content-type");
ogg_sync_init (&state->oy);
......
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