+ fixes #0001705: Download manager does not follow redirect (HTTP status 302)
This commit is contained in:
parent
9141d28826
commit
b2e32abe7e
|
@ -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;
|
return redirectUrl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user