mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kioslave: map more HTTP status codes to KIO errors
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a48d4cbb28
commit
16cf3fab27
1 changed files with 9 additions and 2 deletions
|
@ -123,11 +123,18 @@ static inline KIO::Error curlToKIOError(const CURLcode curlcode)
|
|||
|
||||
static inline KIO::Error HTTPToKIOError(const int httpcode)
|
||||
{
|
||||
// TODO: handle more codes
|
||||
switch (httpcode) {
|
||||
case 401: {
|
||||
case 401:
|
||||
case 403:
|
||||
case 407: {
|
||||
return KIO::ERR_COULD_NOT_AUTHENTICATE;
|
||||
}
|
||||
case 408: {
|
||||
return KIO::ERR_SERVER_TIMEOUT;
|
||||
}
|
||||
case 500: {
|
||||
return KIO::ERR_INTERNAL_SERVER;
|
||||
}
|
||||
default: {
|
||||
return KIO::ERR_NO_CONTENT;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue