> On March 18, 2016, 6:24 p.m., Ben Whitehead wrote:
> > src/master/http.cpp, line 959
> > <https://reviews.apache.org/r/45000/diff/1/?file=1304561#file1304561line959>
> >
> >     According to the rules defined in 
> > https://tools.ietf.org/html/rfc3986#section-5 we should be fine to use a 
> > scheme relative location.
> >     
> >     I think keeping the link to the RFC is a good idea here, so that the 
> > next person that reads this code knows explicitly what this code was 
> > written against.
> 
> Vinod Kone wrote:
>     So all we no to do is append the request.path at the end right?
> 
> Ashwin Murthy wrote:
>     Isnt it fine to also preserve the original scheme? It is not presciptive 
> either way. I will definitely add the original comment pointing to the RFC 
> back

The path should be where mesos wants me (as a client) to go, if it's the same 
path but a different host that's fine. If it's the same host but a different 
path, that's fine too.

When resolving a `Location` header it always has to be against a base URI, so 
what is sent back to the client is always evaluated agains the initial URI sent 
to the server.

Regarding scheme, if you are comfortable that mesos has enough information to 
be able to do the redirect across scheme as well then feel free to include it. 
If mesos doesn't know enough that's fine too.


- Ben


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45000/#review124350
-----------------------------------------------------------


On March 20, 2016, 4: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, 4: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
> 
>

Reply via email to