----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39968/#review118622 -----------------------------------------------------------
3rdparty/libprocess/src/help.cpp (lines 120 - 131) <https://reviews.apache.org/r/39968/#comment179913> Did you test the help endpoints when you made this change? This code looks incorrect for `tokens.size() == 3`, how about we update tokenize to take the maximum number of tokens, like we did for strings::split? ``` // Path format of the url: /help/<id>[/<name>] // Note that <name> may contain slashes. vector<string> tokens = strings::tokenize(request.url.path, "/", 3); Option<string> id = None(); Option<string> name = None(); if (tokens.size() > 1) { id = tokens[1]; } if (tokens.size() > 2) { name = tokens[2]; } ``` - Ben Mahler On Nov. 5, 2015, 7:25 a.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39968/ > ----------------------------------------------------------- > > (Updated Nov. 5, 2015, 7:25 a.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-3833 > https://issues.apache.org/jira/browse/MESOS-3833 > > > Repository: mesos > > > Description > ------- > > Enable endpoint include nested paths > > > Diffs > ----- > > 3rdparty/libprocess/src/help.cpp 3f82c0fb41a0d9388d88dbecc9289d705c2a343a > > Diff: https://reviews.apache.org/r/39968/diff/ > > > Testing > ------- > > > Thanks, > > Guangya Liu > >
