diff --git a/resources/desktop/com.github.rssguard.desktop b/resources/desktop/com.github.rssguard.desktop index 3b38b144f..8d9a3e04a 100644 --- a/resources/desktop/com.github.rssguard.desktop +++ b/resources/desktop/com.github.rssguard.desktop @@ -14,3 +14,4 @@ Comment[de]=Qt Feedreader mit großem Funktionsumfang bei geringem Ressourcenbed Icon=rssguard Terminal=false Categories=Qt;Network;News; +StartupWMClass=rssguard diff --git a/resources/docs/Documentation.md b/resources/docs/Documentation.md index 94efa5a13..ed2da25a1 100644 --- a/resources/docs/Documentation.md +++ b/resources/docs/Documentation.md @@ -63,7 +63,7 @@ RSS Guard is distributed in two variants: -* **Lite package with simple text-based message viewer**: This variant displays message in much simpler and more lightweight text-based component. Layout and formatting of displayed message is simplified, no big external web viewers are used, which results in much smaller installation packages, much smaller memory footprint and increased privacy of the user, because many web resources are not downloaded by default like pictures, JavaScript and so on. This variant of RSS Guard is meant for advanced users and offers faster GUI response in some use-cases. +* **Lite package with simple text-based message viewer**: This variant displays message in much simpler and more lightweight text-based component. All packages of this variant have `nowebengine` keyword in their names. Layout and formatting of displayed message is simplified, no big external web viewers are used, which results in much smaller installation packages, much smaller memory footprint and increased privacy of the user, because many web resources are not downloaded by default like pictures, JavaScript and so on. This variant of RSS Guard is meant for advanced users and offers faster GUI response in some use-cases. @@ -235,4 +235,4 @@ To redirect debug output of RSS Guard to log file, do this: 4. Now try to simulate your problem. 5. Attach generated `log.txt` file to your bug report. -On Windows, there are some problems if you want to see debug output of a GUI program, because Windows does not support "dual" applications. You can, however, display application's debug console output with PowerShell, specifically for RSS Guard like this: `.\rssguard.exe | Out-Default`. Just run this stuff when you are in RSS Guard's folder and you should see console output directly in your PowerShell window. \ No newline at end of file +On Windows, there are some problems if you want to see debug output of a GUI program, because Windows does not support "dual" applications. You can, however, display application's debug console output with PowerShell, specifically for RSS Guard like this: `.\rssguard.exe | Out-Default`. Just run this stuff when you are in RSS Guard's folder and you should see console output directly in your PowerShell window. diff --git a/resources/scripts/7za b/resources/scripts/7za index 47f412575..9c10723bf 160000 --- a/resources/scripts/7za +++ b/resources/scripts/7za @@ -1 +1 @@ -Subproject commit 47f4125753452eff8800dbd6600c5a05540b15d9 +Subproject commit 9c10723bfbaf6cb85107d6ee16e0324e9e487749 diff --git a/src/librssguard/network-web/basenetworkaccessmanager.cpp b/src/librssguard/network-web/basenetworkaccessmanager.cpp index 5954d7c67..0ed338fb0 100644 --- a/src/librssguard/network-web/basenetworkaccessmanager.cpp +++ b/src/librssguard/network-web/basenetworkaccessmanager.cpp @@ -49,11 +49,18 @@ QNetworkReply* BaseNetworkAccessManager::createRequest(QNetworkAccessManager::Op QIODevice* outgoingData) { QNetworkRequest new_request = request; - // This rapidly speeds up loading of web sites. - // NOTE: https://en.wikipedia.org/wiki/HTTP_pipelining new_request.setAttribute(QNetworkRequest::Attribute::HttpPipeliningAllowedAttribute, true); +#if QT_VERSION >= 0x050900 + new_request.setAttribute(QNetworkRequest::Attribute::RedirectPolicyAttribute, + QNetworkRequest::RedirectPolicy::NoLessSafeRedirectPolicy); +#elif QT_VERSION >= 0x050600 + new_request.setAttribute(QNetworkRequest::Attribute::FollowRedirectsAttribute, true); +#endif + // Setup custom user-agent. new_request.setRawHeader(HTTP_HEADERS_USER_AGENT, QString(APP_USERAGENT).toLocal8Bit()); - return QNetworkAccessManager::createRequest(op, new_request, outgoingData); + + auto reply = QNetworkAccessManager::createRequest(op, new_request, outgoingData); + return reply; } diff --git a/src/librssguard/network-web/downloader.cpp b/src/librssguard/network-web/downloader.cpp index efcfb06b2..6befbf1a4 100644 --- a/src/librssguard/network-web/downloader.cpp +++ b/src/librssguard/network-web/downloader.cpp @@ -104,71 +104,30 @@ void Downloader::manipulateData(const QString& url, void Downloader::finished() { auto* reply = qobject_cast(sender()); - QNetworkAccessManager::Operation reply_operation = reply->operation(); - m_timer->stop(); // In this phase, some part of downloading process is completed. const QUrl redirection_url = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); - if (redirection_url.isValid()) { - // Communication indicates that HTTP redirection is needed. - // Setup redirection URL and download again. - QNetworkRequest request = reply->request(); - - if (redirection_url.host().isEmpty()) { - request.setUrl(QUrl(reply->request().url().scheme() + QSL("://") + reply->request().url().host() + redirection_url.toString())); - } - else { - request.setUrl(redirection_url); - } - - qWarningNN << LOGSEC_NETWORK - << "We are redirecting URL request to:" - << QUOTE_W_SPACE_DOT(request.url()); - - m_activeReply->deleteLater(); - m_activeReply = nullptr; - - if (reply_operation == QNetworkAccessManager::GetOperation) { - runGetRequest(request); - } - else if (reply_operation == QNetworkAccessManager::Operation::PostOperation) { - if (m_inputMultipartData == nullptr) { - runPostRequest(request, m_inputData); - } - else { - runPostRequest(request, m_inputMultipartData); - } - } - else if (reply_operation == QNetworkAccessManager::PutOperation) { - runPutRequest(request, m_inputData); - } - else if (reply_operation == QNetworkAccessManager::DeleteOperation) { - runDeleteRequest(request); - } + // No redirection is indicated. Final file is obtained in our "reply" object. + // Read the data into output buffer. + if (m_inputMultipartData == nullptr) { + m_lastOutputData = reply->readAll(); } else { - // No redirection is indicated. Final file is obtained in our "reply" object. - // Read the data into output buffer. - if (m_inputMultipartData == nullptr) { - m_lastOutputData = reply->readAll(); - } - else { - m_lastOutputMultipartData = decodeMultipartAnswer(reply); - } - - m_lastContentType = reply->header(QNetworkRequest::ContentTypeHeader); - m_lastOutputError = reply->error(); - m_activeReply->deleteLater(); - m_activeReply = nullptr; - - if (m_inputMultipartData != nullptr) { - m_inputMultipartData->deleteLater(); - } - - emit completed(m_lastOutputError, m_lastOutputData); + m_lastOutputMultipartData = decodeMultipartAnswer(reply); } + + m_lastContentType = reply->header(QNetworkRequest::ContentTypeHeader); + m_lastOutputError = reply->error(); + m_activeReply->deleteLater(); + m_activeReply = nullptr; + + if (m_inputMultipartData != nullptr) { + m_inputMultipartData->deleteLater(); + } + + emit completed(m_lastOutputError, m_lastOutputData); } void Downloader::progressInternal(qint64 bytes_received, qint64 bytes_total) {