aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCastagnaIT <gottardo.stefano.83@gmail.com>2024-10-08 13:22:04 +0200
committerCastagnaIT <gottardo.stefano.83@gmail.com>2024-10-08 13:22:04 +0200
commit8bb113bb2143ea43072ad5cd580b4de728d50925 (patch)
treeebdd131f320fc4a61eae9ab7e7e38dd580782acb
parent4b7921ce7c3d26edb52caa1013b1088e685787d1 (diff)
[CURL] Preserve slashes between protocol and path
-rw-r--r--xbmc/URL.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/xbmc/URL.cpp b/xbmc/URL.cpp
index 8bc0f98c7f..b934e7569e 100644
--- a/xbmc/URL.cpp
+++ b/xbmc/URL.cpp
@@ -471,8 +471,11 @@ std::string CURL::GetWithoutOptions() const
std::string strGet = GetWithoutFilename();
// Prevent double slash when concatenating host part and filename part
- if (m_strFileName.size() && (m_strFileName[0] == '/' || m_strFileName[0] == '\\') && URIUtils::HasSlashAtEnd(strGet))
+ if (!m_strFileName.empty() && (m_strFileName[0] == '/' || m_strFileName[0] == '\\') &&
+ URIUtils::HasSlashAtEnd(strGet) && !(IsProtocol("http") || IsProtocol("https")))
+ {
URIUtils::RemoveSlashAtEnd(strGet);
+ }
return strGet + m_strFileName;
}