From 707771c7bf20ccfce2e8d900ea4acdf385b9ab62 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 25 Aug 2019 05:27:00 +0200 Subject: [PATCH] Bugfix: Do not try to set proxy in parent class. --- src/http.cpp | 4 ++-- src/mastodon-cpp.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/http.cpp b/src/http.cpp index 7e006dc..9648e0a 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -76,11 +76,11 @@ API::http::http(const API &api, const string &instance, { string hostport = env_proxy.substr(pos + 1); string userpw = env_proxy.substr(0, pos); - parent.set_proxy(hostport, userpw); + set_proxy(hostport, userpw); } else { - parent.set_proxy(env_proxy); + set_proxy(env_proxy); } } catch (const std::exception &) diff --git a/src/mastodon-cpp.hpp b/src/mastodon-cpp.hpp index 58c7b8a..6e06235 100644 --- a/src/mastodon-cpp.hpp +++ b/src/mastodon-cpp.hpp @@ -146,11 +146,11 @@ namespace Mastodon * @brief Set proxy. Do not call this directly. * * @param hostport host[:port] - * @param userpw user[:password] + * @param userpw user[:password] (optional) * * @since 0.110.0 */ - void set_proxy(const string &hostport, const string &userpw); + void set_proxy(const string &hostport, const string &userpw = ""); private: const API &parent;