m3u8 relative url fixed

This commit is contained in:
Victor Gavro 2022-03-01 01:04:14 +02:00 committed by Alessandro Ros
parent c3a1ee72bc
commit c13e33b1ed

View File

@ -10,7 +10,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
gopath "path"
"strings"
"sync"
"time"
@ -33,20 +32,7 @@ func clientURLAbsolute(base *url.URL, relative string) (*url.URL, error) {
if err != nil {
return nil, err
}
if strings.HasPrefix(relative, "//") {
u.Scheme = base.Scheme
} else if !u.IsAbs() {
u = &url.URL{
Scheme: base.Scheme,
User: base.User,
Host: base.Host,
Path: gopath.Join(gopath.Dir(base.Path), u.Path),
RawQuery: u.RawQuery,
}
}
return u, nil
return base.ResolveReference(u), nil
}
type clientAllocateProcsReq struct {