From user-return-16180-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Mon May 9 21:36:13 2011 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 73178495F for ; Mon, 9 May 2011 21:36:13 +0000 (UTC) Received: (qmail 43221 invoked by uid 500); 9 May 2011 21:36:11 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 43189 invoked by uid 500); 9 May 2011 21:36:11 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 43181 invoked by uid 99); 9 May 2011 21:36:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 21:36:11 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.newson@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 21:36:06 +0000 Received: by bwj24 with SMTP id 24so7088916bwj.11 for ; Mon, 09 May 2011 14:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=YUdbgH/8jRSOEGfE1D36/r4RnDUvcNjyRM7V+i1Ua08=; b=U5Sjfn2zamDHCGSZ3okcLrBY/KcyommcHc7VOIeZRphMxWyOYYF6/fNiL+Q45GZIy2 Ukb0c/AcTAa3chjCK357adzi4W9+rMoFFLh15lPN5YadzXuovykTHKV7qGzB7/t/Ujpk SAH0Cbpfa1pFrbONUzn8ioSfv5SIKwBahP0O8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=u8SOvnpNjLO4HFCaowMS8wMWLZdcN60vm3vHWIs9igoScnuOg157VsC0PZE64i35V+ a7kGl3zPTf2952x7AqicTpEUL5xp3EIy0dYS0DoKSFWzJLtOSyWH0uF8ifMFhcfEVTMR 3Liu1MqUvSwVhvqXhCA1Xg+uTFH02TU0BAUpA= MIME-Version: 1.0 Received: by 10.205.82.199 with SMTP id ad7mr4151228bkc.152.1304976945049; Mon, 09 May 2011 14:35:45 -0700 (PDT) Received: by 10.204.171.1 with HTTP; Mon, 9 May 2011 14:35:44 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 May 2011 22:35:44 +0100 Message-ID: Subject: Re: Streaming video from couchdb From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 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 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 b= ut couch returns it with status code 200 instead of 206. I've tried doing e= xactly 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/jaw= s.mp4 -H"Accept:application/xml,application/xhtml+xml,text/html;q=3D0.9,tex= t/plain;q=3D0.8,image/png,*/*;q=3D0.5" -H"Accept-Charset:ISO-8859-1,utf-8;q= =3D0.7,*;q=3D0.3" -H"Accept-Encoding:gzip,deflate,sdch" -H"Accept-Language:= en-US,en;q=3D0.8" -H"Connection:keep-alive" -H"Host:192.168.47.10:8182" -H"= If-Range:'16-2472c1779e6519bc15106fc9480c44a4'" -H"Range:bytes=3D5934716-59= 34716" -H"User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWe= bKit/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=3D0.9,text/plai= n;q=3D0.8,image/png,*/*;q=3D0.5 >> Accept-Charset:ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.3 >> Accept-Encoding:gzip,deflate,sdch >> Accept-Language:en-US,en;q=3D0.8 >> Cache-Control:max-age=3D0 >> Connection:keep-alive >> Host:localhost:5984 >> If-Range:"16-2472c1779e6519bc15106fc9480c44a4" >> Range:bytes=3D327680-327680 >> User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/53= 4.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=3D0.9,text/plai= n;q=3D0.8,image/png,*/*;q=3D0.5 >> Accept-Charset:ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.3 >> Accept-Encoding:gzip,deflate,sdch >> Accept-Language:en-US,en;q=3D0.8 >> Connection:keep-alive >> Host:localhost:8182 >> If-Range:Fri, 06 May 2011 08:22:56 GMT >> Range:bytes=3D3036301-3036301 >> User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/53= 4.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@@rel= ease-number@ >> Vary:Accept-Charset, Accept-Encoding, Accept-Language, Accept >> >> >