Skip to content

Commit

Permalink
+ fixes #1705: Download manager does not follow redirect (HTTP status…
Browse files Browse the repository at this point in the history
… 302)
  • Loading branch information
wwmayer committed Jan 4, 2015
1 parent 9141d28 commit b2e32ab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Gui/DownloadManager.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit b2e32ab

Please sign in to comment.