mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
upnp: fix url handling when server provides absolute urls
This happens with Jellyfin and possibly other DLNA servers.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user