diff --git a/apps/uriparser.cpp b/apps/uriparser.cpp index f9e966a6a..306a517d1 100644 --- a/apps/uriparser.cpp +++ b/apps/uriparser.cpp @@ -60,17 +60,17 @@ UriParser::Type UriParser::type() return m_uriType; } -string UriParser::host(void) +string UriParser::host(void) const { return m_host; } -string UriParser::port(void) +string UriParser::port(void) const { return m_port; } -unsigned short int UriParser::portno(void) +unsigned short int UriParser::portno(void) const { // This returns port in numeric version. Fallback to 0. try diff --git a/apps/uriparser.hpp b/apps/uriparser.hpp index 59166dc07..dbd49b7af 100644 --- a/apps/uriparser.hpp +++ b/apps/uriparser.hpp @@ -46,14 +46,14 @@ class UriParser std::string uri() { return m_origUri; } std::string proto(); std::string scheme() { return proto(); } - std::string host(); - std::string port(); - unsigned short int portno(); + std::string host() const; + std::string port() const; + unsigned short int portno() const; std::string hostport() { return host() + ":" + port(); } std::string path(); std::string queryValue(const std::string& strKey); ParamProxy operator[](const std::string& key) { return ParamProxy(m_mapQuery, key); } - const std::map& parameters() { return m_mapQuery; } + const std::map& parameters() const { return m_mapQuery; } private: void Parse(const std::string& strUrl, DefaultExpect);