> On March 3, 2015, 6:55 a.m., Timothy Chen wrote: > > 3rdparty/libprocess/src/process.cpp, line 2912 > > <https://reviews.apache.org/r/31228/diff/3/?file=882206#file882206line2912> > > > > Seems like this is simpler > > > > if (wildcardMatching(endpoint, pattern)) { > > match = true; > > break; > > } > > > > Why not just use boost regex and don't introduce a new method here? > > That way we also can support regex instead of a subset.
While I agree with you that using regex would be the best solution (and actually it was my first idea), boost regex adds a binary dependency to a boost library. And as seen in the code, we have no extra binary dependencies neither in stout nor in libprocess. > On March 3, 2015, 6:55 a.m., Timothy Chen wrote: > > 3rdparty/libprocess/src/process.cpp, line 2920 > > <https://reviews.apache.org/r/31228/diff/3/?file=882206#file882206line2920> > > > > Should disabled endpoints return forbidden? I would thought they should > > be 404? The reason for using 403, is that in the future we would like to use ACL's to control which endpoints can be viewed by certain users. In that case 403 would be the logical response. That is my rationale, but if you still think it should be 404 I will change it. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31228/#review74900 ----------------------------------------------------------- On March 3, 2015, 12:06 p.m., Alexander Rojas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31228/ > ----------------------------------------------------------- > > (Updated March 3, 2015, 12:06 p.m.) > > > Review request for mesos, Joerg Schad, Niklas Nielsen, and Till Toenshoff. > > > Bugs: MESOS-2333 > https://issues.apache.org/jira/browse/MESOS-2333 > > > Repository: mesos > > > Description > ------- > > Adds a mechanism for disabling http endpoints (e.g > `testprocess/handler1,processname(*)/*`). A list of coma separated strings > can be provided using the environment variable > `LIBPROCESS_DISABLED_ENDPOINTS` which will be read during libprocess > initialization. Then, when creating http endpoints (using the method `route`) > the endpoint path will be checked against the patterns. If a match is found > the endpoint handler will be replaced for a generic once which returns a 403 > HTTP Error (Forbidden). > > > Diffs > ----- > > 3rdparty/libprocess/include/process/process.hpp > 392c74df3e8a122aecd3633dffdeec4bcbd1f097 > 3rdparty/libprocess/src/process.cpp > 6f9a0d290de6838c20d208266b670999186e1798 > 3rdparty/libprocess/src/tests/process_tests.cpp > eb38edce2c483ba7f963a826893a15a075238618 > > Diff: https://reviews.apache.org/r/31228/diff/ > > > Testing > ------- > > > Thanks, > > Alexander Rojas > >