Bugfix: Do not try to set proxy in parent class.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2019-08-25 05:27:00 +02:00
parent 6b070dec98
commit 707771c7bf
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 4 additions and 4 deletions

View File

@ -76,11 +76,11 @@ API::http::http(const API &api, const string &instance,
{ {
string hostport = env_proxy.substr(pos + 1); string hostport = env_proxy.substr(pos + 1);
string userpw = env_proxy.substr(0, pos); string userpw = env_proxy.substr(0, pos);
parent.set_proxy(hostport, userpw); set_proxy(hostport, userpw);
} }
else else
{ {
parent.set_proxy(env_proxy); set_proxy(env_proxy);
} }
} }
catch (const std::exception &) catch (const std::exception &)

View File

@ -146,11 +146,11 @@ namespace Mastodon
* @brief Set proxy. Do not call this directly. * @brief Set proxy. Do not call this directly.
* *
* @param hostport host[:port] * @param hostport host[:port]
* @param userpw user[:password] * @param userpw user[:password] (optional)
* *
* @since 0.110.0 * @since 0.110.0
*/ */
void set_proxy(const string &hostport, const string &userpw); void set_proxy(const string &hostport, const string &userpw = "");
private: private:
const API &parent; const API &parent;