mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiang Yan Xu <...@jxu.me>
Subject Re: Review Request 50593: Added `URL::isRelative` to check if the URL is relative.
Date Fri, 29 Jul 2016 06:38:14 GMT

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



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 != ""
}
```

- Jiang Yan Xu


On July 28, 2016, 9:06 p.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50593/
> -----------------------------------------------------------
> 
> (Updated July 28, 2016, 9:06 p.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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message