From e479206c45af31d0e8d7e5e4df44c64248b94a36 Mon Sep 17 00:00:00 2001 From: Jim Broadus Date: Tue, 23 Feb 2021 21:04:10 -0800 Subject: [PATCH] tagreader: Follow redirects when downloading file Set the QNetworkRequest::FollowRedirectsAttribute attribute to true. This should be changed to use RedirectPolicyAttribute when all supported platforms move to 5.9 or greater. Stretch is at 5.7. --- ext/libclementine-tagreader/cloudstream.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/libclementine-tagreader/cloudstream.cpp b/ext/libclementine-tagreader/cloudstream.cpp index a6e61420a..60786fab2 100644 --- a/ext/libclementine-tagreader/cloudstream.cpp +++ b/ext/libclementine-tagreader/cloudstream.cpp @@ -113,6 +113,8 @@ TagLib::ByteVector CloudStream::readBlock(ulong length) { QString("bytes=%1-%2").arg(start).arg(end).toUtf8()); request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork); + // TODO: Use RedirectPolicyAttribute after baseline moves to Qt 5.9. + request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); QNetworkReply* reply = network_->get(request); connect(reply, SIGNAL(sslErrors(QList)),