1 files changed, 9 insertions, 1 deletions
diff --git a/src/MatrixClient.cpp b/src/MatrixClient.cpp
index e1c890ed..945a5a73 100644
--- a/src/MatrixClient.cpp
+++ b/src/MatrixClient.cpp
@@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
+// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -10,6 +11,7 @@
#include <QMetaType>
#include <QObject>
+#include <QStandardPaths>
#include <QString>
#include "nlohmann/json.hpp"
@@ -33,7 +35,13 @@ namespace http {
mtx::http::Client *
client()
{
- static auto client_ = std::make_shared<mtx::http::Client>();
+ static auto client_ = [] {
+ auto c = std::make_shared<mtx::http::Client>();
+ c->alt_svc_cache_path((QStandardPaths::writableLocation(QStandardPaths::CacheLocation) +
+ "/curl_alt_svc_cache.txt")
+ .toStdString());
+ return c;
+ }();
return client_.get();
}
|