----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39968/#review118671 -----------------------------------------------------------
3rdparty/libprocess/src/help.cpp (lines 170 - 187) <https://reviews.apache.org/r/39968/#comment179969> Please extend the existing HTTPTest.EndpointsHelp to also ensure that help requests with names containing a slash also function correctly. 3rdparty/libprocess/src/help.cpp (line 174) <https://reviews.apache.org/r/39968/#comment179970> This `api/v1/scheduler` example looks like a mesos endpoint and it doesn't seem necessary here, let's just omit it since this is libprocess. So: ``` // Path format of the url: /help/<id>[/<name>]. // Note that <name> may contain slashes. ``` 3rdparty/libprocess/src/help.cpp (lines 175 - 176) <https://reviews.apache.org/r/39968/#comment179971> My previous suggestion was to continue to use strings::tokenize, but to add a parameter to specify the maximum number of tokens to return. So no need to trim: ``` vector<string> tokens = strings::tokenize(request.url.path, "/", 3); ``` You'll need to add another patch that implements the TODO here: https://github.com/apache/mesos/blob/master/3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp#L134-L135 - Ben Mahler On Feb. 10, 2016, 1:37 p.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39968/ > ----------------------------------------------------------- > > (Updated Feb. 10, 2016, 1:37 p.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-3833 > https://issues.apache.org/jira/browse/MESOS-3833 > > > Repository: mesos > > > Description > ------- > > Enabled http endpoint include nested paths. > > > Diffs > ----- > > 3rdparty/libprocess/src/help.cpp be3f7b74d92bd0626d111fd4ddd4cacd74e36e68 > > Diff: https://reviews.apache.org/r/39968/diff/ > > > Testing > ------- > > LiuGuangyas-MacBook-Pro:~ gyliu$ curl > "http://192.168.0.100:5050/help/master/api/v1/scheduler" > ### USAGE ### > > /master/api/v1/scheduler > > ### TL;DR; ### > Endpoint for schedulers to make Calls against the master. > > ### DESCRIPTION ### > Returns 202 Accepted iff the request is accepted. > > > Thanks, > > Guangya Liu > >
