dlazarus commented on a change in pull request #324: MESOS-9499 extended URI syntax to support any Zookeeper authentication schemes URL: https://github.com/apache/mesos/pull/324#discussion_r248392832
########## File path: include/mesos/zookeeper/url.hpp ########## @@ -101,16 +102,35 @@ inline Try<URL> URL::parse(const std::string& url) // Look for the trailing '@' (if any), that's where servers starts. size_t index = s.find_last_of('@'); - if (index != std::string::npos) { - return URL(s.substr(0, index), s.substr(index + 1), path); - } else { + if (index == std::string::npos) return URL(s, path); + + std::string servers = s.substr(index + 1); + std::string auth = s.substr(0, index); + + size_t schemeDelimiter = auth.find_first_of('!'); + + // If there is not '!' in URL scheme is "digest" and everything before '@' is credentials + std::string scheme = "digest"; + std::string credentials = auth; Review comment: Yes. But it is an obvious side effect of design decision to pass authentication information as URL. Which was already in place. It is also not a big problem. We can allow escape it somehow. Like "\\!". ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services