Browse Source

Don't decompress the reply data for Qt 6.3

PR #17120.
adaptive-webui-19844
brvphoenix 2 years ago committed by GitHub
parent
commit
fd51362545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/base/net/downloadhandlerimpl.cpp

9
src/base/net/downloadhandlerimpl.cpp

@ -34,10 +34,13 @@ @@ -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() @@ -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…
Cancel
Save