diff --git a/util.cpp b/util.cpp index 3fd60ca1..abbee790 100644 --- a/util.cpp +++ b/util.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -372,7 +373,7 @@ namespace http portstr_ = std::string(port_i + 1, host_.end()); host_.assign(host_.begin(), port_i); try{ - port_ = std::stoi(portstr_); + port_ = boost::lexical_cast(portstr_); } catch (std::exception e) { port_ = 80;