:Description: Sets the listening address in the form ``address[:port]``,
where the address is an IPv4 address string in dotted decimal
form, or an IPv6 address in hexadecimal notation. The
- optional port defaults to 80. Can be specified multiple times
- as in ``endpoint=::1 endpoint=192.168.0.100:8000``.
+ optional port defaults to 80 for ``endpoint`` and 443 for
+ ``ssl_endpoint``. Can be specified multiple times as in
+ ``endpoint=::1 endpoint=192.168.0.100:8000``.
:Type: Integer
:Default: None
}
tcp::endpoint parse_endpoint(boost::asio::string_view input,
+ unsigned short default_port,
boost::system::error_code& ec)
{
tcp::endpoint endpoint;
auto port_str = input.substr(colon + 1);
endpoint.port(parse_port(port_str.data(), ec));
} else {
- endpoint.port(80);
+ endpoint.port(default_port);
}
if (!ec) {
auto addr = input.substr(0, colon);
auto endpoints = config.equal_range("endpoint");
for (auto i = endpoints.first; i != endpoints.second; ++i) {
- auto endpoint = parse_endpoint(i->second, ec);
+ auto endpoint = parse_endpoint(i->second, 80, ec);
if (ec) {
lderr(ctx()) << "failed to parse endpoint=" << i->second << dendl;
return -ec.value();
lderr(ctx()) << "no ssl_certificate configured for ssl_endpoint" << dendl;
return -EINVAL;
}
- auto endpoint = parse_endpoint(i->second, ec);
+ auto endpoint = parse_endpoint(i->second, 443, ec);
if (ec) {
lderr(ctx()) << "failed to parse ssl_endpoint=" << i->second << dendl;
return -ec.value();