> On June 30, 2015, 3:37 a.m., Adam B wrote: > > src/master/http.cpp, line 424 > > <https://reviews.apache.org/r/34646/diff/5/?file=975677#file975677line424> > > > > Is there a way you could reuse all or part of Http::redirect()? Seems > > like a lot of copy/paste.
I add a condition in redirect method to return different result. - haosdent ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34646/#review89799 ----------------------------------------------------------- On July 2, 2015, 11:24 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34646/ > ----------------------------------------------------------- > > (Updated July 2, 2015, 11:24 a.m.) > > > Review request for mesos and Adam B. > > > Bugs: MESOS-1865 > https://issues.apache.org/jira/browse/MESOS-1865 > > > Repository: mesos > > > Description > ------- > > Return empty task list when current master is not a leader. > > > Diffs > ----- > > src/master/http.cpp 2be613b2e4c913b74c12d0d8f2d0e25da3cd3656 > src/master/master.hpp fb4d6fac85e284987ec8fbf6949b5023875573fb > > Diff: https://reviews.apache.org/r/34646/diff/ > > > Testing > ------- > > make check > > when current master is not a leader, it would redirect to the leader master. > > ``` > $ curl -i http://master1:5050/master/tasks.json > HTTP/1.1 307 Temporary Redirect > Date: Mon, 01 Jun 2015 06:30:08 GMT > Location: http://master2:5050//master/tasks.json > Content-Length: 0 > ``` > > > Thanks, > > haosdent huang > >
