mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
temporary fix for static class constant in uri
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user