> On Dec. 13, 2017, 11:07 p.m., Benjamin Bannier wrote:
> > Do we have a good argument for support of trailing slashes in leave-like 
> > endpoints like e.g., `/master/maintenance/schedule`?
> > 
> > I can see how serving both the version with and without trailing slash 
> > might make sense for "directory-like" (non-leave) endpoints like `/help`, 
> > but am not convinced of allowing the same for leave-like endpoints. Looking 
> > at the linked ticket I could currently think of more reasons to close it as 
> > `WONT_FIX` than for having this patch.

I thought some more about this, and would agree with the semantics proposed 
here.

The thinking would be that a trailing slash would only be surprising in an URL 
ending in a file-like token (e.g., `index.html`); for all others one could 
expect the versions with and without trailing slash to be equivalent. We do not 
have file-like URLs in Mesos, so the proposed fix looks good.


- Benjamin


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


On Dec. 13, 2017, 2:39 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64574/
> -----------------------------------------------------------
> 
> (Updated Dec. 13, 2017, 2:39 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Benjamin Mahler.
> 
> 
> Bugs: MESOS-5333
>     https://issues.apache.org/jira/browse/MESOS-5333
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Prior to this patch, adding a trailing '/' to a valid URL path, e.g.,
> "/state/", yielded a 404 response. This patch ensures that two URLs
> which differ only in trailing '/' produce the same result.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp 
> 75cf1d3b6d3d257ba9bc81c68017a74a6511cebf 
>   3rdparty/libprocess/src/tests/http_tests.cpp 
> 9daac715f0242921b7f9f5c20b3eb27f1be802d4 
> 
> 
> Diff: https://reviews.apache.org/r/64574/diff/1/
> 
> 
> Testing
> -------
> 
> Ensured the modified test fails without the fix.
> `make check` on Mac OS 10.11.6 and several Linux distributions.
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>

Reply via email to