After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590722 - mimetype is not respected
mimetype is not respected
Status: VERIFIED FIXED
Product: totem-pl-parser
Classification: Core
Component: General
2.28.x
Other All
: Normal minor
: ---
Assigned To: totem-pl-parser-maint
totem-pl-parser-maint
: 610525 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-04 11:35 UTC by Martin Lindhe
Modified: 2010-05-05 14:02 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description Martin Lindhe 2009-08-04 11:35:39 UTC
Hello. I made a webapp that creates a dynamic xspf playlist.
It is working correctly to open it from VLC, but with Totem i have some problems:

It seems to ignore the mime type i send out. And it only seem to allow urls with a .xspf in the filename.

For example, this works fine:

  # totem http://startwars.org/dump/remote.xspf

But this dont work:

  # totem http://startwars.org/dump/remote_xspf.php
(the script just sets header
"Content-type: application/xspf+xml"
and outputs the same xml

Other information:
Comment 1 Bastien Nocera 2009-12-04 14:09:27 UTC
You could either use the "force" option for TotemPlParser, or better, use URLs like:
http://startwars.org/dump/remote_xspf.php?test.xspf
which will parse as expected

This would also avoid parsing problems when the file gets on the disk (for Firefox, for example).
Comment 2 Martin Lindhe 2009-12-06 11:05:15 UTC
Hi Bastien and thanks for having a look at this report.

Thanks for the suggestion of tricking totem into parsing by setting the "?test.xspf" variable.
I can work around this in a number of ways, for example using url rewrite on the webserver.
But my bug report is rather about totem not respecting the mimetypes of the network resources.

I dont understand what sort of parsing problems you mentions with regard to Firefox?

Best regards
Comment 3 Tobias Mueller 2010-04-11 20:54:29 UTC
Changing bug title as per last comment.

FWIW: Mimetypes should really be respected.

$ HEAD http://startwars.org/dump/remote_xspf.php | grep Content-Type
Content-Type: application/xspf+xml
$ HEAD http://startwars.org/dump/remote.xspf | grep Content-Type
Content-Type: application/xspf+xml
$ 

I can confirm the issue with totem-2.28
Comment 4 Bastien Nocera 2010-04-11 23:06:42 UTC
commit a7bf30d568974c1523a41e05d07ec31cea5b25a8
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Apr 12 00:03:36 2010 +0100

    Allow dual-types to end up being "normal" playlists
    
    When we prod at a dual-type (in this case, a PHP file), fix the
    real parser in the special_types as well, not just in the dual-types.
    
    Fixes parsing PHP scripts that generate XSPF playlists, such as:
    http://startwars.org/dump/remote_xspf.php
    
    https://bugzilla.gnome.org/show_bug.cgi?id=590722
Comment 5 Martin Lindhe 2010-04-12 10:27:44 UTC
Thank you Bastien!
Comment 6 Bastien Nocera 2010-04-12 12:00:06 UTC
*** Bug 610525 has been marked as a duplicate of this bug. ***
Comment 7 Tobias Mueller 2010-04-13 00:22:03 UTC
Does indeed work :)
Comment 8 Bastien Nocera 2010-05-05 14:02:43 UTC
*** Bug 610525 has been marked as a duplicate of this bug. ***