mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] dlazarus commented on a change in pull request #324: MESOS-9499 extended URI syntax to support any Zookeeper authentication schemes
Date Wed, 16 Jan 2019 18:10:57 GMT
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_r248393365
 
 

 ##########
 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:
   Also we can choose another delimiter symbol, RFS allows to use several symbols.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message