How can I find out whether a server supports the Range header?

后端 未结 5 1010
迷失自我
迷失自我 2020-12-01 09:44

I have been trying to stream audio from a particular point by using the Range header values but I always get the song right from the beginning. I am doing this through a pro

5条回答
  •  庸人自扰
    2020-12-01 10:22

    One way is just to try, and check the response. In your case, it appears the server doesn't support ranges.

    Alternatively, do a GET or HEAD on the URI, and check for the Accept-Ranges response header.

提交回复
热议问题