[vlc-commits] adaptive: fix URLs with query and without path

Rémi Denis-Courmont git at videolan.org
Thu Aug 27 20:38:21 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 27 21:06:17 2015 +0300| [992db850e765ad2a4c604fc31a39728ca6a1ce41] | committer: Rémi Denis-Courmont

adaptive: fix URLs with query and without path

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=992db850e765ad2a4c604fc31a39728ca6a1ce41
---

 modules/demux/adaptative/http/Chunk.cpp |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/demux/adaptative/http/Chunk.cpp b/modules/demux/adaptative/http/Chunk.cpp
index 01206c0..29c8d39 100644
--- a/modules/demux/adaptative/http/Chunk.cpp
+++ b/modules/demux/adaptative/http/Chunk.cpp
@@ -54,10 +54,15 @@ Chunk::Chunk        (const std::string& url) :
         throw VLC_EGENERIC;
 
     vlc_url_t url_components;
-    vlc_UrlParse(&url_components, url.c_str(), 0);
+    vlc_UrlParse(&url_components, url.c_str(), '?');
 
     if(url_components.psz_path)
         path = url_components.psz_path;
+    if(url_components.psz_option)
+    {
+        path += "?";
+        path += url_components.psz_option;
+    }
     port = url_components.i_port ? url_components.i_port :
                          ((scheme == "https") ? 443 : 80);
     if(url_components.psz_host)



More information about the vlc-commits mailing list