Add setting for turning off HTTP/2
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <QUrl>
|
||||
#include <QSettings>
|
||||
|
||||
#include "core/utilities.h"
|
||||
#include "core/timeconstants.h"
|
||||
#include "core/networkproxyfactory.h"
|
||||
#include "engine_fwd.h"
|
||||
@@ -68,6 +69,7 @@ Engine::Base::Base(const EngineType type, QObject *parent)
|
||||
channels_enabled_(false),
|
||||
channels_(0),
|
||||
bs2b_enabled_(false),
|
||||
http2_enabled_(true),
|
||||
about_to_end_emitted_(false) {}
|
||||
|
||||
Engine::Base::~Base() = default;
|
||||
@@ -145,6 +147,13 @@ void Engine::Base::ReloadSettings() {
|
||||
|
||||
bs2b_enabled_ = s.value("bs2b", false).toBool();
|
||||
|
||||
bool http2_enabled = s.value("http2", false).toBool();
|
||||
if (http2_enabled != http2_enabled_) {
|
||||
http2_enabled_ = http2_enabled;
|
||||
Utilities::SetEnv("SOUP_FORCE_HTTP1", http2_enabled_ ? "" : "1");
|
||||
qLog(Debug) << "SOUP_FORCE_HTTP1:" << (http2_enabled_ ? "OFF" : "ON");
|
||||
}
|
||||
|
||||
s.endGroup();
|
||||
|
||||
s.beginGroup(NetworkProxySettingsPage::kSettingsGroup);
|
||||
|
||||
@@ -212,6 +212,7 @@ class Base : public QObject {
|
||||
|
||||
// Options
|
||||
bool bs2b_enabled_;
|
||||
bool http2_enabled_;
|
||||
|
||||
private:
|
||||
bool about_to_end_emitted_;
|
||||
|
||||
Reference in New Issue
Block a user