> On Aug. 13, 2015, 4:56 p.m., Anand Mazumdar wrote: > > I wonder if we should add a test for this so that we can assert that the > > fix works ? > > > > One easy way I can think about it, looking at the tests in > > process_tests.cpp ( you should be able to use the already existing > > HttpEndpointProcess there ), set up a route for a mock handler. Send in a > > http::Request to this mock route endpoint with URL(http://TEST_URL) , the > > handler on the server side should check the host header to be TEST_URL in > > the http::Request ?
We have many HTTP(S) tests already in place. Those tests validate this change. Any test that uses URL for a GET request validates this change. There are a few simple HTTPs tests for get and also the new docker provisioner tests validate it. - Jojy ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37426/#review95281 ----------------------------------------------------------- On Aug. 13, 2015, 12:46 a.m., Jojy Varghese wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37426/ > ----------------------------------------------------------- > > (Updated Aug. 13, 2015, 12:46 a.m.) > > > Review request for mesos, Anand Mazumdar and Timothy Chen. > > > Bugs: MESOS-3251 > https://issues.apache.org/jira/browse/MESOS-3251 > > > Repository: mesos > > > Description > ------- > > Currently libprocess http API sets the "Host" header field from the peer > socket > address (IP:port). The problem is that socket address might not be right HTTP > server and might be just a proxy. > Changed the logic to look for http server URL's domain first to populate the > "Host" field. > > > Diffs > ----- > > 3rdparty/libprocess/src/http.cpp 4dcbd74b894b483c4d166c23fac55ac8dba75166 > > Diff: https://reviews.apache.org/r/37426/diff/ > > > Testing > ------- > > make check. > > > Thanks, > > Jojy Varghese > >