mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-24 10:16:00 +03:00
parent
56b99f4e19
commit
fd51362545
1 changed files with 8 additions and 1 deletions
|
@ -34,10 +34,13 @@
|
|||
|
||||
#include "base/3rdparty/expected.hpp"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/gzip.h"
|
||||
#include "base/utils/io.h"
|
||||
#include "base/utils/misc.h"
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 3, 0))
|
||||
#include "base/utils/gzip.h"
|
||||
#endif
|
||||
|
||||
const int MAX_REDIRECTIONS = 20; // the common value for web browsers
|
||||
|
||||
namespace
|
||||
|
@ -121,9 +124,13 @@ void DownloadHandlerImpl::processFinishedDownload()
|
|||
}
|
||||
|
||||
// Success
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0))
|
||||
m_result.data = m_reply->readAll();
|
||||
#else
|
||||
m_result.data = (m_reply->rawHeader("Content-Encoding") == "gzip")
|
||||
? Utils::Gzip::decompress(m_reply->readAll())
|
||||
: m_reply->readAll();
|
||||
#endif
|
||||
|
||||
if (m_downloadRequest.saveToFile())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue