g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_NOBODY, 1);
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_WRITEDATA, NULL); /* will cause write failure*/
- if(url2.GetProtocol() == "ftp")
+ if(url2.IsProtocol("ftp"))
{
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FILETIME, 1);
// nocwd is less standard, will return empty list for non-existed remote dir on some ftp server, avoid it.
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_WRITEDATA, NULL); /* will cause write failure*/
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FILETIME , 1);
- if(url2.GetProtocol() == "ftp")
+ if(url2.IsProtocol("ftp"))
{
// nocwd is less standard, will return empty list for non-existed remote dir on some ftp server, avoid it.
if (StringUtils::EndsWith(url2.GetFileName(), "/"))
result = g_curlInterface.easy_getinfo(m_state->m_easyHandle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &length);
if (result != CURLE_OK || length < 0.0)
{
- if (url.GetProtocol() == "ftp")
+ if (url.IsProtocol("ftp"))
{
g_curlInterface.easy_release(&m_state->m_easyHandle, NULL);
CLog::Log(LOGNOTICE, "CCurlFile::Stat - Content length failed: %s(%d) for %s", g_curlInterface.easy_strerror(result), result, url.GetRedacted().c_str());