http-range

How to make browser request smaller range with 206 Partial Content

走远了吗. 提交于 2020-12-30 06:00:51
问题 I am currently making a video streaming service where the video is transcoded in chunks of roughly 1MB each. The HTML5 player of Firefox, Chrome and IE all try their best to request partial content (by adding the Range header to their request). Unfortunately, most of the time this header looks like this: Range:bytes=0- I don't want to return the full content, but only 1MB of the content, so I return this: Content-Range:bytes 0-1048575/5074944 Now Chrome accepts this completely and keeps

Firefox won't request further data after receiving 206 with specified content range

故事扮演 提交于 2020-12-29 18:39:07
问题 To give some context, I have a <video> tag that has a src attribute that points to a method on my node.js server. That method gets an mp4 file from another server, or rather part of an mp4 file, depending on the Range HTTP header specified by the browser, for example - Range:bytes=0- . Expected Behaviour (Chrome behaviour) To prevent my node.js server from downloading the entire file from the third party server, I have implemented a max buffer of around 5MB to download at one time. So if the

Firefox won't request further data after receiving 206 with specified content range

柔情痞子 提交于 2020-12-29 18:38:31
问题 To give some context, I have a <video> tag that has a src attribute that points to a method on my node.js server. That method gets an mp4 file from another server, or rather part of an mp4 file, depending on the Range HTTP header specified by the browser, for example - Range:bytes=0- . Expected Behaviour (Chrome behaviour) To prevent my node.js server from downloading the entire file from the third party server, I have implemented a max buffer of around 5MB to download at one time. So if the

What byte range 0- means

天涯浪子 提交于 2020-12-13 03:45:36
问题 What "Range: bytes=0-" header means ? Is the entire file ? I tried sending back 0 bytes and is not working, when I send the entire file it works, but I receive this request more than once in a streaming context, it doesn't look right. 回答1: Is the entire file ? Yes, exactly that. The spec has the grammar: byte-range-set = 1#( byte-range-spec / suffix-byte-range-spec ) byte-range-spec = first-byte-pos "-" [ last-byte-pos ] and also notes: If the last-byte-pos value is absent, or if the value is

What byte range 0- means

故事扮演 提交于 2020-12-13 03:44:35
问题 What "Range: bytes=0-" header means ? Is the entire file ? I tried sending back 0 bytes and is not working, when I send the entire file it works, but I receive this request more than once in a streaming context, it doesn't look right. 回答1: Is the entire file ? Yes, exactly that. The spec has the grammar: byte-range-set = 1#( byte-range-spec / suffix-byte-range-spec ) byte-range-spec = first-byte-pos "-" [ last-byte-pos ] and also notes: If the last-byte-pos value is absent, or if the value is

What byte range 0- means

与世无争的帅哥 提交于 2020-12-13 03:41:58
问题 What "Range: bytes=0-" header means ? Is the entire file ? I tried sending back 0 bytes and is not working, when I send the entire file it works, but I receive this request more than once in a streaming context, it doesn't look right. 回答1: Is the entire file ? Yes, exactly that. The spec has the grammar: byte-range-set = 1#( byte-range-spec / suffix-byte-range-spec ) byte-range-spec = first-byte-pos "-" [ last-byte-pos ] and also notes: If the last-byte-pos value is absent, or if the value is

What byte range 0- means

痞子三分冷 提交于 2020-12-13 03:41:09
问题 What "Range: bytes=0-" header means ? Is the entire file ? I tried sending back 0 bytes and is not working, when I send the entire file it works, but I receive this request more than once in a streaming context, it doesn't look right. 回答1: Is the entire file ? Yes, exactly that. The spec has the grammar: byte-range-set = 1#( byte-range-spec / suffix-byte-range-spec ) byte-range-spec = first-byte-pos "-" [ last-byte-pos ] and also notes: If the last-byte-pos value is absent, or if the value is

FileStreamResult doesn't recognize multiple http ranges in Asp.Net Core 2.2

做~自己de王妃 提交于 2020-01-24 22:08:12
问题 I have such simple endpoint: [HttpGet] public IActionResult GetFileDirect() { var path = ...; // path to the file return File(System.IO.File.OpenRead(path), "text/plain", true); } Currently the content of the file: abcdefghijklmnopqrstuvwxyz As you see in the return statement I am passing true for enableRangeProcessing . And it works as expected in case of single range request: curl -H Range:bytes=0-8 http://localhost:65318/api/File -i Here is the response: HTTP/1.1 206 Partial Content

AES 128 bit CTR partial file decryption with PHP

余生颓废 提交于 2019-12-25 03:53:32
问题 This is not a duplicate post because I have looked everywhere and I can't find an answer to this. Its about partial decryption. Not full. I have a good knowledge of PHP but little knowledge about cryptography. I know the key and the iv of the crypted file. The file is decrypting fine as whole but the real issue arises when I try to decrypt the partial file from the middle. It decrypts fine when I try to decrypt the first 128kb of the file or 256kb or any length from the beginning of the file.

HTTP range, streaming, music and audio

情到浓时终转凉″ 提交于 2019-12-12 03:43:44
问题 I have a website which I use to stream audio files. Mainly, MP3 & OGG. Since few months, I handle myself (PHP) the steaming part (before it was apache2). First I do a normal 200 OK response with sliced binary response of my multimedia audio files (for memory allocation). It's working fine, but I got the Infinity duration on all my audio. According to this question, I have updated yesterday the streaming part. And now, I have one of the strangest bug I could imagine. My refactor of code works