GNOME Bugzilla – Bug 634770
Failure to detect MIME type from RSS feed URI
Last modified: 2010-11-15 11:52:39 UTC
totem_pl_parser_parse() fails with TOTEM_PL_PARSER_RESULT_UNHANDLED on http://faif.us/feeds/cast-mp3/ The problem seems to be inside function my_g_file_info_get_mime_type_with_data() in file totem-pl-parse.c. The function uses g_input_stream_read() to read up to 1024 bytes to detect the type of feed. On this specific feed, g_input_stream_read() only returns the first line ("<?xml ...?>"), and so MIME type detection fails. This is consistent with the docs of g_input_stream_read(): The function may read fewer bytes, even if the end of the stream has not been reached. Fix: Use g_input_stream_read_all() with a limit of 1024 bytes. This issue makes it impossible to subscribe to the feed in Rhythmbox.
Created attachment 174503 [details] [review] main: Try harder to get the mime-type for a remote file Trying to parse http://faif.us/feeds/cast-mp3/ will fail because the web server only returns the data line-by-line.
Attachment 174503 [details] pushed as 616a033 - main: Try harder to get the mime-type for a remote file