From 8bb113bb2143ea43072ad5cd580b4de728d50925 Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Tue, 8 Oct 2024 13:22:04 +0200 Subject: [CURL] Preserve slashes between protocol and path --- xbmc/URL.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3