temporary fix for static class constant in uri

This commit is contained in:
Peter Thorson
2011-12-08 09:23:59 -06:00
parent 008732f654
commit 0660d4e87a
2 changed files with 8 additions and 7 deletions

View File

@@ -74,7 +74,7 @@ uri::uri(bool secure, const std::string& host, uint16_t port, const std::string&
uri::uri(bool secure, const std::string& host, const std::string& resource)
: m_secure(secure),
m_host(host),
m_port(m_secure ? DEFAULT_SECURE_PORT : DEFAULT_PORT),
m_port(m_secure ? URI_DEFAULT_SECURE_PORT : URI_DEFAULT_PORT),
m_resource(resource == "" ? "/" : resource) {}
uri::uri(bool secure,
@@ -119,7 +119,7 @@ std::string uri::get_host() const {
}
std::string uri::get_host_port() const {
if (m_port == (m_secure ? DEFAULT_SECURE_PORT : DEFAULT_PORT)) {
if (m_port == (m_secure ? URI_DEFAULT_SECURE_PORT : URI_DEFAULT_PORT)) {
return m_host;
} else {
std::stringstream p;
@@ -148,7 +148,7 @@ std::string uri::str() const {
s << "ws" << (m_secure ? "s" : "") << "://" << m_host;
if (m_port != (m_secure ? DEFAULT_SECURE_PORT : DEFAULT_PORT)) {
if (m_port != (m_secure ? URI_DEFAULT_SECURE_PORT : URI_DEFAULT_PORT)) {
s << ":" << m_port;
}
@@ -158,7 +158,7 @@ std::string uri::str() const {
uint16_t uri::get_port_from_string(const std::string& port) const {
if (port == "") {
return (m_secure ? DEFAULT_SECURE_PORT : DEFAULT_PORT);
return (m_secure ? URI_DEFAULT_SECURE_PORT : URI_DEFAULT_PORT);
}
unsigned int t_port = atoi(port.c_str());