Merge pull request #5039 from CEikermann/patch-1
authorjmarshallnz <jcmarsha@gmail.com>
Fri, 18 Jul 2014 06:37:53 +0000 (18:37 +1200)
committerJonathan Marshall <jmarshall@xbmc.org>
Sat, 19 Jul 2014 05:21:00 +0000 (17:21 +1200)
Trac #15178: FTP TLS not working

xbmc/filesystem/CurlFile.cpp

index 0a5ea14..4808465 100644 (file)
@@ -745,8 +745,6 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
     url2.GetProtocolOptions(options);
     if (options.size() > 0)
     {
-      // clear protocol options
-      url2.SetProtocolOptions("");
       // set xbmc headers
       for(std::map<CStdString, CStdString>::const_iterator it = options.begin(); it != options.end(); ++it)
       {
@@ -782,6 +780,9 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
       }
     }
   }
+  
+  // Unset the protocol options to have an url without protocol options
+  url2.SetProtocolOptions("");
 
   if (m_username.length() > 0 && m_password.length() > 0)
     m_url = url2.GetWithoutUserDetails();