mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kioslave: send KIO error codes from curl slave where possible
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
c8769ed4f3
commit
0269b70b0a
1 changed files with 7 additions and 4 deletions
|
@ -367,7 +367,8 @@ void CurlProtocol::stat(const KUrl &url)
|
|||
if (kioerror == KIO::ERR_COULD_NOT_LOGIN) {
|
||||
curlresult = authUrl(url);
|
||||
if (curlresult != CURLE_OK) {
|
||||
KIO_CURL_ERROR(curlresult);
|
||||
kioerror = curlToKIOError(curlresult, m_curl);
|
||||
error(kioerror, url.prettyUrl());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -449,7 +450,8 @@ void CurlProtocol::listDir(const KUrl &url)
|
|||
if (kioerror == KIO::ERR_COULD_NOT_LOGIN) {
|
||||
curlresult = authUrl(url);
|
||||
if (curlresult != CURLE_OK) {
|
||||
KIO_CURL_ERROR(curlresult);
|
||||
kioerror = curlToKIOError(curlresult, m_curl);
|
||||
error(kioerror, url.prettyUrl());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -553,7 +555,8 @@ void CurlProtocol::get(const KUrl &url)
|
|||
if (kioerror == KIO::ERR_COULD_NOT_LOGIN) {
|
||||
curlresult = authUrl(url);
|
||||
if (curlresult != CURLE_OK) {
|
||||
KIO_CURL_ERROR(curlresult);
|
||||
kioerror = curlToKIOError(curlresult, m_curl);
|
||||
error(kioerror, url.prettyUrl());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -847,7 +850,7 @@ CURLcode CurlProtocol::authUrlFromCache(const KUrl &url)
|
|||
kioauthinfo.username = url.userName();
|
||||
kioauthinfo.password = url.password();
|
||||
if (checkCachedAuthentication(kioauthinfo)) {
|
||||
CURLcode curlresult = setupAuth(kioauthinfo.username, kioauthinfo.password);
|
||||
const CURLcode curlresult = setupAuth(kioauthinfo.username, kioauthinfo.password);
|
||||
if (curlresult != CURLE_OK) {
|
||||
return curlresult;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue