incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: Streaming video from couchdb
Date Mon, 09 May 2011 21:35:44 GMT
Hi John,

I added support for Content-Range in the upcoming 1.1 release.
However, it's perfectly kosher to return a 200 in the case that the
server does not support ranges w.rt RFC 2616; couchdb is not
'failing'.

B.

On 9 May 2011 18:49, Ryan Ramage <ryan.ramage@gmail.com> wrote:
> Range request headers were added in couch 1.1, which is not yet
> released, but you can get a build of it in many places. Try that.
>
> On Mon, May 9, 2011 at 9:41 AM, John <john.logsdon@netdev.co.uk> wrote:
>> Hi
>>
>> I've been trying to use couchdb in a scenario where I stream video back to an html5
web app without success. I'm requesting it as partial content but couch returns it with status
code 200 instead of 206. I've tried doing exactly the same thing towards a web server and
it replies as expected with a status code of 206 (Partial Content) and the browser is then
able to play the stream.
>>
>> I'm using couchdb version 1.0.2.
>>
>> Any ideas? Perhaps there is some config setting for the web server used by couch?
>>
>> Regards
>>
>> John
>>
>>
>> Curl command to emulate equivalent browser request:
>>
>> curl -i http://localhost:5984/holla/e75a25e04eb78c77d990081d0e000f32/jaws.mp4 -H"Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
-H"Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3" -H"Accept-Encoding:gzip,deflate,sdch" -H"Accept-Language:en-US,en;q=0.8"
-H"Connection:keep-alive" -H"Host:192.168.47.10:8182" -H"If-Range:'16-2472c1779e6519bc15106fc9480c44a4'"
-H"Range:bytes=5934716-5934716" -H"User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7)
AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24"
>>
>>
>> Request/Response received for couchdb and web server respectively.
>>
>> Couchdb (FAILS):
>>
>> Request URL:http://localhost:5984/holla/e75a25e04eb78c77d990081d0e000f32/jaws.mp4
>> Request Method:GET
>> Status Code:200 OK
>>
>> Request Headers
>> Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>> Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
>> Accept-Encoding:gzip,deflate,sdch
>> Accept-Language:en-US,en;q=0.8
>> Cache-Control:max-age=0
>> Connection:keep-alive
>> Host:localhost:5984
>> If-Range:"16-2472c1779e6519bc15106fc9480c44a4"
>> Range:bytes=327680-327680
>> User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML,
like Gecko) Chrome/11.0.696.57 Safari/534.24
>>
>> Response Headers
>> Cache-Control:must-revalidate
>> Content-Encoding:identity
>> Content-Length:126246489
>> Content-Type:video/mp4
>> Date:Fri, 06 May 2011 09:40:51 GMT
>> ETag:"16-2472c1779e6519bc15106fc9480c44a4"
>> Server:CouchDB/1.0.2 (Erlang OTP/R14B)
>>
>> Web Server (SUCCEEDS):
>>
>> Request URL:http://localhost:8182/holla/Jaws.mp4
>> Request Method:GET
>> Status Code:206 Partial Content
>>
>> Request Headers
>> Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>> Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
>> Accept-Encoding:gzip,deflate,sdch
>> Accept-Language:en-US,en;q=0.8
>> Connection:keep-alive
>> Host:localhost:8182
>> If-Range:Fri, 06 May 2011 08:22:56 GMT
>> Range:bytes=3036301-3036301
>> User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML,
like Gecko) Chrome/11.0.696.57 Safari/534.24
>>
>> Response Headers
>> Accept-Ranges:bytes
>> Content-Language:en
>> Content-Length:1
>> Content-Location:http://localhost:8182/holla/Jaws.mp4
>> Content-Range:bytes 3036301-3036301/126246489
>> Content-Type:video/mp4
>> Date:Fri, 06 May 2011 09:22:20 GMT
>> Expires:Fri, 06 May 2011 09:32:20 GMT
>> Last-Modified:Fri, 06 May 2011 08:22:56 GMT
>> Server:Restlet-Framework/@major-number@.@minor-number@@release-type@@release-number@
>> Vary:Accept-Charset, Accept-Encoding, Accept-Language, Accept
>>
>>
>

Mime
View raw message