mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kioslave: pass percentage-encoded URL to curl from curl slave
fixes transfer actions (e.g. stat) on file/directories with whitespace in their filename Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b163f7c35c
commit
3bc5e8c500
1 changed files with 3 additions and 1 deletions
|
@ -763,7 +763,9 @@ bool CurlProtocol::setupCurl(const KUrl &url, const bool ftporsftp)
|
|||
curl_easy_setopt(m_curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
|
||||
// curl_easy_setopt(m_curl, CURLOPT_VERBOSE, 1L); // debugging
|
||||
|
||||
const QByteArray urlbytes = url.prettyUrl().toLocal8Bit();
|
||||
// NOTE: the URL path has to be percentage-encoded, otherwise curl will reject it if it
|
||||
// contains whitespace for example
|
||||
const QByteArray urlbytes = url.toEncoded();
|
||||
CURLcode curlresult = curl_easy_setopt(m_curl, CURLOPT_URL, urlbytes.constData());
|
||||
if (curlresult != CURLE_OK) {
|
||||
KIO_CURL_ERROR(curlresult);
|
||||
|
|
Loading…
Add table
Reference in a new issue