mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
kioslave: do not redirect to the original URL from curl slave
now that QHostInfo resolves in a more relaxed way (without NI_NAMEREQD flag) it can happen that the hostname of the result is the address itself Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a4ce7d439c
commit
599c76018a
1 changed files with 6 additions and 3 deletions
|
@ -921,9 +921,12 @@ bool CurlProtocol::setupCurl(const KUrl &url, const bool ftp)
|
|||
KUrl newurl(url);
|
||||
newurl.setHost(urlinfo.hostName());
|
||||
kDebug(7103) << "Rewrote" << url << "to" << newurl;
|
||||
redirection(newurl);
|
||||
finished();
|
||||
return false;
|
||||
// NOTE: redirect to the same URL is cycril link error
|
||||
if (url != newurl) {
|
||||
redirection(newurl);
|
||||
finished();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
kWarning(7103) << "Could not resolve" << url.host();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue