Firefox ignores the range of response header content and plays only the sent sample

I built an audio stream for files mp3, and every time the client gets into the audio, it gets something like this:

enter image description here

But what he does is just play 1 minute of the sample instead of 120 minutes

enter image description here

What am I doing wrong here?

+4
source share
2 answers

Not 100% sure, because you did not provide the code or sample stream for testing, but your HTTP range request processing has been violated.

In the request of your example, the client sends Range: bytes=0-and your server responds with a 1MiB response:

  • Content-Length: 1048576 (aka. 1 MiB)
  • Content-Range: 0-1048575/...

, ! bytes=0-, 0 (. http 1.1 RFC), Range. (IIRC, Firefox - Range: bytes=0- , ).

, Content-Length, (Firefox) , 1 , . , 1 MiB 1:06 .

PS: Content-Duration (, RFC 3803) - , .

+3

. http 3xx, : '308 Resume Uncomplete' '503 Service Temporarily Unavailable' plus 'retry-after: 2' '413 Request Entity Too Large' 'retry-after: 2'

0

Source: https://habr.com/ru/post/1545527/


All Articles