mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kioslave: disable PASV based on value from kio_ftprc in curl slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
7c31e18dcf
commit
0c10290cf2
1 changed files with 12 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "kcomponentdata.h"
|
||||
#include "kmimetype.h"
|
||||
#include "kremoteencoding.h"
|
||||
#include "kconfiggroup.h"
|
||||
#include "kdebug.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
@ -795,6 +796,17 @@ bool CurlProtocol::setupCurl(const KUrl &url)
|
|||
}
|
||||
}
|
||||
|
||||
if (m_isftp || m_issftp) {
|
||||
// NOTE: this is stored in kio_ftprc
|
||||
const long disablepassivemode = config()->readEntry("DisablePassiveMode", false);
|
||||
kDebug(7103) << "Disable passive mode" << disablepassivemode;
|
||||
curlresult = curl_easy_setopt(m_curl, CURLOPT_FTP_SKIP_PASV_IP, disablepassivemode);
|
||||
if (curlresult != CURLE_OK) {
|
||||
KIO_CURL_ERROR(curlresult);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue