Fix proxying in dash manifest (#607)

* Fix proxying in dash manifest

* Changelog
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2025-05-17 16:25:24 -04:00
1 parent 7c1aa80819
commit 8d42c0213b
3 files changed
+29 -2

No files matched your search

+24
View File
@@ -246,4 +246,28 @@ namespace UrlUtils
}
end function
function BuildUrlFromParts(parts as object) as string
url = ""
if not StringUtils.IsNullOrEmpty(parts.protocol)
url += parts.protocol + "://"
end if
if not StringUtils.IsNullOrEmpty(parts.host)
url += parts.host
end if
if (not StringUtils.IsNullOrEmpty(parts.port)) and ((parts.protocol = "http" and parts.port <> "80") or (parts.protocol = "https" and parts.port <> "443") or (parts.protocol <> "http" and parts.protocol <> "https"))
url += ":" + parts.port
end if
if not StringUtils.IsNullOrEmpty(parts.path)
if not parts.path.StartsWith("/")
url += "/"
end if
url += parts.path
end if
return url
end function
end namespace