bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.74k stars 1.4k forks source link

in HLS, query parameters are not propagated to playlists and segments #3275

Closed aler9 closed 3 weeks ago

aler9 commented 2 months ago

Which version are you using?

v1.6.0

Which operating system are you using?

Describe the issue

When a HLS page is requested with query parameters, i.e.

http://localhost:8888/mystream?key=val

The query parameters are correctly propagated to the multivariant playlist (index.m3u8):

http://localhost:8888/mystream/index.m3u8?key=val

But they are not propagated to the media playlist (stream.m3u8) or to segments:

http://localhost:8888/stream/stream.m3u8
http://localhost:8888/stream/seg1.mp4

Describe how to replicate the issue

  1. start the server
  2. publish a stream
  3. open http://localhost:8888/mystream?key=val and follow the process

Did you attach the server logs?

no

Did you attach a network dump?

no

mevoronin commented 3 weeks ago

Hi. I encountered the same problem. When using authorization, the server receives a parameter without parameters. {User="", Password="", Ip="89.221.63.64", Action="read", Protocol="hls", Id=null, Query="_HLS_msn=342&_HLS_part=9&_HLS_skip=YES", Path="e588e1ff-c3cc-4d9c-be38-66106ba4155c"} It is impossible to authorize such a request. For HLS, I always made the response 200, but each segment request leads to an authorization request.