> On March 20, 2016, 11:43 p.m., Vinod Kone wrote: > > Can you confirm that you did a manual test of this (using curl and multiple > > masters w/ ZK)?
Vinod, validated the fix. Here is the o/p from testing with 3 local mesos masters and zookeeper $ curl -v -X POST -H "Content-Type: application/json" --data @body.json http://localhost:5050/api/v1/scheduler * Trying ::1... * connect to ::1 port 5050 failed: Connection refused * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 5050 (#0) > POST /api/v1/scheduler HTTP/1.1 > Host: localhost:5050 > User-Agent: curl/7.43.0 > Accept: */* > Content-Type: application/json > Content-Length: 120 > * upload completely sent off: 120 out of 120 bytes < HTTP/1.1 307 Temporary Redirect < Date: Thu, 24 Mar 2016 02:01:08 GMT < Location: //localhost:5052/master/api/v1/scheduler <<<<<this is the fix < Content-Length: 0 < * Connection #0 to host localhost left intact sonofstars-2:scratch ashwinm$ > On March 20, 2016, 11:43 p.m., Vinod Kone wrote: > > src/master/http.cpp, lines 970-972 > > <https://reviews.apache.org/r/45000/diff/3/?file=1307586#file1307586line970> > > > > looks like this fits in one line, why the wrapping? > > > > ``` > > return TemporaryRedirect( > > "//" + hostname.get() + ":" + stringify(info.port()) + > > request.url.path); > > ``` I guess I can make it fit - Ashwin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45000/#review124472 ----------------------------------------------------------- On March 20, 2016, 11:03 p.m., Ashwin Murthy wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45000/ > ----------------------------------------------------------- > > (Updated March 20, 2016, 11:03 p.m.) > > > Review request for mesos and Vinod Kone. > > > Repository: mesos > > > Description > ------- > > MESOS-3902: [Updated] Fix location header in redirect from non-leader. > Addressed comments from Vinod and Ben. Removed the scheme but added the path > from the original request to the location header. Preserved the link to the > RFC in the comments. > > > Diffs > ----- > > src/master/http.cpp bfea8fa811c24d37b2d7a8109728e1f40217e02f > > Diff: https://reviews.apache.org/r/45000/diff/ > > > Testing > ------- > > Was trying to write unit test in scheduler http api test but it turns out > multi master tests cannot be written at this point. Need to manually verify > this by setting up multiple masters with ZK. > > > Thanks, > > Ashwin Murthy > >