diff options
author | CastagnaIT <gottardo.stefano.83@gmail.com> | 2024-10-08 13:22:04 +0200 |
---|---|---|
committer | CastagnaIT <gottardo.stefano.83@gmail.com> | 2024-10-08 13:22:04 +0200 |
commit | 8bb113bb2143ea43072ad5cd580b4de728d50925 (patch) | |
tree | ebdd131f320fc4a61eae9ab7e7e38dd580782acb | |
parent | 4b7921ce7c3d26edb52caa1013b1088e685787d1 (diff) |
[CURL] Preserve slashes between protocol and path
-rw-r--r-- | xbmc/URL.cpp | 5 |
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; } |