Match kawa behavior on request matching
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
097aff358d
commit
0ae8a7e123
5
queue.go
5
queue.go
|
@ -264,9 +264,8 @@ func (q *Queue) GetListeners() (listeners []*ListenerInformation) {
|
|||
}
|
||||
|
||||
func (q *Queue) HandleRadioRequest(writer http.ResponseWriter, request *http.Request) {
|
||||
mountName := strings.TrimPrefix(request.URL.Path, "/")
|
||||
for _, mount := range q.mounts {
|
||||
if mount.Mount == mountName {
|
||||
if strings.HasSuffix(request.URL.Path, mount.Mount) {
|
||||
writer.Header().Set("Server", "MeteorLight/radio")
|
||||
writer.Header().Set("Content-Type", mount.MimeType)
|
||||
writer.Header().Set("Accept-Ranges", "none")
|
||||
|
@ -312,7 +311,7 @@ func (q *Queue) HandleRadioRequest(writer http.ResponseWriter, request *http.Req
|
|||
|
||||
mount.AddListener(&StreamListener{
|
||||
Information: ListenerInformation{
|
||||
Mount: mountName,
|
||||
Mount: mount.Mount,
|
||||
Path: uriPath,
|
||||
Headers: headers,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue