mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kioslave: emit error on HTTP status greater or equal to 400 from http slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
68414172c4
commit
96b145819b
1 changed files with 7 additions and 0 deletions
|
@ -295,6 +295,13 @@ void HttpProtocol::get(const KUrl &url)
|
|||
setMetaData(QString::fromLatin1("modified"), httpheader.get(QLatin1String("Last-Modified")));
|
||||
|
||||
curl_slist_free_all(curllist);
|
||||
|
||||
if (httpheader.status() >= 400) {
|
||||
kDebug(7103) << "HTTP error" << httpheader.status() << httpheader.errorString();
|
||||
error(KIO::ERR_NO_CONTENT, httpheader.errorString());
|
||||
return;
|
||||
}
|
||||
|
||||
finished();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue