upnp: fix url handling when server provides absolute urls

This happens with Jellyfin and possibly other DLNA servers.


Origin commit data
------------------
Branch: ni/coolstream
Commit: b9ac29018d
Author: Hendi <hendi48@freenet.de>
Date: 2023-07-05 (Wed, 05 Jul 2023)



------------------
This commit was generated by Migit
This commit is contained in:
Hendi
2023-07-05 18:52:41 +02:00
committed by vanhofen
parent 216af8718d
commit 130e1f858f

View File

@@ -317,6 +317,8 @@ CUPnPDevice::CUPnPDevice(std::string url)
eurl=urlbase + "/";
else if (p[0]=='/')
eurl=urlbase + std::string(p);
else if (!strncmp(p, "http", 4))
eurl=std::string(p);
else
eurl=urlbase + "/" + std::string(p);
founde = true;
@@ -328,6 +330,8 @@ CUPnPDevice::CUPnPDevice(std::string url)
curl=urlbase + "/";
else if (p[0]=='/')
curl=urlbase + std::string(p);
else if (!strncmp(p, "http", 4))
curl=std::string(p);
else
curl=urlbase + "/" + std::string(p);
foundc = true;