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 725137 - hlsdemux: fails to compute media playlist URL if there is a query parameter
hlsdemux: fails to compute media playlist URL if there is a query parameter
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.2.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-25 12:03 UTC by A Ashley
Modified: 2014-02-28 08:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add support for query parameters (1.43 KB, patch)
2014-02-25 12:13 UTC, A Ashley
committed Details | Review

Description A Ashley 2014-02-25 12:03:08 UTC
If the URL for the master manifest files contains a '/' character in the query parameter (for example http://example.net/1054559_h264_1500k.mp4/master.m3u8?acl=/*1054559_h264_1500k.mp4), hlsdemux is incorrectly converting the relative URLs of the media playlists in to absolute URLs. It is incorrectly using the last '/' it finds in the URL. 

Using the above example master m3u8, a relative media playlist url of "media.m3u8" is being incorrectly resolved as:
http://example.net/1054559_h264_1500k.mp4/master.m3u8?acl=/media.m3u8

It should be:
http://example.net/1054559_h264_1500k.mp4/media.m3u8

According to RFC3986 the '/' character is allowed in the query part of the URL.
Comment 1 A Ashley 2014-02-25 12:13:54 UTC
Created attachment 270261 [details] [review]
add support for query parameters

Add support for query parameters to uri_join.

I wonder if we should move uri_join out of m3u8.c and add a new GstUriHandler function? Joining a relative URL with an absolute URL seems like a fairly generic bit of URL handling.

Bug #698155 has some handy unit tests for URLs that we might be able to rebase to git head.
Comment 2 Sebastian Dröge (slomo) 2014-02-25 12:35:03 UTC
Comment on attachment 270261 [details] [review]
add support for query parameters

Thanks, looks good. Will merge it later :)
Comment 3 Sebastian Dröge (slomo) 2014-02-26 08:21:16 UTC
commit 91775a1abd432d3c5a18036054e90fecc86fbb99
Author: Alex Ashley <bugzilla@ashley-family.net>
Date:   Fri Feb 21 09:30:49 2014 +0000

    hlsdemux: Fix for URLs that contain a '/' in the query parameter
    
    If the URL for the master manifest files contains a '/' character
    in the query parameter (for example
    http://example.net/1054559_h264_1500k.mp4/master.m3u8?acl=/*1054559_h264_1500k.mp4),
    hlsdemux is incorrectly converting the relative URLs of the media
    playlists in to absolute URLs. It is incorrectly using the last '/' it
    finds in the URL. According to RFC3986 the '/' character is allowed in
    the query part of the URL.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725137