mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
handle new content-types
svn path=/icecast/trunk/icecast/; revision=14786
This commit is contained in:
parent
b2ce433a8f
commit
cdfeb30444
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user