+ fixes #0001705: Download manager does not follow redirect (HTTP status 302)

This commit is contained in:
wmayer 2015-01-04 23:15:58 +01:00
parent 9141d28826
commit b2e32abe7e

View File

@ -123,6 +123,15 @@ QUrl DownloadManager::redirectUrl(const QUrl& url) const
}
}
}
else {
// When the url comes from drag and drop it may end with CR+LF. This may cause problems
// and thus should be removed.
QString str = redirectUrl.toString();
if (str.endsWith(QLatin1String("\r\n"))) {
str.chop(2);
redirectUrl.setUrl(str);
}
}
return redirectUrl;
}