diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-11-20 03:51:44 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-11-20 03:51:58 +0100 |
commit | 5b929c9d1aee9e0ce4c16e86718c13e0c319f36c (patch) | |
tree | a07fd7a69847869d237af16fefcbeed3531331e7 /src | |
parent | Translated using Weblate (German) (diff) | |
download | nheko-5b929c9d1aee9e0ce4c16e86718c13e0c319f36c.tar.xz |
Enable http/3 support
Diffstat (limited to 'src')
-rw-r--r-- | src/MatrixClient.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/MatrixClient.cpp b/src/MatrixClient.cpp index e1c890ed..b5ea7609 100644 --- a/src/MatrixClient.cpp +++ b/src/MatrixClient.cpp @@ -10,6 +10,7 @@ #include <QMetaType> #include <QObject> +#include <QStandardPaths> #include <QString> #include "nlohmann/json.hpp" @@ -33,7 +34,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(); } |