http-content-range

Chrome issue - video stream & session conflict

你。 提交于 2020-01-02 00:55:12
问题 I have a problem with the implementation of videos in javascript and php. index.php session_start() // do other stuff include ‘video.php’ video.php <?php If(!$_REQUEST[‘play’]){ // displaying video.html } else { // play video $fp = @fopen($file, 'rb'); $size = filesize($file); // File size $length = $size; // Content length $start = 0; // Start byte $end = $size - 1; // End byte // Now that we've gotten so far without errors we send the accept range header /* At the moment we only support

Content-Range working in Safari but not in Chrome

依然范特西╮ 提交于 2019-12-10 11:40:04
问题 I'm streaming audio files from a Node.js Express server with Content-Range headers plus no caching headers. This works ok in latest Safari instead, but it does not in Chrome. While when streaming the full audio file with HTTP 200 , my headers were { 'Content-Length': 4724126, 'Content-Type': 'audio/mpeg', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'POST, GET, OPTIONS', 'Access-Control-Allow-Headers': 'POST, GET, OPTIONS', Expires: 0, Pragma: 'no-cache', 'Cache-Control

Is using the HTTP Content-Range header appropriate when sending a file in chunks using the POST method?

自闭症网瘾萝莉.ら 提交于 2019-12-09 01:41:25
问题 I am working on an existing Silverlight file uploader that breaks files into multiple chunks and transmits the file using multiple HTTP requests. Currently, it sends the start and total byte information on the querystring, but as learning exercise, I'd like to use a more standards-based approach. I've previously used the HTTP Content-Range header when implementing an endpoint that serves content. Is this header also appropriate to use when posting content from a client to the server? 回答1: Yes

Content-Range configuration for Django Rest Pagination

做~自己de王妃 提交于 2019-12-08 13:04:41
问题 6.30.15 - HOW CAN I MAKE THIS QUESTION BETTER AND MORE HELPFUL TO OTHERS? FEEDBACK WOULD BE HELPFUL. THANKS! I need to send a content-range header to a dojo/dgrid request: I cannot find any examples of HOW to do this. I'm not exactly sure where this setting goes (Content-Range: items 0-9/*). I have been given a great linkheaderpagination example on this question: Django Rest Framework Pagination Settings - Content-Range But I don't know how to make this work to produce a Content-Range

Content-Range working in Safari but not in Chrome

a 夏天 提交于 2019-12-06 16:56:35
I'm streaming audio files from a Node.js Express server with Content-Range headers plus no caching headers. This works ok in latest Safari instead, but it does not in Chrome. While when streaming the full audio file with HTTP 200 , my headers were { 'Content-Length': 4724126, 'Content-Type': 'audio/mpeg', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'POST, GET, OPTIONS', 'Access-Control-Allow-Headers': 'POST, GET, OPTIONS', Expires: 0, Pragma: 'no-cache', 'Cache-Control': 'no-cache, no-store, must-revalidate' } and it works on both Chrome and Safari <audio> tag. When

OneDrive API Node.js - Can´t use :/createUploadSession Content-Range Error

落爺英雄遲暮 提交于 2019-12-04 02:07:52
问题 My problem was that I couldn´t upload files bigger than 4MB so I used the createuploadsession according to createuploadsession I successfully get the uploadUrl value from the createuploadsession response. Now I try to make a PUT request with this code var file = 'C:\\files\\box.zip' fs.readFile(file, function read(e, f) { request.put({ url: 'https://api.onedrive.com/rup/545d583xxxxxxxxxxxxxxxxxxxxxxxxx', headers: { 'Content-Type': mime.lookup(file), 'Content-Length': f.length, 'Content-Range'

OneDrive API Node.js - Can´t use :/createUploadSession Content-Range Error

自闭症网瘾萝莉.ら 提交于 2019-12-01 11:58:47
My problem was that I couldn´t upload files bigger than 4MB so I used the createuploadsession according to createuploadsession I successfully get the uploadUrl value from the createuploadsession response. Now I try to make a PUT request with this code var file = 'C:\\files\\box.zip' fs.readFile(file, function read(e, f) { request.put({ url: 'https://api.onedrive.com/rup/545d583xxxxxxxxxxxxxxxxxxxxxxxxx', headers: { 'Content-Type': mime.lookup(file), 'Content-Length': f.length, 'Content-Range': 'bytes ' + f.length } }, function(er, re, bo) { console.log('#324324', bo); }); }); But I will get as

Is using the HTTP Content-Range header appropriate when sending a file in chunks using the POST method?

大城市里の小女人 提交于 2019-12-01 01:29:32
I am working on an existing Silverlight file uploader that breaks files into multiple chunks and transmits the file using multiple HTTP requests. Currently, it sends the start and total byte information on the querystring, but as learning exercise, I'd like to use a more standards-based approach. I've previously used the HTTP Content-Range header when implementing an endpoint that serves content. Is this header also appropriate to use when posting content from a client to the server? Yes. RFC 2616 (HTTP 1.1), Section 14 begins by stating: For entity-header fields, both sender and recipient

Serving audio data from a Java servlet for an HTML5 audio control

雨燕双飞 提交于 2019-11-29 11:49:35
This may be a Servlets question or an HTML5 question, depending on what the solution turns out to be... :) I've got a (Tomcat) Servlet serving up short clips of audio which are then picked up in an HTML5 audio element. The audio correctly plays, but on some browsers only once (so that attempting to "rewind" or replay the audio does not then work). I suspect that this is because my Servlet is not reporting that it supports range requests: I notice that given a static audio file on the same server, Apache adds the HTTP "range-unit" response header, and replaying the file then works in such cases

Serving audio data from a Java servlet for an HTML5 audio control

核能气质少年 提交于 2019-11-28 05:30:54
问题 This may be a Servlets question or an HTML5 question, depending on what the solution turns out to be... :) I've got a (Tomcat) Servlet serving up short clips of audio which are then picked up in an HTML5 audio element. The audio correctly plays, but on some browsers only once (so that attempting to "rewind" or replay the audio does not then work). I suspect that this is because my Servlet is not reporting that it supports range requests: I notice that given a static audio file on the same