diff --git a/util.cpp b/util.cpp index 05073c82..e7e4af04 100644 --- a/util.cpp +++ b/util.cpp @@ -248,14 +248,14 @@ namespace http return ""; } } - - std::string url::portstr_ = "80"; - unsigned int url::port_ = 80; - std::string url::user_ = ""; - std::string url::pass_ = ""; url::url(const std::string& url_s) { + portstr_ = "80"; + port_ = 80; + user_ = ""; + pass_ = ""; + parse(url_s); } diff --git a/util.h b/util.h index 8766a516..09123f70 100644 --- a/util.h +++ b/util.h @@ -41,10 +41,10 @@ namespace util void parse(const std::string& url_s); public: std::string protocol_, host_, path_, query_; - static std::string portstr_; - static unsigned int port_; - static std::string user_; - static std::string pass_; + std::string portstr_; + unsigned int port_; + std::string user_; + std::string pass_; }; } }