> On July 29, 2016, 6:38 a.m., Jiang Yan Xu wrote: > > I suggested `isAbsolute()` because it's a precisely defined concept in > > https://tools.ietf.org/html/rfc3986#section-4.3 whereas **relative** is > > not, it's just a **subset of URIs**. > > > > Can we implement `isAbsolute()` instead and in the next review just do > > `CHECK(!request.url.isAbsolute());`? > > > > e.g., the golang implementation just looks as whether the `scheme` is empty. > > > > https://golang.org/src/net/url/url.go?s=22627:22653#L834 > > ``` > > // IsAbs reports whether the URL is absolute. > > func (u *URL) IsAbs() bool { > > return u.Scheme != "" > > } > > ```
Sure, let me update. - haosdent ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50593/#review144063 ----------------------------------------------------------- On July 29, 2016, 4:06 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50593/ > ----------------------------------------------------------- > > (Updated July 29, 2016, 4:06 a.m.) > > > Review request for mesos, Adam B, Benjamin Mahler, Jie Yu, Michael Lunøe, > Vinod Kone, and Jiang Yan Xu. > > > Bugs: MESOS-5911 > https://issues.apache.org/jira/browse/MESOS-5911 > > > Repository: mesos > > > Description > ------- > > Added `URL::isRelative` to check if the URL is relative. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/http.hpp > c17c047de050da47989a97395c731686f0dfa548 > 3rdparty/libprocess/src/http.cpp 1bf1f3b1e6b94f19d82d4b23eed7da7da0b25e5a > > Diff: https://reviews.apache.org/r/50593/diff/ > > > Testing > ------- > > > Thanks, > > haosdent huang > >
