Commit 992db850 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

adaptive: fix URLs with query and without path

Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent b092aef5
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment