mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-03 13:13:00 +00:00
m3u8 relative url fixed
This commit is contained in:
parent
c3a1ee72bc
commit
c13e33b1ed
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user