29
throw new Error(`[UriError]: Scheme contains illegal characters.${detail} (len:${ret.scheme.length})`);
30
}
32
>
// path, http://tools.ietf.org/html/rfc3986#section-3.3
33
>
// If a URI contains an authority component, then the path component
34
>
// must either be empty or begin with a slash ("/") character. If a URI
35
>
// does not contain an authority component, then the path cannot begin
36
>
// with two slash characters ("//").
37
>
if (ret.path) {
38
if (ret.authority) {
39
if (!_singleSlashStart.test(ret.path)) {